Why does my loft kiink?

Post here for help on using FreeCAD's graphical user interface (GUI).
crobar
Posts: 140
Joined: Fri Aug 29, 2014 1:26 pm

Why does my loft kiink?

Postby crobar » Tue Apr 11, 2017 11:59 am

Hello,

I'm trying to make a curved handrail for stairs, and playing around with the loft tool to do this as it seems the natural way. However, in my first attempt I get an odd kink in the handrail and don't really know why. Could anyone explain how I can avoid this kind of thing? Picture sown below, and fcstd file attached.

loft_kink.png
loft_kink.png (25.84 KiB) Viewed 310 times


Incidentally, what I ultimately want to achieve is http://www.thisiscarpentry.com/2011/11/ ... -handrail/

OS: Linux Mint 17.3 Rosa
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6707 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
test_handrail_loft.fcstd
(24.68 KiB) Downloaded 14 times
DeepSOIC
Posts: 4679
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Why does my loft kiink?

Postby DeepSOIC » Tue Apr 11, 2017 12:14 pm

Hi!
Similar behavior of loft has been reported before. There is not much that can be done about it. Please try Sweep instead.
crobar
Posts: 140
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Postby crobar » Tue Apr 11, 2017 1:00 pm

DeepSOIC wrote:Hi!
Similar behavior of loft has been reported before. There is not much that can be done about it. Please try Sweep instead.



I've tried sweep, and I'm pretty sure it can't work, as you cannot control the rotation of the profile during the sweep. When you sweep the handrail profile around the 180 degree turn of the path the handrail follows, the 2D profile ends up on it's side, i.e. the handrail ends up twisted 90 degrees around it's own axis (I've tried both isFrenet=True and False). Sweep will therefore only work for a circular profile.
DeepSOIC
Posts: 4679
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Why does my loft kiink?

Postby DeepSOIC » Tue Apr 11, 2017 1:27 pm

Yeah, no luck so far...

Although, I'm pretty sure people will be amazed if you build this bit of modern art instead :P
handrail-loft-sweep-fail.png
handrail-loft-sweep-fail.png (177.47 KiB) Viewed 291 times
crobar
Posts: 140
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Postby crobar » Tue Apr 11, 2017 1:48 pm

DeepSOIC wrote:Yeah, no luck so far...

Although, I'm pretty sure people will be amazed if you build this bit of modern art instead :P


I think I will struggle to get that through building control as a handrail here in the UK :D
crobar
Posts: 140
Joined: Fri Aug 29, 2014 1:26 pm

Re: Why does my loft kiink?

Postby crobar » Tue Apr 11, 2017 2:43 pm

I succeeded in doing this in salome which also uses openCASCADE, so it is possible:

Screenshott-salome.png
Screenshott-salome.png (190.95 KiB) Viewed 280 times
User avatar
microelly2
Posts: 2442
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Why does my loft kiink?

Postby microelly2 » Thu Apr 13, 2017 9:28 am

The better way thna Loft/Sweep is to interpolate a BSpline Surface over the ribs:

Code: Select all


apts=[]
for s in Gui.Selection.getSelection():

   print s.Label
   w=s.Shape.Wires[0]
   pts=w.discretize(50)
   apts.append(pts)


bs=Part.BSplineSurface()
bs.interpolate(apts)
Part.show(bs.toShape())
Attachments
bp_462.png
bp_462.png (58.52 KiB) Viewed 232 times
ArminF
Posts: 274
Joined: Fri Dec 23, 2016 12:33 pm
Location: Augsburg, Germany

Re: Why does my loft kiink?

Postby ArminF » Thu Apr 13, 2017 12:28 pm

Ich versuch grad' in 0.17 eine Skizze in zwei Ebenen zu machen und scheitere da noch kläglich. :cry:
Weiß einer wie ich das angehe?
Konkret ist die Aufgabe einen Bügel für ein Bimini (Sonnenverdeck auf einer Segelyacht) so zu biegen, daß der obere Bügel senkrecht steht, die seitlichen Kurven und Stützen aber in einem Winkel von 15° nach unten gehen.
Soll dann so ähnlich aussehen, aber eben durchgehende Rohre haben:

Bimini2.PNG
Bimini2.PNG (32.5 KiB) Viewed 211 times
Bimini1.PNG
Bimini1.PNG (16.91 KiB) Viewed 211 times


Es geht um den grün markierten Bügel und den Knich oben!

Gruß

Armin
Wer einen Rechtschreibfehler findet, kann ihn behalten :lol:
User avatar
bejant
Posts: 4125
Joined: Thu Jul 11, 2013 3:06 pm

Re: Why does my loft kiink?

Postby bejant » Thu Apr 13, 2017 2:00 pm

@crobar, I think you've made it too complicated. The plan view is a circle so the Sweep Path would be that portion of the ellipse between the inclined tangents of the handrail:
Image

You could make 3 line segments (one line segment from tangent to tangent on the ellipse plane, and another two segments from the endpoints of this segment to the midpoint of that portion of the ellipse between these points on what will be the (arc of) ellipse plane. Use Part WB to make a Face from these 3 edges (tick Planar to True), then use Part WB > Extrude (tick Make Solid to True) and Extrude the plane downwards to create a solid. Change to the Part Design WB, create a Sketch of the top face of this Extrude, and Sketcher an Arc of Ellipse on the Extrude. You can use Link To External Geometry and make the endpoints of the 3 edges lie on the Arc of Ellipse. This will be the curved portion of the Sweep Path.

You would only need to use one cross-section of the handrail profile. It would probably be easiest to correctly locate it at the end of a straight length of the handrail, then create the Sweep (tick Make Solid and Frenet to True). This should make for a smooth Sweep.

This off the top of my head so I hope that makes sense.
My Part Design tutorials on YouTube (aimed at beginners).
jmaustpc
Posts: 8097
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Why does my loft kiink?

Postby jmaustpc » Thu Apr 13, 2017 3:16 pm

crobar wrote:I succeeded in doing this in salome which also uses openCASCADE, so it is possible:

Screenshott-salome.png


Note that the OCC version used in your FreeCAD version is now very old and is also OCE. Does your Salome use the same version?

Another related tip....also there are different transition types in the sweep properties, they only apply if the path had non tangent joints.