3MF: export, and 3MF/STL import as mesh bodies
Export: ExportCommand/CLI --out/MCP export with .3mf write a 3MF Core package ([Content_Types].xml, _rels/.rels, 3D/3dmodel.model; millimetres), one mesh object and build item per body, named after it, vertices shared and welded watertight (T-junctions between faces split), base-material colours when bodies carry one (STEP colours now ride on bodies). Tessellation as for STL. File > Export 3MF. Import: doc.open/drag-drop/CLI/MCP open accept .3mf and .stl; Insert Mesh (ParaMeshInsertAlignCommand) adds them to a design as a MeshImport feature. Kernel mesh bodies render, measure exactly, move and export; solid features refuse them with a clear error. 3MF reading flattens components and build transforms, converts units, reads colours; sizes, entries, nesting and element counts are capped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
043a542e29
commit
ea3dd0ed6e
30 files changed
+1361
-47
No files matched your search
@@ -164,12 +164,12 @@ pub fn tool_definitions() -> Vec<Value> {
|
||||
tool(
|
||||
"export",
|
||||
"Export",
|
||||
"Export bodies to STEP (.step/.stp), binary STL (.stl), ASCII STL (format stla) or OBJ. The format comes from \
|
||||
the extension unless given.",
|
||||
"Export bodies to STEP (.step/.stp), 3MF (.3mf), binary STL (.stl), ASCII STL (format stla) or OBJ. The format \
|
||||
comes from the extension unless given.",
|
||||
obj(
|
||||
json!({
|
||||
"path": string("Output file"),
|
||||
"format": {"type": "string", "enum": ["step", "stl", "stla", "obj"]},
|
||||
"format": {"type": "string", "enum": ["step", "3mf", "stl", "stla", "obj"]},
|
||||
"bodies": {"type": "array", "items": {"type": "string"}, "description": "Body names (default: all)"},
|
||||
}),
|
||||
&["path"],
|
||||
@@ -190,10 +190,10 @@ pub fn tool_definitions() -> Vec<Value> {
|
||||
tool(
|
||||
"open",
|
||||
"Open a design",
|
||||
"Open a .solvecraft design file, or a STEP file (.step/.stp: a new design whose bodies come from the file, as an \
|
||||
Import base feature; insert into the current design with the FusionImportCommandFromToolbar command). Replaces \
|
||||
the current design.",
|
||||
obj(json!({"path": string("Path to a .solvecraft or .step/.stp file")}), &["path"]),
|
||||
"Open a .solvecraft design file, a STEP file (.step/.stp: a new design whose bodies come from the file, as an \
|
||||
Import base feature) or a 3MF/STL mesh (.3mf/.stl: mesh bodies). Replaces the current design; insert into it \
|
||||
instead with the FusionImportCommandFromToolbar (STEP) or ParaMeshInsertAlignCommand (3MF/STL) commands.",
|
||||
obj(json!({"path": string("Path to a .solvecraft, .step/.stp, .3mf or .stl file")}), &["path"]),
|
||||
false,
|
||||
true,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user