Macro HilbertCurve

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

Usage

 * 1) Start the macro in a FreeCAD document.
 * 2) In the dialog that opens choose the parameters for the Hilbert curve:
 * 3) * Select if the curve should be 2 dimensional:, or 3 dimensional:.
 * 4) * Specify the number of iterations . Attention! Increasing the number of iterations will also increase the computation time.
 * 5) * Specify the length of the wire segment:.
 * 6) Click  to create the wire or  to exit the macro.



You can use a Hilbert curve as the path for a Part Sweep, but it's better to apply a radius to the wire first, or the sweep will be badly formed.



Finding the right radius may requires some testing. It depends on the length of the curve segments and the shape of the profile you want to sweep.



Script
ToolBar Icon

Macro_HilbertCurve.FCMacro