Skip to main content

brep_kernel/feature_pipeline/features/
import3d.rs

1//! IMPORT3D — Import 3D Model (STEP). Ported from the retired `Import3dModelFeature`.
2//!
3//! Three headless sources, tried in order:
4//! 0. **`inputParams.nativeBrep`** — a native [`crate::snapshot_solids`] payload
5//!    (`io/snapshot.rs`): the exact solids of an earlier import, already carrying their final
6//!    IMPORT3D names. Tried FIRST and EXCLUSIVE — a feature carrying it must not also carry
7//!    `stepText`/`igesText`/`xtText`/`xtBinary` (an error, not a precedence puzzle). The solids
8//!    register VERBATIM under their stored names: re-deriving them would break every
9//!    scene-metadata record and every constraint keyed to a face name. This is the lane a
10//!    STEP-assembly part document rides on, and the reason the snapshot container is a DURABLE
11//!    format, not a cache (§6 there, and the `io/snapshot.rs` module doc).
12//! 1. **`inputParams.stepText`** — the raw ISO-10303-21 document, baked in by the
13//!    toolbar Import lane ([`crate`]'s host: `EngineState::import_step_feature`).
14//!    Runs the exact Rust STEP importer
15//!    ([`crate::import_step_with_appearance`] — the colour-carrying form).
16//! 2. **`persistentData.importCache`** (`kind == "step-brep"`) — SUPERSEDED by
17//!    `nativeBrep`. The JS-era persisted EXACT BREP records of a previous import
18//!    (`serializeBrepSolid` was the serde `BrepSolid` JSON, so records deserialize
19//!    directly) — verbose and unversioned. NOTHING in the Rust tree writes it; the
20//!    reader stays only so a JS-era saved model still opens. New payloads go in
21//!    `nativeBrep`.
22//!
23//! Name fidelity (contract rule 2, byte-matching `Import3dModelFeature`):
24//! - Body names (`importedSolidNames`): a single body keeps the feature name;
25//!   several get `{feature}_SOLID_{N}` with N 1-based, zero-padded to
26//!   `max(2, digits(count))`.
27//! - Faces (`importedBodyFaceNames` / the single-body fallback): a MULTI-body
28//!   import names EVERY face `{bodyName}_Face_{f}` positionally (shell/face
29//!   order) so faces stay unique across bodies; a SINGLE body prepends the
30//!   (unique) feature name — `{feature}_{stepName}`, or `{feature}_Face_{f}` where
31//!   the STEP file left the face unnamed — so two separate imports never share a
32//!   face name (the cross-solid name-uniqueness guard's collision class). Edge
33//!   names re-derive from the face names, so the derived edges are namespaced too.
34//!
35//! COLOUR rides the same names. What a STEP file's presentation entities assign
36//! (`io/step_import/styles.rs`) is stamped here as a `{"color": "#RRGGBB"}`
37//! scene-metadata record on the FINAL body/face names — see `io/appearance.rs`
38//! for the convention, [`stamp_appearance`] for the write, and
39//! [`native_import_payload_with_appearance`] for the lane that seals it into a
40//! part payload. The stamp is a NON-overwriting merge, so a colour edited in the
41//! caller's info panel survives a history replay.
42//!
43//! ONE convention, ONE implementation: [`stamp_imported_names`] holds it, and
44//! every lane that names imported bodies goes through it — the live import lanes
45//! (via [`add_named_bodies`]) and the payload encoder [`native_import_payload`].
46//! Names are stamped ONCE, at import, and then frozen in the payload; a later
47//! change here does NOT retro-rename already-imported parts, which is the point
48//! (a constraint keyed to a face name survives reload).
49//!
50//! The failed-import base64 retry lane (`persistentData.failedImportFile`) is
51//! not yet migrated — it errors loudly rather than silently skipping.
52
53use crate::feature_pipeline::features::common;
54use crate::feature_pipeline::{
55    scene_metadata, AddedSolid, FeatureContext, FeatureRefusal, FeatureResult,
56};
57use crate::{
58    import_iges_report, import_step_bodies, restore_solids, BodyAppearance, BrepSolid, ImportedColor,
59    StepBodyError, COLOR_METADATA_KEY,
60};
61
62pub fn execute(ctx: &FeatureContext) -> FeatureResult {
63    match build(ctx) {
64        Ok(result) => result,
65        Err(refusal) => ctx.fail(refusal),
66    }
67}
68
69/// `FeatureRefusal`, not `String`: the STEP lane's shell-closure gate refuses a
70/// body TYPED (`RefusalClass::UnsoundResult { defect: VectorArea }`,
71/// `io/step_import/builder/closure.rs`), and the class has to reach
72/// `FeatureResult::refusal` for the app to show it as more than text. Every
73/// other failure here is still text, and `?` accepts both.
74fn build(ctx: &FeatureContext) -> Result<FeatureResult, FeatureRefusal> {
75    let feature_name = if ctx.id.is_empty() {
76        "IMPORT3D".to_string()
77    } else {
78        ctx.id.clone()
79    };
80
81    // 0. Native payload — the exact solids of an earlier import, names frozen in.
82    //    EXCLUSIVE by design (see the module doc): a document carrying both this
83    //    and a text source is malformed, and answering it with a precedence rule
84    //    would silently drop one of the two. Keyed on PRESENCE, not on a
85    //    successful `as_str`, so a non-string `nativeBrep` errors here instead of
86    //    falling through to a different source.
87    if let Some(native) = ctx.param("nativeBrep").filter(|value| !value.is_null()) {
88        if ["stepText", "igesText", "xtText", "xtBinary"].iter().any(|key| ctx.param(key).is_some()) {
89            return Err(
90                "import3d: `nativeBrep` is exclusive — a feature carrying it must not also carry `stepText`/`igesText`/`xtText`/`xtBinary`"
91                    .into(),
92            );
93        }
94        let payload = native
95            .as_str()
96            .ok_or("import3d: param `nativeBrep` must be a base64 snapshot string")?;
97        return Ok(restore_native_bodies(ctx, payload)?);
98    }
99
100    // 1. Fresh STEP text (baked into `stepText` by the toolbar Import lane).
101    if let Some(step_text) = ctx.param("stepText").and_then(|v| v.as_str()) {
102        if step_text.contains("ISO-10303-21") {
103            let imported = import_step_bodies(step_text).map_err(|error| match error {
104                StepBodyError::Text(text) => {
105                    FeatureRefusal::Text(format!("import3d: STEP import failed: {text}"))
106                }
107                StepBodyError::Refused(refusal) => FeatureRefusal::Typed(
108                    refusal.with_message(|message| format!("import3d: STEP import refused: {message}")),
109                ),
110            })?;
111            if imported.solids.is_empty() {
112                return Err("import3d: STEP file contained no importable solids".into());
113            }
114            let mut result = add_named_bodies(ctx, imported.solids, &imported.appearances, &feature_name);
115            // The closure gate's approximations ride on the feature TYPED,
116            // re-keyed from the file index to the scene name the body was
117            // just given, so the app and the case runner can name the body.
118            for (index, mut approximation) in imported.approximations {
119                if let Some(added) = result.added.get(index) {
120                    approximation.body = added.name.clone();
121                    approximation.message =
122                        format!("{}: {}", added.name, approximation.message);
123                }
124                result.approximations.push(approximation);
125            }
126            return Ok(result);
127        }
128        return Err(
129            "import3d: only STEP (ISO-10303-21) files are supported (STL/3MF mesh import was removed)"
130                .into(),
131        );
132    }
133
134    // 1b. Fresh IGES text (baked into `igesText` by the toolbar Import lane).
135    if let Some(iges_text) = ctx.param("igesText").and_then(|v| v.as_str()) {
136        // The file's colours (314 or the directory colour number) are stamped
137        // as the STEP branch stamps its styled colours.
138        let report = import_iges_report(iges_text)
139            .map_err(|error| format!("import3d: IGES import failed: {error}"))?;
140        if report.solids.is_empty() {
141            return Err("import3d: IGES file contained no importable solids".into());
142        }
143        return Ok(add_named_bodies(ctx, report.solids, &report.appearances, &feature_name));
144    }
145
146    // 1c. Fresh Parasolid text (baked into `xtText` by the toolbar Import lane).
147    if let Some(xt_text) = ctx.param("xtText").and_then(|v| v.as_str()) {
148        let report = crate::parasolid::import_parasolid_report(xt_text)
149            .map_err(|error| format!("import3d: Parasolid import failed: {error}"))?;
150        if report.solids.is_empty() {
151            return Err("import3d: Parasolid file contained no importable solids".into());
152        }
153        return Ok(add_named_bodies(ctx, report.solids, &report.appearances, &feature_name));
154    }
155
156    // 1d. Fresh binary Parasolid (`.x_b`, or the body partition a SolidWorks
157    //     part embeds), as base64 in `xtBinary`.
158    if let Some(encoded) = ctx.param("xtBinary").filter(|value| !value.is_null()) {
159        let encoded = encoded.as_str().ok_or("import3d: param `xtBinary` must be a base64 string")?;
160        let bytes = crate::snapshot::base64_decode(encoded)
161            .map_err(|error| format!("import3d: param `xtBinary` is not base64: {}", error.trim_start_matches("snapshot: ")))?;
162        let report = crate::parasolid::import_parasolid_bytes_report(&bytes)
163            .map_err(|error| format!("import3d: Parasolid import failed: {error}"))?;
164        if report.solids.is_empty() {
165            return Err("import3d: Parasolid file contained no importable solids".into());
166        }
167        return Ok(add_named_bodies(ctx, report.solids, &report.appearances, &feature_name));
168    }
169
170    // 2. Persisted exact-BREP records from a previous import.
171    let cache = ctx.persistent.get("importCache");
172    if let Some(cache) = cache {
173        let kind = cache.get("kind").and_then(|v| v.as_str()).unwrap_or("");
174        if kind == "step-brep" {
175            let records = cache
176                .get("kernelSolidRecords")
177                .and_then(|v| v.as_array())
178                .ok_or("import3d: importCache has no kernelSolidRecords")?;
179            let mut solids = Vec::with_capacity(records.len());
180            for (index, record) in records.iter().enumerate() {
181                let solid: BrepSolid = serde_json::from_value(record.clone()).map_err(|error| {
182                    format!("import3d: kernel record {index} failed to deserialize: {error}")
183                })?;
184                solids.push(solid);
185            }
186            if solids.is_empty() {
187                return Err("import3d: importCache is empty".into());
188            }
189            return Ok(add_named_bodies(ctx, solids, &[], &feature_name));
190        }
191        return Err(format!(
192            "import3d: unsupported importCache kind '{kind}' (only 'step-brep')"
193        )
194        .into());
195    }
196
197    // A failed-import retry payload without a cache is a not-yet-migrated lane.
198    if ctx.persistent.get("failedImportFile").is_some() {
199        return Err(
200            "import3d: the failed-import base64 retry lane is not yet migrated to the Rust pipeline"
201                .into(),
202        );
203    }
204
205    Err(
206        "import3d: no model data (no `nativeBrep`/`stepText` param and no `importCache`)".into(),
207    )
208}
209
210/// Restore a native payload and register its solids VERBATIM — the `nativeBrep`
211/// lane. Nothing about the names is re-derived: they were stamped once, when the
212/// geometry was first imported, and every scene-metadata record and every
213/// constraint attached to a face is keyed to exactly those strings. (This is
214/// `component::create_component`'s phase 2 for the same reason — see its module
215/// doc: "do not `fix` this by routing members through `register_added`".)
216///
217/// The payload's captured metadata records are merged back into the scene store
218/// UN-namespaced, exactly as they were captured: an IMPORT3D feature is not a
219/// component boundary, so there is no instance prefix to apply. The ACOMP lane
220/// namespaces on insert if this document is later used as a part.
221fn restore_native_bodies(ctx: &FeatureContext, payload: &str) -> Result<FeatureResult, String> {
222    let restored = restore_solids(payload)
223        .map_err(|error| format!("import3d: native payload did not decode: {error}"))?;
224    if restored.solids.is_empty() {
225        return Err("import3d: native payload contained no solids".into());
226    }
227    let mut result = FeatureResult::empty(ctx.id.clone(), ctx.feature_type.clone());
228    for solid in restored.solids {
229        let mut body = solid.solid;
230        // Exactly analytic faces in a foreign parametrisation take the
231        // kernel's canonical one (`analytic_surface/canonical.rs`).
232        if crate::canonical_carriers_enabled() {
233            let report = crate::canonicalise_carriers(&mut body);
234            if crate::profile::profile_enabled() && !report.rewritten.is_empty() {
235                profile_line!("import3d.canonical_carriers solid={} rewritten={:?}", solid.name, report.rewritten);
236            }
237        }
238        // A payload encoded straight from `snapshot_solids` (not through
239        // `native_import_payload`) can carry faces the import never named;
240        // those get the import's positional convention under the stored body
241        // name, deterministically from the frozen payload, so picks and CAM
242        // targets resolve and stay the same across save and reopen. Every
243        // name the payload does carry stays verbatim.
244        name_unnamed_native_faces(&mut body, &solid.name);
245        result.added.push(register_verbatim(body, &solid.name));
246    }
247    // Overwriting: the payload's records ARE the part's metadata. The pipeline's
248    // own `sourceFeatureId` seed runs after this feature returns and is
249    // NON-overwriting, so a face keeps the producing-feature id it was imported
250    // with rather than picking up this feature's.
251    for (name, record) in restored.metadata {
252        scene_metadata::merge_record(&name, &record, true);
253    }
254    Ok(result)
255}
256
257/// Name every face of a restored native body that arrived unnamed
258/// `{body}_Face_{f}` (shell / face order, the import's positional fallback),
259/// then re-derive the TOPOLOGY edge names (`{faceA}|{faceB}[n]`, or none) so
260/// the edges along them are named too; an edge the payload named otherwise is
261/// kept. A body whose faces and edges are all named is untouched. Returns
262/// whether anything was named.
263fn name_unnamed_native_faces(solid: &mut BrepSolid, body_name: &str) -> bool {
264    let unnamed = |name: &Option<String>| name.as_deref().is_none_or(|n| n.trim().is_empty());
265    let mut named_any = false;
266    let mut face_index = 0usize;
267    for shell in &mut solid.shells {
268        for face in &mut shell.faces {
269            if unnamed(&face.name) {
270                face.name = Some(format!("{body_name}_Face_{face_index}"));
271                named_any = true;
272            }
273            face_index += 1;
274        }
275    }
276    let edges_unnamed = solid.edges.iter().any(|e| !e.degenerate && unnamed(&e.name));
277    if named_any || edges_unnamed {
278        common::stamp_derived_edge_names(solid);
279    }
280    named_any || edges_unnamed
281}
282
283/// [`common::register_added`] WITHOUT its two name-deriving passes: collect the
284/// names the solid already carries and make it scene-resident.
285///
286/// The container groups are EMPTY, and that is the right answer rather than a
287/// stub: a group is the un-keyed alias a PROFILE-SWEPT feature publishes for its
288/// per-loop face families (`{cap_base}_START` standing for every
289/// `{cap_base}:L{id}_START` — see [`common::register_added_grouped`]). Imported
290/// geometry has no sketch loops behind it, so there is no family to alias; its
291/// names arrived stamped from outside and are already the final, unique ones.
292fn register_verbatim(solid: BrepSolid, name: &str) -> AddedSolid {
293    let face_names = common::collect_face_names(&solid);
294    let edge_names = common::collect_edge_names(&solid);
295    let handle = crate::register_solid_value(solid);
296    AddedSolid {
297        handle,
298        name: name.to_string(),
299        face_names,
300        edge_names,
301        face_groups: Vec::new(),
302        edge_groups: Vec::new(),
303    }
304}
305
306/// Stamp the established naming convention onto the imported bodies, register
307/// them, and stamp whatever COLOUR the file carried onto those same names.
308///
309/// `appearances` is parallel to `solids` (see [`crate::BodyAppearance`]); pass
310/// `&[]` from a lane whose format has no colour, which stamps nothing.
311fn add_named_bodies(
312    ctx: &FeatureContext,
313    mut solids: Vec<BrepSolid>,
314    appearances: &[BodyAppearance],
315    feature_name: &str,
316) -> FeatureResult {
317    let body_names = stamp_imported_names(&mut solids, feature_name);
318    let mut result = FeatureResult::empty(ctx.id.clone(), ctx.feature_type.clone());
319    for (index, (solid, body_name)) in solids.into_iter().zip(body_names).enumerate() {
320        // Colour is stamped AFTER `register_added`, which is where the names
321        // become final (it dedupes face names before deriving the edge names).
322        let added = common::register_added(solid, &body_name);
323        if let Some(appearance) = appearances.get(index) {
324            stamp_appearance(&added.name, &added.face_names, appearance);
325        }
326        result.added.push(added);
327    }
328    result
329}
330
331/// Write an imported body's colours into the scene-metadata store, keyed by the
332/// FINAL names — the one place the `{"color": "#RRGGBB"}` convention of
333/// `io/appearance.rs` is written.
334///
335/// `face_names` is `(face_id, name)` in shell/face order
336/// ([`common::collect_face_names`]), the same order `appearance.faces` is
337/// indexed by. A length disagreement means the two walks have drifted, so
338/// nothing per-face is stamped rather than colouring the wrong faces — the body
339/// colour, which is not positional, still lands.
340///
341/// Merged NON-overwriting: a history replay re-runs this feature, and a colour
342/// the user has since edited in the info panel must survive it.
343fn stamp_appearance(body_name: &str, face_names: &[(u64, String)], appearance: &BodyAppearance) {
344    if let Some(color) = appearance.body {
345        stamp_color(body_name, color);
346    }
347    if appearance.faces.is_empty() || appearance.faces.len() != face_names.len() {
348        return;
349    }
350    for ((_, face_name), color) in face_names.iter().zip(&appearance.faces) {
351        if let Some(color) = color {
352            stamp_color(face_name, *color);
353        }
354    }
355}
356
357fn stamp_color(name: &str, color: ImportedColor) {
358    let mut record = serde_json::Map::new();
359    record.insert(
360        COLOR_METADATA_KEY.to_string(),
361        serde_json::Value::String(color.to_hex()),
362    );
363    scene_metadata::merge_record(name, &record, false);
364}
365
366/// The naming half of [`add_named_bodies`]: stamp body + face names onto `solids`
367/// IN PLACE and return the body name chosen for each, WITHOUT registering
368/// anything. Shared by the live import lanes and the payload encoder
369/// [`native_import_payload`], so an imported part is named identically however it
370/// arrived.
371fn stamp_imported_names(solids: &mut [BrepSolid], feature_name: &str) -> Vec<String> {
372    let body_names = imported_solid_names(solids.len(), feature_name);
373    let multi_body = solids.len() > 1;
374    let mut chosen = Vec::with_capacity(solids.len());
375    for (index, solid) in solids.iter_mut().enumerate() {
376        let body_name = body_names
377            .get(index)
378            .cloned()
379            .unwrap_or_else(|| feature_name.to_string());
380        let mut face_index = 0usize;
381        for shell in &mut solid.shells {
382            for face in &mut shell.faces {
383                if multi_body {
384                    // Multi-body: EVERY face namespaced under its body.
385                    face.name = Some(format!("{body_name}_Face_{face_index}"));
386                } else {
387                    // Single body: prepend the (unique) feature name so faces never
388                    // collide with ANOTHER import's faces — two single-body imports
389                    // both stamped bare `Face_N` before, which the cross-solid
390                    // name-uniqueness guard flags. Keep any STEP-authored name as the
391                    // stem, else the positional `Face_N` fallback. (`body_name` IS the
392                    // feature name here — see `imported_solid_names`.) Edge names are
393                    // re-derived from these face names downstream, so namespacing the
394                    // faces namespaces the derived edges too.
395                    let stem = face
396                        .name
397                        .as_deref()
398                        .map(str::trim)
399                        .filter(|name| !name.is_empty())
400                        .map(str::to_string)
401                        .unwrap_or_else(|| format!("Face_{face_index}"));
402                    face.name = Some(format!("{body_name}_{stem}"));
403                }
404                face_index += 1;
405            }
406        }
407        chosen.push(body_name);
408    }
409    chosen
410}
411
412/// `importedSolidNames` port: 1 body keeps the feature name; several get a
413/// stable, zero-padded `{feature}_SOLID_0N` suffix.
414pub fn imported_solid_names(count: usize, feature_name: &str) -> Vec<String> {
415    if count == 0 {
416        return Vec::new();
417    }
418    if count == 1 {
419        return vec![feature_name.to_string()];
420    }
421    let digits = count.to_string().len().max(2);
422    (1..=count)
423        .map(|index| format!("{feature_name}_SOLID_{index:0width$}", width = digits))
424        .collect()
425}
426
427/// Encode `solids` as a native IMPORT3D payload: stamp the names this feature
428/// would stamp under `feature_name`, then seal them into the `io/snapshot`
429/// container. The result is exactly what the `nativeBrep` source above reads
430/// back, so a part is named identically however it arrived — imported live from
431/// a text source, or restored from a payload built here.
432///
433/// GENERIC, not STEP-specific: any producer of finished `BrepSolid`s that wants
434/// them to become an IMPORT3D part document uses this (the STEP-assembly import
435/// lane is the first caller).
436///
437/// The two passes after the stamping are `register_added`'s name-FINALIZING half
438/// (`common::ensure_unique_face_names` + `common::stamp_derived_edge_names`),
439/// applied HERE rather than at restore time: the `nativeBrep` lane registers
440/// verbatim, so whatever the payload carries IS the final name set. Without them
441/// a payload's edge names would be the importer's raw ones while the `stepText`
442/// lane's are the derived `{faceA}|{faceB}[n]` — the same geometry under two
443/// different name sets, which is exactly what this helper exists to prevent.
444///
445/// The payload is byte-deterministic for identical input (`snapshot_solids`), so
446/// two encodings of the same part collapse to ONE parts-library entry.
447pub fn native_import_payload(feature_name: &str, solids: &[BrepSolid]) -> Result<String, String> {
448    native_import_payload_with_appearance(feature_name, solids, &[])
449}
450
451/// [`native_import_payload`] carrying the import's COLOURS into the payload.
452///
453/// `appearances` is parallel to `solids` (see [`crate::BodyAppearance`]); `&[]`
454/// is the colourless case and makes this identical to [`native_import_payload`].
455///
456/// The colours are stamped into the AMBIENT scene-metadata store just before
457/// `snapshot_solids`, which is exactly how they get INTO the payload — the
458/// snapshot captures each stamped name's own record alongside the geometry. So a
459/// caller that runs this inside a `crate::IsolatedSceneMetadata` bracket (the
460/// STEP-assembly part-document lane does, and must) gets the colours sealed into
461/// the part and discarded from the live document, which is the whole point of
462/// that bracket: the part carries its own metadata, the open document is not
463/// touched.
464pub fn native_import_payload_with_appearance(
465    feature_name: &str,
466    solids: &[BrepSolid],
467    appearances: &[BodyAppearance],
468) -> Result<String, String> {
469    if solids.is_empty() {
470        return Err("import3d: native payload needs at least one solid".into());
471    }
472    let mut bodies = solids.to_vec();
473    let body_names = stamp_imported_names(&mut bodies, feature_name);
474    for solid in &mut bodies {
475        common::ensure_unique_face_names(solid);
476        common::stamp_derived_edge_names(solid);
477    }
478    // Names are FINAL from here, so this is where colour can be keyed to them.
479    for (index, (solid, body_name)) in bodies.iter().zip(&body_names).enumerate() {
480        if let Some(appearance) = appearances.get(index) {
481            stamp_appearance(body_name, &common::collect_face_names(solid), appearance);
482        }
483    }
484    let named: Vec<(&str, &BrepSolid)> = body_names
485        .iter()
486        .map(String::as_str)
487        .zip(bodies.iter())
488        .collect();
489    crate::snapshot_solids(&named)
490}
491
492
493/// Context-bar applicability ([`crate::feature_pipeline::context_offer`]):
494/// never offered from a selection (no reference inputs).
495pub fn context_applicable(_probe: &crate::feature_pipeline::SelectionProbe) -> bool {
496    false
497}
498
499///
500/// Only `id` is exposed: an IMPORT3D feature is created by an import lane that
501/// bakes its payload in — the toolbar Import lane
502/// ([`EngineState::import_step_feature`] / `import_iges_feature` /
503/// `import_xt_feature`) writes the raw document text into
504/// `inputParams.stepText` / `igesText` / `xtText` (a binary Parasolid file,
505/// base64, into `xtBinary`), and the native lane
506/// ([`native_import_payload`], the STEP-assembly part document) writes
507/// `inputParams.nativeBrep`. None of them is form-editable, so none is
508/// exposed. (The former `fileToImport` "file" param was a JS-era vestige: nothing
509/// produced or consumed it and no form builder rendered it.)
510pub fn schema() -> serde_json::Value {
511    serde_json::json!({
512    "type": "IMPORT3D",
513    "shortName": "IMPORT3D",
514    "longName": "Import 3D Model",
515    "ribbonPath": "Home/Modeling/Import 3D Model",
516    "commandSize": "Compact",
517    "displayBuilder": false,
518    "inputParamsSchema": {
519        "id": {
520            "type": "string",
521            "default_value": null,
522            "hint": "unique identifier for the import feature"
523        }
524    }
525})
526}
527