Complex curved shapes with FreeCAD - Sweep along two rails with Sketcher, Part and Python

A place to share learning material: written tutorials, videos, etc.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
j8sr0230
Posts: 140
Joined: Thu Apr 07, 2022 8:59 am
Location: Chemnitz
Contact:

Re: Complex curved shapes with FreeCAD - Sweep along two rails with Sketcher, Part and Python

Post by j8sr0230 »

Thank you! This technique is not only suitable for variable profile thicknesses. Basically, all dimensions can be adapted by a B-spline profile. This also allows, for example, a continuously variable fillet radius of a cross-section.
Codelink on GitHub: https://github.com/j8sr0230/codelink
Codelink on PiPy: https://pypi.org/project/codelink/
FreeCAD Nodes Workbench on GitHub: https://github.com/j8sr0230/Nodes
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Complex curved shapes with FreeCAD - Sweep along two rails with Sketcher, Part and Python

Post by hammax »

... please have a look at CurvedShapesWB => a similar intention like yours.
https://forum.freecadweb.org/viewtopic.php?t=36989
It seems to have some trouble with FC.20 (or it's me? => I had to do workarounds by Ruled_Surface).
But both tools could learn from each other.

CurvedShape.PNG
CurvedShape.PNG (18.68 KiB) Viewed 1462 times
Attachments
CurvedShapeTest.FCStd
FC.20
(21.28 KiB) Downloaded 62 times
User avatar
j8sr0230
Posts: 140
Joined: Thu Apr 07, 2022 8:59 am
Location: Chemnitz
Contact:

Re: Complex curved shapes with FreeCAD - Sweep along two rails with Sketcher, Part and Python

Post by j8sr0230 »

Yes, that is correct. In fact, the Curved Path Array command from the Curved Shapes WB is great and was my main inspiration for the macros presented - appreciation to the developer of this WB. However, according to the documentation, "the hullcurves should lie on or parallel to the XY- XZ- or YZ- plane". If I understand this correctly, for example, a parametric bench like the one in the following figure cannot be created with the Curved Shapes WB commands. With the help of the parameter mapping, the profile can not only be scaled, but also changed in its shape, as can be seen in the picture.
Parametric_bench.png
Parametric_bench.png (493.86 KiB) Viewed 1431 times
Codelink on GitHub: https://github.com/j8sr0230/codelink
Codelink on PiPy: https://pypi.org/project/codelink/
FreeCAD Nodes Workbench on GitHub: https://github.com/j8sr0230/Nodes
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Complex curved shapes with FreeCAD - Sweep along two rails with Sketcher, Part and Python

Post by hammax »

... a front fan (with no mathematical base - only by eye and feeling) showing the potential of this tool in a technical view.
With blade twist by placement angle (not yet velocity triangles !) on additional CurvesWB profile tool.
Having some doubt, that the result of blade thickness macro has parametric effect after editing the curve ???
The CurvedShape tool does it better, but there is no "circular alignment" of the profiles possible.
The trick to use birail Bspline control point positions is very useful.

CurvedShape_4.PNG
CurvedShape_4.PNG (56.31 KiB) Viewed 1290 times
Attachments
Profile_parameter_mapping_3.FCStd
FC.20
(65.92 KiB) Downloaded 54 times
Post Reply