|
|
The OpenSCAD language is more convenient to code by humans. The CSG format is a subset of SCAD that has fewer primitives. For instance, `rotate() mirror() translate() scale() resize()` in SCAD are all represented by `multmatrix()` in CSG.
|
|
|
|
|
|
The following list of OpenSCAD features from the [https://www.openscad.org/cheatsheet/](https://www.openscad.org/cheatsheet/) show what is currently supported. Note that **Supported** :
|
|
|
* Includes features that are display-only and do not affect MFiX boundaries condition (such as `color`, `$fa`, etc.).
|
|
|
* Sometimes means that the SCAD object is exported to a supported CSG object, even if the `mfix-parser` code doesn't deal with the feature directly (`rotate()` to `mulmatrix()` for example.)
|
|
|
|
|
|
The following is a WIP and will be updated as new features are added to the CSG parser.
|
|
|
|
|
|
# Key
|
|
|
:sunny: Supported (or irrelevant to exported CSG)\
|
|
|
:partly_sunny: Partially supported\
|
|
|
:thunder_cloud_rain: Unsupported
|
|
|
|
|
|
# Syntax
|
|
|
| **Feature** | **Status** |
|
|
|
| ------------|:-----------:|
|
|
|
| var | :sunny: |
|
|
|
| module | :sunny: |
|
|
|
| function | :sunny: |
|
|
|
| include | :sunny: |
|
|
|
| use | :sunny: |
|
|
|
|
|
|
# Constants
|
|
|
| **Feature** | **Status** |
|
|
|
| ------------|:----------:|
|
|
|
| undef | :sunny: |
|
|
|
| PI | :sunny: |
|
|
|
|
|
|
# Special Variables
|
|
|
| **Feature** | **Status** |
|
|
|
| ------------|:----------:|
|
|
|
| $fa | :sunny: |
|
|
|
| $fs | :sunny: |
|
|
|
| $fn | :sunny: |
|
|
|
| $t | :sunny: |
|
|
|
| $vpr | :sunny: |
|
|
|
| $vpt | :sunny: |
|
|
|
| $children | :sunny: |
|
|
|
| $preview | :sunny: |
|
|
|
|
|
|
# Modified Characters
|
|
|
| **Feature** | **Status** |
|
|
|
| ------------|:----------:|
|
|
|
| * | :sunny: |
|
|
|
| ! | :sunny: |
|
|
|
| # | :sunny: |
|
|
|
| % | :sunny: |
|
|
|
|
|
|
# 2D
|
|
|
| **Feature** | **Status** | **Note** | **Estimated Effort Left** |
|
|
|
| -------------------------- |:--------------------:|:-----------------------------|:--------------------------|
|
|
|
| circle | :sunny: | | |
|
|
|
| square | :sunny: | | |
|
|
|
| polygon | :sunny: | | |
|
|
|
| text | :thunder_cloud_rain: | creates text as a 2D obj | unknown |
|
|
|
| import | :sunny: | | |
|
|
|
| projection | :thunder_cloud_rain: | project 3D obj to xy plane | unknown |
|
|
|
|
|
|
# 3D
|
|
|
| **Feature** | **Status** | **Note** | **Estimated Effort Left** |
|
|
|
| -----------------|:--------------------:|:------------------------------- |:--------------------------------|
|
|
|
| sphere | :sunny: | | |
|
|
|
| cube | :sunny: | | |
|
|
|
| cylinder(r1, r2) | :sunny: | cone supported | |
|
|
|
| polyhedron | :sunny: | | |
|
|
|
| linear_extrude | :partly_sunny: | twist, scale unsupported | unknown |
|
|
|
| rotate_extrude | :partly_sunny: | angle unsupported | couple of days |
|
|
|
| surface | :thunder_cloud_rain: | reads Heightmap info from files | unknown |
|
|
|
|
|
|
# Transformations
|
|
|
| **Feature** | **Status** | **Note** | **Estimated Effort Left** |
|
|
|
| ------------|:--------------------:|:----------------------------------------|:------------------------- |
|
|
|
| translate | :sunny: | | |
|
|
|
| rotate | :sunny: | | |
|
|
|
| scale | :sunny: | | |
|
|
|
| resize | :thunder_cloud_rain: | modifies size to given x,y,z | unknown |
|
|
|
| mirror | :sunny: | | |
|
|
|
| multmatrix | :sunny: | | |
|
|
|
| color | :sunny: | | |
|
|
|
| offset | :thunder_cloud_rain: | new 2d outline from an existing outline | unknown |
|
|
|
| hull | :thunder_cloud_rain: | creates convex hull | unknown |
|
|
|
| minkowski | :thunder_cloud_rain: | creates minkowski sum of 2 objs | unknown |
|
|
|
|
|
|
# Boolean Operations
|
|
|
| **Feature** | **Status** |
|
|
|
| -------------|:----------:|
|
|
|
| union | :sunny: |
|
|
|
| intersection | :sunny: |
|
|
|
| difference | :sunny: |
|
|
|
|
|
|
# List Comprehensions
|
|
|
| **Feature** | **Status** |
|
|
|
| -------------|:----------:|
|
|
|
| Generate | :sunny: |
|
|
|
| Flatten | :sunny: |
|
|
|
| Conditions | :sunny: |
|
|
|
| Assignments | :sunny: |
|
|
|
|
|
|
# Flow Control
|
|
|
| **Feature** | **Status** |
|
|
|
| -----------------|:----------:|
|
|
|
| for | :sunny: |
|
|
|
| intersection_for | :sunny: |
|
|
|
| if | :sunny: |
|
|
|
| let | :sunny: |
|
|
|
|
|
|
# Type test functions
|
|
|
| **Feature** | **Status** |
|
|
|
| ------------|:----------:|
|
|
|
| is_undef | :sunny: |
|
|
|
| is_bool | :sunny: |
|
|
|
| is_num | :sunny: |
|
|
|
| is_string | :sunny: |
|
|
|
| is_list | :sunny: |
|
|
|
|
|
|
# Other
|
|
|
| **Feature** | **Status** |
|
|
|
| ------------|:----------:|
|
|
|
| echo | :sunny: |
|
|
|
| render | :sunny: |
|
|
|
| children | :sunny: |
|
|
|
| assert | :sunny: |
|
|
|
|
|
|
# Mathematical
|
|
|
| **Feature** | **Status** |
|
|
|
| ------------|:----------:|
|
|
|
| abs | :sunny: |
|
|
|
| sign | :sunny: |
|
|
|
| sin | :sunny: |
|
|
|
| cos | :sunny: |
|
|
|
| tan | :sunny: |
|
|
|
| acos | :sunny: |
|
|
|
| asin | :sunny: |
|
|
|
| atan | :sunny: |
|
|
|
| atan2 | :sunny: |
|
|
|
| floor | :sunny: |
|
|
|
| round | :sunny: |
|
|
|
| ceil | :sunny: |
|
|
|
| ln | :sunny: |
|
|
|
| len | :sunny: |
|
|
|
| let | :sunny: |
|
|
|
| log | :sunny: |
|
|
|
| pow | :sunny: |
|
|
|
| sqrt | :sunny: |
|
|
|
| exp | :sunny: |
|
|
|
| rands | :sunny: |
|
|
|
| min | :sunny: |
|
|
|
| max | :sunny: |
|
|
|
| norm | :sunny: |
|
|
|
| cross | :sunny: | |