Why does my loft kiink?

Post here for help on using FreeCAD's graphical user interface (GUI).
User avatar
NormandC
Posts: 12266
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Why does my loft kiink?

Postby NormandC » Mon Apr 17, 2017 8:33 pm

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 207 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 6 times
Last edited by NormandC on Mon Apr 17, 2017 8:37 pm, edited 1 time in total.
User avatar
NormandC
Posts: 12266
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Why does my loft kiink?

Postby NormandC » Mon Apr 17, 2017 8:36 pm

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
Posts: 382
Joined: Tue Dec 31, 2013 4:10 pm
Location: France

Re: Why does my loft kiink?

Postby Chris_G » Mon Apr 17, 2017 8:54 pm

Hi,
Here is what I've been able to get :
Sweep-binormal.jpeg
Sweep-binormal.jpeg (14.85 KiB) Viewed 201 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 5 times
User avatar
bejant
Posts: 4125
Joined: Thu Jul 11, 2013 3:06 pm

Re: Why does my loft kiink?

Postby bejant » Tue Apr 18, 2017 4:46 am

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.
My Part Design tutorials on YouTube (aimed at beginners).
ArminF
Posts: 274
Joined: Fri Dec 23, 2016 12:33 pm
Location: Augsburg, Germany

Re: Why does my loft kiink?

Postby ArminF » Tue Apr 18, 2017 7:59 am

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: 142
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Postby crobar » Tue Apr 18, 2017 9:48 pm

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
Posts: 12266
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Why does my loft kiink?

Postby NormandC » Wed Apr 19, 2017 1:41 am

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: 142
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Postby crobar » Thu Apr 20, 2017 9:41 pm

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
Posts: 382
Joined: Tue Dec 31, 2013 4:10 pm
Location: France

Re: Why does my loft kiink?

Postby Chris_G » Fri Apr 21, 2017 7:00 am

Hi,
See this : https://forum.freecadweb.org/viewtopic.php?f=22&t=21636#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: 142
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Postby crobar » Fri Apr 21, 2017 7:22 am

Chris_G wrote:Hi,
See this : https://forum.freecadweb.org/viewtopic.php?f=22&t=21636#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!