Philosophical Question about Part Sweeps

Post here for help on using FreeCAD's graphical user interface (GUI).
ryansturmer
Posts: 2
Joined: Mon Apr 17, 2017 12:47 pm

Philosophical Question about Part Sweeps

Postby ryansturmer » Fri Apr 21, 2017 3:47 am

I have a sort of philosophical question about part sweeps:

Sweeps have a tremendous value to me in being able to do extrusions along a profile that change shape. I can do the same thing with a loft, but lofts don't produce planar faces where appropriate, and so it's hard to work with them. Sweeps really really do the trick, but there's a lapse I think, in my understanding of how things should work.

To me, the advantage of a sweep (in addition to getting planar faces) is the ability to specify (and parametrize) a profile, and have a changing cross-section move along that profile. The difficulty is, the way you specify a sweep with multiple cross sections is with multiple sketches, and the position of those sketches in space really matters. If am doing a sweep with a circular cross section and a square cross section, and the sweep profile is a line segment, the only sane way to think about it is to have the sketches for the 2 cross sections be at the end points of the segment. If I change the length of the segment, though, the sketches don't go with it, and so my sweep is broken, compared to my design intent, which is to have a circular cross section at one end of the segment, and a square one at the other.

Does this make sense? Has anyone else encountered this issue? What am I lacking in my understanding here?

To drive it home, here's a screenshot:

Screen Shot 2017-04-20 at 11.45.05 PM.png
Screen Shot 2017-04-20 at 11.45.05 PM.png (36.82 KiB) Viewed 62 times


This is a single segment sweep, with a hexagon as one cross section, and a circle as the other. The original profile was a line segment with a length of 1 inch. I went into the sketch and changed the length of the segment to 2" and you can see that the sweep has changed, but the cross section of the end is now extrapolated. I have to move my hexagon shape now, to the 2" mark on the profile, in order to get the sweep that I actually intend.
chrisb
Posts: 1859
Joined: Tue Mar 17, 2015 9:14 am

Re: Philosophical Question about Part Sweeps

Postby chrisb » Fri Apr 21, 2017 5:47 am

In your case you can probably use an expression for the position of your hexagon: If your line segment is a sketch it has probably a constraint defining the length. Give a name to that constraint. In the data tab of your hexagon you can use Sketch.Constraints.name_of_your_constraint as the value of the appropriate X/Y/Z Placement coordinate. If it is not orthogonal to one of the main planes you have to do some calculations using good old Pythagoras.
Don't use the Placement dialog. It doesn't support expressions yet.