Import glTF 2.0 files (.glb, .gltf) as mesh bodies (#1512)
glTF files open, insert and drop like 3MF/STL/OBJ: a component named after the file, the node tree as nested rigid components, repeated meshes as occurrences, metres to mm, Y up turned to Z up by default (up: z keeps axes), materials as PBR appearances. Bounded, hostile-input tested reader; no new persisted data. Closes #1505. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
5823900439
commit
a13124acdd
19 files changed
+1889
-71
No files matched your search
@@ -7,6 +7,7 @@
|
||||
| STEP (AP203, AP214, AP242) | solids, assemblies, units, names, colours | AP242 with names, colours and the component tree |
|
||||
| IGES 5.3 | manifold solids, or trimmed surfaces sewn into solids | manifold solids with names and colours |
|
||||
| 3MF, STL, OBJ | mesh bodies | yes |
|
||||
| glTF 2.0 (`.glb`, `.gltf` with its `.bin` files) | mesh bodies in the node tree's components, materials as appearances | |
|
||||
| 3MF with face tags | as 3MF | each triangle tagged with its B-rep face, exact coordinates |
|
||||
| URDF | | the assembly as a robot: links with meshes, mass and inertia, joints from the assembly's joints |
|
||||
| DXF, SVG | into a sketch | sketches and flat patterns as DXF |
|
||||
@@ -16,13 +17,22 @@ Opening a STEP or IGES file creates a design with the file's bodies as a base fe
|
||||
inserting one adds them to the current design. Later features build on them. Mesh bodies render,
|
||||
measure, move and export, but solid features need B-rep bodies.
|
||||
|
||||
Every imported file (STEP, IGES, 3MF, STL or OBJ) comes in as a new component named after the
|
||||
Every imported file (STEP, IGES, 3MF, STL, OBJ or glTF) comes in as a new component named after the
|
||||
file, so its bodies never mix with yours. A STEP assembly keeps its structure: its parts and
|
||||
sub-assemblies become nested components, and a part used several times is one component with an
|
||||
occurrence for each place. The imported assembly is rigid: moving its component moves everything,
|
||||
and its parts don't move on their own. Right-click the component and choose **Unlock Contents** to
|
||||
joint the parts one by one. Undo removes a whole import in one step.
|
||||
|
||||
A glTF file (`.glb`, or `.gltf` with the `.bin` files it names in the same folder) comes in the
|
||||
same way: its nodes become nested components, a mesh placed several times is one component with
|
||||
an occurrence for each place, and the whole import is rigid until you unlock it. glTF is in metres
|
||||
with Y up, so the import is scaled to millimetres and turned to stand Z up (`up: "z"` keeps the
|
||||
file's axes). Each material's base colour, metal and roughness become the body's appearance, so
|
||||
the model looks right in Render; textures, skins and animations are not imported. Scaled or
|
||||
mirrored nodes are baked into their meshes. Compressed meshes (Draco, meshopt) are refused with a
|
||||
message: save the file uncompressed first.
|
||||
|
||||
**File → Save as mesh…** (also on the Mesh tab under Modify, and in the right-click menu of a
|
||||
body) saves the selected bodies as STL, 3MF or 3MF with face tags (below). With **Send to slicer** ticked, it writes the file to
|
||||
a temporary folder and opens it in the chosen slicer instead of asking for a file name. The slicer
|
||||
|
||||
Reference in new issue
Block a user