kcl_lib::std::import

Function import

source
pub async fn import(
    _exec_state: &mut ExecState,
    args: Args,
) -> Result<KclValue, KclError>
Expand description

Import a CAD file. For formats lacking unit data (STL, OBJ, PLY), the default import unit is millimeters. Otherwise you can specify the unit by passing in the options parameter. If you import a gltf file, we will try to find the bin file and import it as well.

Import paths are relative to the current project directory. This only works in the desktop app not in browser.