CAD Import
3 nodes
On this page 3
Read Mesh
FunctionA closed mesh read from a file as an exact solid of flat faces, OpenSCAD's import() of STL, OFF, OBJ and 3MF: corners closer than the tolerance are one corner, triangles in one plane one face, and the faces are built as Cad.Polyhedron builds them - a solid of the kernel's own kind, which the words pick faces of, a fillet rounds and STEP carries. The colours of a 3MF file's triangles are painted on their faces (Cad.Color), and triangles of different colours are never one face. A mesh that does not close round a volume is refused, saying where.
Signature
ReadMesh(path: Text, tolerance: Number, name: Text) -> Cad Model
CadModel ReadMesh(
string path,
double tolerance = 1E-06,
string name = "")Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | The file: .stl (ASCII or binary), .off, .obj or .3mf; every object of a 3MF file is one body. |
| tolerance | Number | 1E-06 | The model's tolerance, in its units: how close corners are to be one. |
| name | Text | — | What its group is called; empty for "Import". |
Returns
| result | Cad Model |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Import
- Package
- CAD
Read Shape
FunctionA flat shape read from a drawing, OpenSCAD's import() of SVG and DXF.
Signature
ReadShape -> Cad Shape
path: Text
layer: Text
DPI: Number
tolerance: NumberCadShape ReadShape(
string path,
string layer = "",
double dpi = 96,
double tolerance = 1E-06)Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | The drawing: .svg or .dxf. |
| layer | Text | — | For a DXF file, the layer to read; empty for every layer. |
| DPI | Number | 96 | For an SVG file, how many of its pixels make an inch. |
| tolerance | Number | 1E-06 | The model's tolerance, in its units. |
Returns
| result | Cad Shape |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Import
- Package
- CAD
Read Step
FunctionReads STEP and converts coordinates to the chosen target unit. Preserves free geometry and import warnings.
Signature
ReadStep -> Cad Import Result
path: Text
targetUnit: Length Unit
tolerance: NumberCadImportResult ReadStep(
string path,
LengthUnit targetUnit = LengthUnit.Millimeter,
double tolerance = 1E-06)Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | |
| targetUnit | Length Unit | Millimeter | |
| tolerance | Number | 1E-06 |
Returns
| result | Cad Import Result |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Import
- Package
- CAD