* updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of types docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * add types files Signed-off-by: Jess Frazelle <github@jessfraz.com> * add links Signed-off-by: Jess Frazelle <github@jessfraz.com> * better Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * uodates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
452 KiB
452 KiB
title, excerpt, layout
| title | excerpt | layout |
|---|---|---|
| import | Import a CAD file. | manual |
Import a CAD file.
For formats lacking unit data (such as STL, OBJ, or PLY files), the default unit of measurement is millimeters. Alternatively you may specify the unit by passing your desired measurement unit in the options parameter. When importing a GLTF file, the bin file will be imported as well. Import paths are relative to the current project directory. Note: The import command currently only works when using the native Modeling App.
import(file_path: String, options?: ImportFormat) -> ImportedGeometry
Arguments
| Name | Type | Description | Required |
|---|---|---|---|
file_path |
String |
Yes | |
options |
ImportFormat |
Import format specifier | No |
Returns
ImportedGeometry - Data for an imported geometry.
Examples
const model = import("tests/inputs/cube.obj")
const model = import("tests/inputs/cube.obj", { type: "obj", units: "m" })
const model = import("tests/inputs/cube.gltf")
const model = import("tests/inputs/cube.sldprt")
const model = import("tests/inputs/cube.step")