Sweep along path created by 3D-Parametric-Macro

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Mantabit
Posts: 4
Joined: Thu Dec 20, 2018 3:36 pm

Sweep along path created by 3D-Parametric-Macro

Post by Mantabit »

Hello everyone

I just started using FreeCAD and I want to model some wires for a FEM simulation. In order to do so, I need to sweep a rectangular sketch along an elliptical trajectory (or path) (see also the two screenshots in the attachment).

The problem is that when I try to use the "utility to sweep" under the "part workbench" I am unable to choose the path I created for the sweep operation. When I click on the "Sweep Path" button in the sweep menu, I can´t choose the elliptical path I created using the "3D Parametric Curve" Macro.

Does anyone have ideas on how to resolve this issue?

I attached the project file.

Thanks!
Attachments
Screenshot from 2018-12-20 16-40-10.png
Screenshot from 2018-12-20 16-40-10.png (137.99 KiB) Viewed 1999 times
Screenshot from 2018-12-20 16-38-11.png
Screenshot from 2018-12-20 16-38-11.png (68.02 KiB) Viewed 1999 times
test.fcstd
(81.2 KiB) Downloaded 48 times
Bance
Veteran
Posts: 4185
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Sweep along path created by 3D-Parametric-Macro

Post by Bance »

You can create your helix from the part WB create primitives option. That should work....

HTH Steve.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sweep along path created by 3D-Parametric-Macro

Post by NormandC »

I was able to select the DWire as sweep path. I think I know what's happening: the DWire actually consists of a great number of short line segments. If you see the "interdict" sign when trying to pick the path in the 3D view, the pointer is probably over a vertex. Simply zoom in (a lot) to be able to select an edge. Then, select it a second time to select the whole path.

But I agree with Bance, it would be much better to use the already existing Part Helix that you can create from the Part CreatePrimitives utility.

When making the sweep, don't forget to check the "Frenet" option.
Mantabit
Posts: 4
Joined: Thu Dec 20, 2018 3:36 pm

Re: Sweep along path created by 3D-Parametric-Macro

Post by Mantabit »

NormandC wrote: Thu Dec 20, 2018 6:12 pm I was able to select the DWire as sweep path. I think I know what's happening: the DWire actually consists of a great number of short line segments. If you see the "interdict" sign when trying to pick the path in the 3D view, the pointer is probably over a vertex. Simply zoom in (a lot) to be able to select an edge. Then, select it a second time to select the whole path.

But I agree with Bance, it would be much better to use the already existing Part Helix that you can create from the Part CreatePrimitives utility.

When making the sweep, don't forget to check the "Frenet" option.
Thanks for your replies, I could create the shape I wanted using the "Create Primitives" utility.

However, I'm curious about the option "Frenet". I´m referring to https://www.freecadweb.org/wiki/images/ ... t-comp.png. It seems like the "Frenet" option doesn´t work for a path which consists of short, successive straight lines?

Another question: How can I "connect" the two coils in the file in the attachment via two Bézier-Curves?
Attachments
test.fcstd
(15.87 KiB) Downloaded 47 times
connecting_coils.png
connecting_coils.png (102.41 KiB) Viewed 1964 times
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sweep along path created by 3D-Parametric-Macro

Post by NormandC »

Mantabit wrote: Thu Dec 20, 2018 7:57 pm It seems like the "Frenet" option doesn´t work for a path which consists of short, successive straight lines?
I'm not sure why. Maybe DeepSOIC (a FreeCAD dev and the one who created the image you linked) would know more.

DeepSOIC wrote:ping
Mantabit wrote: Thu Dec 20, 2018 7:57 pm Another question: How can I "connect" the two coils in the file in the attachment via two Bézier-Curves?
I'm not sure what you mean. To me they appear to be already connected.
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Sweep along path created by 3D-Parametric-Macro

Post by UR_ »

Mantabit wrote: Thu Dec 20, 2018 7:57 pm Another question: How can I "connect" the two coils in the file in the attachment via two Bézier-Curves?
Probably a better choice would be using this tool:

FreeCAD 0.18-000134.png
FreeCAD 0.18-000134.png (15.17 KiB) Viewed 1908 times

from "Curves" workbench.

Can be installed using addon manager

Here are some nice properties available to play with

FreeCAD 0.18-000135.png
FreeCAD 0.18-000135.png (10.9 KiB) Viewed 1908 times

file:
test_ur.FCStd
(21.96 KiB) Downloaded 46 times
GIF.gif
GIF.gif (236.48 KiB) Viewed 1908 times

done with:OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15481 (Git)
Build type: Release
Branch: master
Hash: 763b5c362fe4b98dca858f86f5d1353075224651
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Sweep along path created by 3D-Parametric-Macro

Post by DeepSOIC »

Mantabit wrote: Thu Dec 20, 2018 7:57 pm It seems like the "Frenet" option doesn´t work for a path which consists of short, successive straight lines?
Of course it doesn't. Straight lines have zero curvature, and frenet-serret CS requites nonzero curvature to be defined.
3dHacker
Posts: 35
Joined: Sun Aug 08, 2021 9:15 pm

Develop a Sweep Trajectory in 3D Space

Post by 3dHacker »

I am working on an exercise of an exhaust pipe. It follows a curved path in 3 dimensional space.
exhaust.jpg
exhaust.jpg (35 KiB) Viewed 1291 times
To create the path it looks like I should be able to create two Surfaces and take their intersection to get the path.
To create the 70mm curve, all that I need is an arc. The other curve is made up of two 60mm arcs that are
tangential.

Then I found that I could not create a surface that has a boundary edge that is made up of two arcs.

I know that there are several tools that supposedly make a single bspline from several arcs but I am not having
much luck getting them to work and am not at all sure that they do what I think that I want.

So, am I going down a path that dead ends? Trying to make a BSpline curve that has the required radii doesn't'
seem likely to work very well, either. What am I missing? Is there a better way to make this kind of trajectory?
Or will FreeCAD not even sweep an Additive Pipe along a trajectory like this?

GA

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Sweep along path created by 3D-Parametric-Macro

Post by TheMarkster »

I don't think this is exactly right, but it's a start. It's hard for me to see the dimensions in the image. That's my excuse and I'm sticking to it.
Snip macro screenshot-b82d2f.png
Snip macro screenshot-b82d2f.png (80.15 KiB) Viewed 1223 times
Snip macro screenshot-c6187d.png
Snip macro screenshot-c6187d.png (83.93 KiB) Viewed 1223 times
To make the spline I made 2 sketches, one on the xz and one on the yz plane. Extruded them symmetrically in Part workbench to create curved faces, then cut one face from the other to find the intersection. I made the green subshapebinder from the intersection edge.
Attachments
exercise_742.FCStd
(159.68 KiB) Downloaded 31 times
Snip macro screenshot-1d8d8d.png
Snip macro screenshot-1d8d8d.png (54.73 KiB) Viewed 1223 times
3dHacker
Posts: 35
Joined: Sun Aug 08, 2021 9:15 pm

Re: Sweep along path created by 3D-Parametric-Macro

Post by 3dHacker »

TheMarkster,
I looked at your example and read through your process. Thank you for the suggestions.
This is leading me into areas that I have not (yet) worked with.

I experimented with something very close to what you described:
All done in one Body:
Two Sketches for the two curves on different planes.
Extrude both Sketches symmetrically (in Part)
Cut (Cutout for Object) (in Part) to expose the intersection.
New Shape Binder (Blue) (in Part Design), select the Cut (intersection) line.
Additive Pipe
And it looked quite good. But, alas, I was just throwing some arcs into the model.

I went back and tried to make it based on the dimensions that were given in the exercise.
Well, I got something. Clearly I have some reading and experimenting to do.

Again, thank you. I will be making some more tries to understand this over the next several days.

GA
Attachments
742.png
742.png (27.71 KiB) Viewed 1132 times
Post Reply