min_surf_to_solid
Creates a solid slab from a minimal surface.
Signatures
- min_surf_to_solid( curve loop, float width )
- min_surf_to_solid( curve loop, float widthUp, float widthDown )
- min_surf_to_solid( curve loop, vector dir, float width )
Details
The function constructs a minimal surface inside the (closed) curve loop and extrudes this into a solid object. Constructors (1) and (2) extrude into the surface normal direction whereas constructor (3) extruds into direction dir. Constructors (1) and (3) apply the thickness width equally into both directions while constructor (2) allows to select the thickness into each direction independently. The total width is then widthUp + widthDown.
The resolution of the minimal surface is controlled by the resolution parameter document.gamma . Note that a too small value of γ may increase calculation times for complex minimal surfaces. It is recommended to not use γ values below 2°.
Note
Depending on the shape of the loop, the resulting solid might contain self-intersecting regions. Self-intersecting solids might cause other operations to fail such as boolean operations. The current version of min_surf_to_solid does not check nor repair these but leaves it up to the user to construct non-selfintersecting geometries.
Example
curve c
for( int i = 0; i < 72; ++i )
{
float angle = i * 2PI / 72
c ->= <[ cos( angle ), sin( angle ), cos( angle * 3.0 ) ]>
}
c = c -><-
make min_surf_to_solid( c, 0.1, 0.1 )
Return value
A solid that is a slab along the minimal surface.
Parameters
- loop
-
A closed curve that defines the outline of the minimal surface.
- dir
-
Vector direction the minimal surface is extruded into.
- width
-
Width of the resulting solid slab when using constructor (1) or (3). Half of the width is applied into up and down directions.
- widthUp
-
Wall thickness distance that gets applied into the up direction, on using constructor (2). The up direction is the one that results from the right-hand sense of rotation of loop (see right hand rule ).
- widthDown
-
Wall thickness distance that gets applied into the down direction, on using constructor (2). The down direction is the opposite direction of the one that results from the right-hand sense of rotation of loop.