Why does my loft kiink?

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!
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Why does my loft kiink?

Post by NormandC »

You've been told by a few people now that sweep is the way to go. Provided the picture you attached closely represents what you're after:
FC_crobar_swept_handrail_01.png
FC_crobar_swept_handrail_01.png (24.99 KiB) Viewed 2041 times
Note that I made this very quickly with plain old Mk. I eyeball without calculating the proper angles. It would be easier in 0.17-dev with the new sketch attachment modes.

BTW there was a missing coincident constraint in your sketch (lower right corner). I wonder if it's the cause of your loft troubles. (A lot of inappropriate zero length distance constraints too but that wouldn't affect the loft)
crobar wrote:This would be produced using 5 axis CNC wood routing!
Nice!
Attachments
test_handrail_loft_normandc1.fcstd
(53.62 KiB) Downloaded 46 times
Last edited by NormandC on Mon Apr 17, 2017 8:37 pm, edited 1 time in total.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Why does my loft kiink?

Post by NormandC »

crobar wrote:See attached, the seep results in a shape unsuitable for a stair handrail because of profile rotation
Just opened your file and noticed you used a B-spline as path. Can't you use helical sections? Then the Frenet option (which prevents profile rotation) will work.
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Why does my loft kiink?

Post by Chris_G »

Hi,
Here is what I've been able to get :
Sweep-binormal.jpeg
Sweep-binormal.jpeg (14.85 KiB) Viewed 2035 times
I don't know if it matches what you're looking for ?
It is a sweep with Binormal mode set to (0,0,-1) direction.
This mode is not accessible through the GUI, but with python.
sweep-binormal.fcstd
(52.81 KiB) Downloaded 40 times
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Why does my loft kiink?

Post by bejant »

crobar wrote:See attached, the seep results in a shape unsuitable for a stair handrail because of profile rotation
I did and see that it is different because in the attached file there are line segments tangent to the ellipses. Now I see that the desired trajectory is several inclined Arcs of Ellipses separated and connected by tangent line segments.

So... Frenet is used when the Sweep profile is moving along a Path which continuously changes in the X, Y, Z axes (as with an inclined Arc Of Ellipse) but Frenet does nothing when the Sweep is created along a selected Path that only change in two directions. In your example each Sweep along a curved portion should have Frenet ticked (or changed after) to True. Each Sweep should be a separate thing, and the factor that determines where each Sweep thing starts and ends is whether or not it lies on an inclined Arc Of Ellipse or on an inclined line segment. Examine the file posted by @NormandC.


After you create those Sweeps that define the handrail, use Part WB > Boolean Union to create a Fusion of them f you want one continuous handrail.
ArminF
Posts: 771
Joined: Fri Dec 23, 2016 12:33 pm
Location: Augsburg, Germany

Re: Why does my loft kiink?

Post by ArminF »

I noticed that some of my comments from a thread in the German forum were copied to this thread and hence some people complaint that the comments were not in English. Of course I would have wrote the in English if they were supposed to be posted here.
So, sorry for the confusion but it was not my fault!

Best regars

Armin
Wer einen Rechtschreibfehler findet, kann ihn behalten :lol:
crobar
Posts: 160
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Post by crobar »

NormandC wrote:
crobar wrote:See attached, the seep results in a shape unsuitable for a stair handrail because of profile rotation
Just opened your file and noticed you used a B-spline as path. Can't you use helical sections? Then the Frenet option (which prevents profile rotation) will work.
Yes, in fact I had instead swithed to bezier curves to do the turns, I wasn't aware of helices and will try them! Thanks for this and your earlier post. I'll try these ideas out.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Why does my loft kiink?

Post by NormandC »

crobar wrote:I wasn't aware of helices and will try them! Thanks for this and your earlier post.
Glad to help. You can create helices from the Part --> Make primitives menu, or from the icon in the toolbar.

What will be tricky is to perfectly set the pitch and height of the helices in relation to the straight sloped sections... FYI I just used Draft Move to snap the end of the Helix to the first straight line from Sketch, then did the same to snap the second sketch to the helix.
crobar
Posts: 160
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Post by crobar »

Chris_G wrote:Hi,
Here is what I've been able to get :

I don't know if it matches what you're looking for ?
It is a sweep with Binormal mode set to (0,0,-1) direction.
This mode is not accessible through the GUI, but with python.
sweep-binormal.fcstd
Having tried all the answers here, I now think this might actually be the right one, as it is this method which worked for me in salome, but how did you actually do this in python? I can't find any documentation of the using the binormal through the python API?
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Why does my loft kiink?

Post by Chris_G »

Hi,
See this : https://forum.freecadweb.org/viewtopic. ... 36#p168339
Or this little example :

Code: Select all

ps = Part.BRepOffsetAPI.MakePipeShell(sweepPath)
ps.setBiNormalMode( directionVector)
for pro in Profiles:
    ps.add( pro, False, False) # add(shape, contact, rotate_ortho )

if ps.isReady():
    ps.build()
    ps.makeSolid() # optional
    Part.show(ps.shape())
crobar
Posts: 160
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Post by crobar »

Chris_G wrote:Hi,
See this : https://forum.freecadweb.org/viewtopic. ... 36#p168339
Or this little example :

Code: Select all

ps = Part.BRepOffsetAPI.MakePipeShell(sweepPath)
ps.setBiNormalMode( directionVector)
for pro in Profiles:
    ps.add( pro, False, False) # add(shape, contact, rotate_ortho )

if ps.isReady():
    ps.build()
    ps.makeSolid() # optional
    Part.show(ps.shape())
Brilliant, thanks!
Post Reply