... | @@ -12,6 +12,7 @@ We welcome IceSL users to redirect their questions about the scripting language |
... | @@ -12,6 +12,7 @@ We welcome IceSL users to redirect their questions about the scripting language |
|
1. [Vectors](#vectors)
|
|
1. [Vectors](#vectors)
|
|
2. [Matrices](#matrices)
|
|
2. [Matrices](#matrices)
|
|
3. [Constants, Trigonometric Functions and Angles](#constants)
|
|
3. [Constants, Trigonometric Functions and Angles](#constants)
|
|
|
|
|
|
4. [Shapes](#shapes)
|
|
4. [Shapes](#shapes)
|
|
1. [Primitive Shapes](#primitives)
|
|
1. [Primitive Shapes](#primitives)
|
|
2. [Centered Primitives](#centered)
|
|
2. [Centered Primitives](#centered)
|
... | @@ -20,21 +21,27 @@ We welcome IceSL users to redirect their questions about the scripting language |
... | @@ -20,21 +21,27 @@ We welcome IceSL users to redirect their questions about the scripting language |
|
1. [Progressive rendering](#progressive)
|
|
1. [Progressive rendering](#progressive)
|
|
2. [Uniform variables and file support](#uniforms)
|
|
2. [Uniform variables and file support](#uniforms)
|
|
3. [3D Textures](#3dtextures)
|
|
3. [3D Textures](#3dtextures)
|
|
|
|
|
|
5. [Transformations](#transformations)
|
|
5. [Transformations](#transformations)
|
|
1. [Magnets](#magnets)
|
|
1. [Magnets](#magnets)
|
|
|
|
|
|
6. [Operations](#operations)
|
|
6. [Operations](#operations)
|
|
1. [CSG Operations](#csg)
|
|
1. [CSG Operations](#csg)
|
|
2. [Other Operations](#otherops)
|
|
2. [Other Operations](#otherops)
|
|
|
|
|
|
7. [Shape Representation](#shaperep)
|
|
7. [Shape Representation](#shaperep)
|
|
1. [From assets](#assets)
|
|
1. [From assets](#assets)
|
|
2. [Distribute](#distribute)
|
|
2. [Distribute](#distribute)
|
|
|
|
|
|
8. [Other functionality](#otherfunc)
|
|
8. [Other functionality](#otherfunc)
|
|
1. [Printing settings](#settings)
|
|
1. [Printing settings](#settings)
|
|
2. [Variable caching](#caching)
|
|
2. [Distance field](#distfield)
|
|
3. [Tweaks](#tweaks)
|
|
3. [Variable caching](#caching)
|
|
4. [Fields](#fields)
|
|
4. [Tweaks](#tweaks)
|
|
5. [Mesh Information](#meshinfo)
|
|
5. [Fields](#fields)
|
|
6. [Miscellaneous Functions](#miscfunc)
|
|
6. [Mesh Information](#meshinfo)
|
|
|
|
7. [Miscellaneous Functions](#miscfunc)
|
|
|
|
|
|
9. [Service Mode](#servicemode)
|
|
9. [Service Mode](#servicemode)
|
|
1. [Invoking Service Mode](#invokeservicemode)
|
|
1. [Invoking Service Mode](#invokeservicemode)
|
|
2. [Service Mode functions](#servicemodefunctions)
|
|
2. [Service Mode functions](#servicemodefunctions)
|
... | @@ -479,6 +486,7 @@ The 3D texture class possesses the following methods: |
... | @@ -479,6 +486,7 @@ The 3D texture class possesses the following methods: |
|
* ```w()```: return the texture's width
|
|
* ```w()```: return the texture's width
|
|
* ```h()```: return the texture's height
|
|
* ```h()```: return the texture's height
|
|
* ```d()```: return the texture's depth
|
|
* ```d()```: return the texture's depth
|
|
|
|
* ```get(u,v,w)```: gets the value at texture coordinate ```(u,v,w)```. Values of each component are in the range $`[0-1]`$.
|
|
* ```set(u,v,w,val)```: sets the value ```val``` at texture coordinate ```(u,v,w)```. ```val``` is a vector where each component must be in the range $`[0-1]`$. If the texture type is luminance (i.e., one channel texture), the second and third components of ```val``` are ignored.
|
|
* ```set(u,v,w,val)```: sets the value ```val``` at texture coordinate ```(u,v,w)```. ```val``` is a vector where each component must be in the range $`[0-1]`$. If the texture type is luminance (i.e., one channel texture), the second and third components of ```val``` are ignored.
|
|
|
|
|
|
The following example shows a 1-channel 3D texture created programmatically and used as input in an implicit. Two solid cubes (one on each corner) made of the value ```-1.0``` are drawn into the texture while the rest is left at value ```10.0```. The implicit maps each point of the implicit area to a point of the texture repeated twice.
|
|
The following example shows a 1-channel 3D texture created programmatically and used as input in an implicit. Two solid cubes (one on each corner) made of the value ```-1.0``` are drawn into the texture while the rest is left at value ```10.0```. The implicit maps each point of the implicit area to a point of the texture repeated twice.
|
... | @@ -1025,7 +1033,7 @@ set_setting_value('z_layer_height_mm', { [0.0]=0.2, [5]=0.3 }) |
... | @@ -1025,7 +1033,7 @@ set_setting_value('z_layer_height_mm', { [0.0]=0.2, [5]=0.3 }) |
|
|
|
|
|
Sets the printing parameter ```setting``` as a _field_ that extends from ```boxMin``` to ```boxMax``` with values from ```tex3d```. Recall that individual values in textures are in the $`[0-1]`$ range, thus they are interpreted according to the setting's minimum and maximum values (e.g, 0.0 could mean no infill or zero degrees, and 1.0 could mean fully infilled or 360 degrees respectively).
|
|
Sets the printing parameter ```setting``` as a _field_ that extends from ```boxMin``` to ```boxMax``` with values from ```tex3d```. Recall that individual values in textures are in the $`[0-1]`$ range, thus they are interpreted according to the setting's minimum and maximum values (e.g, 0.0 could mean no infill or zero degrees, and 1.0 could mean fully infilled or 360 degrees respectively).
|
|
* ```setting```: Internal name of the printing setting to change
|
|
* ```setting```: Internal name of the printing setting to change
|
|
* ```tex3d```: Value of the field as a 3d texture.
|
|
* ```tex3d```: Value of the field as a 3d texture
|
|
* ```boxMin,boxMax```: Field extent
|
|
* ```boxMin,boxMax```: Field extent
|
|
|
|
|
|
<table>
|
|
<table>
|
... | @@ -1065,6 +1073,13 @@ set_setting_value('infill_percentage_0', density, box:min_corner(), box:max_corn |
... | @@ -1065,6 +1073,13 @@ set_setting_value('infill_percentage_0', density, box:min_corner(), box:max_corn |
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
|
|
|
|
|
|
### Distance field <a name="distfield"></a>
|
|
|
|
|
|
|
|
```texture3d_distance_field(shape)```
|
|
|
|
|
|
|
|
Calculates a distance field based on the geometry of ```shape``` as a 3D texture where its coordinates correspond to positions in the bounding box volume of ```shape```. Each value of the computed distance field (i.e., the 3D texture) is in the range $`[0-1]`$ where `1` means the position is on the surface of ```shape``` or beyond (i.e., hollow). Positions inside ```shape``` (i.e., solid) decrease from `1` to `0` as the distance to the surface increases.
|
|
|
|
* ```shape```: Shape to calculate the distance field
|
|
|
|
|
|
### Variable caching <a name="caching"></a>
|
|
### Variable caching <a name="caching"></a>
|
|
|
|
|
|
It is possible to turn on/off variable caching in IceSL with the system variable ```enable_variable_cache```. Variable caching is useful when editing a script that constructs an object or preforms a calculation that is CPU intensive (i.e. consumes significant time).
|
|
It is possible to turn on/off variable caching in IceSL with the system variable ```enable_variable_cache```. Variable caching is useful when editing a script that constructs an object or preforms a calculation that is CPU intensive (i.e. consumes significant time).
|
... | | ... | |