... | ... | @@ -339,7 +339,7 @@ IceSL by default progressively renders implicits, consequently all the implicit' |
|
|
* ```shape```: output from either the ```implicit_*``` or ```to_voxel_*``` functions.
|
|
|
* ```bool```: either ```true``` or ```false```
|
|
|
|
|
|
This setting must be set right after the implicit/voxels creation. This is because IceSL clones a shape whenever it is transformed and/or reassigned to another variable. Each clone drags with it the '''current''' value of this setting.
|
|
|
This setting must be set right after the implicit/voxels creation. This is because IceSL clones a shape whenever it is transformed and/or reassigned to another variable. Each clone drags with it the _current_ value of this setting.
|
|
|
|
|
|
### Uniform variables and file support
|
|
|
|
... | ... | @@ -476,7 +476,7 @@ emit(imp) |
|
|
</table>
|
|
|
|
|
|
# Transformations
|
|
|
This section deals with linear transformations. IceSL offers functions to calculate matrices of transformations. To apply a transformation, a transformation matrix is multiplied with a shape. In order to combine more than one transformation, the result of successive multiplications of transformation matrices may also be multiplied with a shape. All applications of transformations should be consistent with a [http://mathworld.wolfram.com/Right-HandedCoordinateSystem.html right-handed coordinate system]. This means the '''rightmost transformation''' in a combination '''takes precedence'''.
|
|
|
This section deals with linear transformations. IceSL offers functions to calculate matrices of transformations. To apply a transformation, a transformation matrix is multiplied with a shape. In order to combine more than one transformation, the result of successive multiplications of transformation matrices may also be multiplied with a shape. All applications of transformations should be consistent with a [http://mathworld.wolfram.com/Right-HandedCoordinateSystem.html right-handed coordinate system]. This means the *rightmost transformation* in a combination *takes precedence*.
|
|
|
|
|
|
```translate(dx,dy,dz)```
|
|
|
|
... | ... | @@ -688,7 +688,7 @@ emit(translate(15,0,0) * dilate(mesh,0.5)) |
|
|
|
|
|
```linear_offset(mesh,direction,offset)```
|
|
|
|
|
|
Creates a linear offset of ```mesh``` in the direction ```direction``` by factor ```offset```. Depending on the sign of ```offset```, the offset either goes inwards (i.e. negative sign) or outwards (i.e. positive sign). Only works with meshes with connectivity information, call ```merge_vertices``` when such information does not exist (e.g. '''stl''' meshes).
|
|
|
Creates a linear offset of ```mesh``` in the direction ```direction``` by factor ```offset```. Depending on the sign of ```offset```, the offset either goes inwards (i.e. negative sign) or outwards (i.e. positive sign). Only works with meshes with connectivity information, call ```merge_vertices``` when such information does not exist (e.g. _stl_ meshes).
|
|
|
* ```mesh```: input mesh
|
|
|
* ```direction```: offset direction
|
|
|
* ```offset```: offset factor
|
... | ... | @@ -746,7 +746,7 @@ In a distance field, sets the threshold to classify voxels as empty/solid whenev |
|
|
|
|
|
```smooth_voxels(voxShape, windowSize)```
|
|
|
|
|
|
Smooths the voxel shape ```voxShape``` using a [trilinear interpolation](https://en.wikipedia.org/wiki/Trilinear_interpolation) with a windows size of ```windowSize```. This functions '''does not''' return a shape, instead it modifies the shape specified on the first parameter.
|
|
|
Smooths the voxel shape ```voxShape``` using a [trilinear interpolation](https://en.wikipedia.org/wiki/Trilinear_interpolation) with a windows size of ```windowSize```. This functions _does not_ return a shape, instead it modifies the shape specified on the first parameter.
|
|
|
|
|
|
* ```voxShape```: input shape. Only supports voxels
|
|
|
* ```windowSize```: interpolation 3D window size
|
... | ... | @@ -790,12 +790,12 @@ Extracts contours out of a SVG file. Returns a table of ```SVGContour``` objects |
|
|
* ```file```: input svg file
|
|
|
* ```dpi```: dots per inch. Use 90 for Inkscape files
|
|
|
The ```SVGContour``` object has the following members:
|
|
|
* ```outline```: The contour '''(table)'''
|
|
|
* ```fill ```: fill color for the contour '''(triplet)'''
|
|
|
* ```stroke```: stroke color for the contour '''(triplet)'''
|
|
|
* ```strokeWidth```: stroke width for the contour '''(num)'''
|
|
|
* ```hasFill```: contour is color-filled '''(bool)'''
|
|
|
* ```hasStroke```: contour is color-bordered '''(bool)'''
|
|
|
* ```outline```: The contour _(table)_
|
|
|
* ```fill ```: fill color for the contour _(triplet)_
|
|
|
* ```stroke```: stroke color for the contour _(triplet)_
|
|
|
* ```strokeWidth```: stroke width for the contour _(num)_
|
|
|
* ```hasFill```: contour is color-filled _(bool)_
|
|
|
* ```hasStroke```: contour is color-bordered _(bool)_
|
|
|
|
|
|
<table>
|
|
|
<tr>
|
... | ... | @@ -899,7 +899,7 @@ Adds setting ```internal_name``` with ```description```, minimum value ```minVal |
|
|
* ```description``` : description of setting (shown in UI)
|
|
|
* ```minValue``` : minimal value in case of a number setting (i.e., ```add_setting```)
|
|
|
* ```maxValue``` : maximum value in case of a number setting (i.e., ```add_setting```)
|
|
|
* ```tooltip``` : tooltip help to show in IceSL's UI. This parameter is '''optional'''.
|
|
|
* ```tooltip``` : tooltip help to show in IceSL's UI. This parameter is _optional_.
|
|
|
|
|
|
|
|
|
The setting's value can then be queried in file ```printer.lua``` of the printer profile by using the setting's ```internal_name```.
|
... | ... | @@ -1062,12 +1062,12 @@ emit(union(shape,merge(cubes))) |
|
|
Returns the bounding box of ```shape``` as an object ```AAB```.
|
|
|
* ```shape```: Input shape
|
|
|
The ```AAB``` object has the following members:
|
|
|
* ```min_corner```: Minimum corner of the bounding box '''(vector)'''
|
|
|
* ```max_corner```: Maximum corner of the bounding box '''(vector)'''
|
|
|
* ```center```: Center of the bounding box '''(vector)'''
|
|
|
* ```extent```: Dimensions of the bounding box '''(vector)'''
|
|
|
* ```empty```: Boolean value indicating whether the bounding box is '''(bool)'''
|
|
|
* ```enlarge(mm)```: Enlarges the box by ```mm``` millimeters '''(method)'''
|
|
|
* ```min_corner```: Minimum corner of the bounding box _(vector)_
|
|
|
* ```max_corner```: Maximum corner of the bounding box _(vector)_
|
|
|
* ```center```: Center of the bounding box _(vector)_
|
|
|
* ```extent```: Dimensions of the bounding box _(vector)_
|
|
|
* ```empty```: Boolean value indicating whether the bounding box is _(bool)_
|
|
|
* ```enlarge(mm)```: Enlarges the box by ```mm``` millimeters _(method)_
|
|
|
|
|
|
```mesh_vertices(mesh)```
|
|
|
|
... | ... | @@ -1111,4 +1111,4 @@ Suspends execution of IceSL by ```ms``` milliseconds. |
|
|
|
|
|
Saves the shape ```shape``` in file ```filename```
|
|
|
* ```shape```: shape to save
|
|
|
* ```filename```: destination file to save the shape. Supports '''stl''' and '''obj''' extensions |
|
|
\ No newline at end of file |
|
|
* ```filename```: destination file to save the shape. Supports _stl_ and _obj_ extensions |
|
|
\ No newline at end of file |