Distorted in AdditiveLoft with peoperty of Ruled and Closed
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Distorted in AdditiveLoft with peoperty of Ruled and Closed
Hello everyone!
I get problem when I using AdditiveLoft with peoperty of Ruled and Closed. I create three sketch and set different placement to generate a body using AdditiveLoft. But I find the end of body is distorted. I guess it maybe algorithm problem but not sure.
First thanks if anyone can help me solve the problem.
See detail in attachment, and see screenshot below.
Also my FreeCAD is version 0.20, Windows 10 64-bit.
I get problem when I using AdditiveLoft with peoperty of Ruled and Closed. I create three sketch and set different placement to generate a body using AdditiveLoft. But I find the end of body is distorted. I guess it maybe algorithm problem but not sure.
First thanks if anyone can help me solve the problem.
See detail in attachment, and see screenshot below.
Also my FreeCAD is version 0.20, Windows 10 64-bit.
- Attachments
-
- additiveloft_distorted.FCStd
- (21.31 KiB) Downloaded 10 times
- Shalmeneser
- Veteran
- Posts: 9560
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
In wireframe view, we can see that the loft is twisting the form : you need to draw all your forms clockwise (or anti-...)
(you should always add Sketcher_ConstrainCoincident if no other constraints.)
(you should always add Sketcher_ConstrainCoincident if no other constraints.)
- Attachments
-
- additiveloft_distorted_SHALM.FCStd
- (21.13 KiB) Downloaded 10 times
-
- Capture d’écran 2022-08-05 144221.jpg (8.45 KiB) Viewed 928 times
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
Thanks for you reply very much. I create one sckech named Sketch, and copy the Geometry of Sketch using Python to Sketch001, Sketch002. And then using Python to set the Placement of those three sketch like the screenshot.Shalmeneser wrote: ↑Fri Aug 05, 2022 12:44 pm In wireframe view, we can see that the loft is twisting the form : you need to draw all your forms clockwise (or anti-...)
So I just have a question? how to check the clockwise or anti- of my sketches by Python, because I have checked the three Placement of my sketches and that is right for that along one direction.
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
Yeah, I just lazy for not using Sketcher_ConstrainCoincident, because I using Python script to create those sketch, and not more GUI handle. But I think it is OK, just only the two point of sketch in the same place, FreeCAD will create the right closed sketch shape.Shalmeneser wrote: ↑Fri Aug 05, 2022 12:44 pm (you should always add Sketcher_ConstrainCoincident if no other constraints.)
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
I just tested it with the normal loft. but there i doesn't change anything based on start position, direction of lines. And most importantly i don't have any control on the result.Shalmeneser wrote: ↑Fri Aug 05, 2022 12:44 pm In wireframe view, we can see that the loft is twisting the form : you need to draw all your forms clockwise (or anti-...)
For me there are two reasons to use a loft. when changing shape (from rectangular to triangular, round etc etc) and when i need twists.
On both properties i have any control.
- Shalmeneser
- Veteran
- Posts: 9560
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
@onekk can you help us ?
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
Not immediately, I'm not at home, so no computer to test code till tomorrow.
But Loft is delicate as you should have at least two requisite:
- same number of edges in profiles
- order of build (clockwise or better counterclockwise, as arcs are drawn in counterclockwise order)
- not crossing profiles (ie when the curve should do a "bend" sometimes it is better to add some more profiles to guide the loft.
Closed could pose some problems (in theory closed is closing start profile to end profile) so it is better to model as wire and then obtain the first and last profile and make a face, make a shell and then promote as a solid.
If you can wait till tomorrow and maybe put some code... to start from I will try to put together a working script.
Regards
Carlo D.
Post Edited
But Loft is delicate as you should have at least two requisite:
- same number of edges in profiles
- order of build (clockwise or better counterclockwise, as arcs are drawn in counterclockwise order)
- not crossing profiles (ie when the curve should do a "bend" sometimes it is better to add some more profiles to guide the loft.
Closed could pose some problems (in theory closed is closing start profile to end profile) so it is better to model as wire and then obtain the first and last profile and make a face, make a shell and then promote as a solid.
If you can wait till tomorrow and maybe put some code... to start from I will try to put together a working script.
Regards
Carlo D.
Post Edited
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
Hi everyone, I find one thing that, if I use the Sketch001 and Sketch002 to generate AdditiveLoft, the body is not distorted, and If I use the Sketch, Sketch001 and Sketch002 to generate AdditiveLoft, the body is distorted. That is strange to me. Any guy knows why?
Two sketch of screenshot is below. And attachment is detail.
Two sketch of screenshot is below. And attachment is detail.
- Attachments
-
- additiveloft_distorted_two.FCStd
- (22.65 KiB) Downloaded 9 times
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
I find the same problem in this thread: https://forum.freecadweb.org/viewtopic. ... ft#p282033.
Maybe we can get inspiration from that discuss.
Re: Distorted in AdditiveLoft with peoperty of Ruled and Closed
Probably there is some quirks in the loft operation, if you run this script program with your first file:littlecat wrote: ↑Tue Aug 09, 2022 1:42 am Hi everyone, I find one thing that, if I use the Sketch001 and Sketch002 to generate AdditiveLoft, the body is not distorted, and If I use the Sketch, Sketch001 and Sketch002 to generate AdditiveLoft, the body is distorted. That is strange to me. Any guy knows why?
Two sketch of screenshot is below. And attachment is detail.
additiveloft_distorted_two.png
The problem is in the order of the loft:
see:
Code: Select all
# makeLoft(list of wires,[solid=False,ruled=False,closed=False,maxDegree=5]) -- Create a loft shape.
loft = Part.makeLoft([wir_2, wir_1, wir_0], True, True, False, 5)
Part.show(loft, "loft")
Code: Select all
# makeLoft(list of wires,[solid=False,ruled=False,closed=False,maxDegree=5]) -- Create a loft shape.
loft = Part.makeLoft([wir_0, wir_1, wir_2], True, True, False, 5)
Part.show(loft, "loft")
- I've tried to change the order of edges, in the sketch_002 points. (I had to extract from the Content property of the sketch the lines and use Placement property to have correct points to make a proper Polygon).
- I've used Part.makeLoft as it seems similar to the AdditiveLoft of PD in results.
Why is not clear, as I've checked the order of edges, it is easily done with the polygon changing starting and ending point, (note that to make a polygon you must have first and end point coincident, to close it properly)
Hope it helps.
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/