* WIP: Change the name of the app Fixes #5971 * Force release build * More renames * Fix release builds on PR * Remove alpha on home page, replace with nightly if nightly * Change appId back to dev.zoo.modeling-app after updater test failure * Cleanup towards review * Lint * Lint plus @jacebrowning's suggestion * Lint
486 KiB
486 KiB
title, excerpt, layout
title | excerpt | layout |
---|---|---|
import | Import a CAD file. | manual |
WARNING: This function is deprecated.
Import a CAD file.
DEPRECATED Prefer to use import statements.
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 Design Studio.
import(
filePath: String,
options?: ImportFormat,
): ImportedGeometry
Arguments
Name | Type | Description | Required |
---|---|---|---|
filePath |
String |
Yes | |
options |
ImportFormat |
Import format specifier | No |
Returns
ImportedGeometry
- Data for an imported geometry.
Examples
model = import("tests/inputs/cube.obj")
model = import("tests/inputs/cube.obj", { format = "obj", units = "m" })
model = import("tests/inputs/cube.gltf")
model = import("tests/inputs/cube.sldprt")
model = import("tests/inputs/cube.step")
import height, buildSketch from "common.kcl"
plane = XZ
margin = 2
s1 = buildSketch(plane, [0, 0])
s2 = buildSketch(plane, [0, height() + margin])