Macro HilbertCurve

Description
This macro creates an Hilbert curve wire in 2 or 3 dimensions with many iterations.

Usage
Start the macro in a FreeCAD document.

In the dialog choose the parameters for the Hilbert curve.
 * Select if the curve lay on a plane or is in the space.
 * Insert the number of the iterations . Attention! Increasing the number of iterations increases the computation time.
 * Insert length of the wire segment.

Click to create the wire or  to exit the macro.



If you clicked, you can use the just created wire to do a sweep in the part Workbench, but first of all it's better to apply a radius to the wire, or the sweep will be badly formed.



The size of the radius depends on the length chosen for the curve segments and on the shape of the profile you want to sweep. Maybe you need to take a few tries.



Script
ToolBar Icon

Macro_HilbertCurve.FCMacro