You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/importexport.rst
+23-1Lines changed: 23 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Notes on the Formats
43
43
* TJS is short for ThreeJS, and is a JSON mesh format that is useful for displaying 3D models in web browsers. The TJS format is used to display embedded 3D examples within the CadQuery documentation.
44
44
* VRML is a mesh-based format for representing interactive 3D objects in a web browser.
45
45
* VTP is a mesh-based format used by the VTK library.
46
-
* glTF is a mesh-based format useful for viewing models on the web. Whether the resulting glTF file is binary (.glb) or text (.gltf) is set by the file extension.
46
+
* glTF is a mesh-based format useful for viewing models on the web. Whether the resulting glTF file is binary (.glb) or text (.gltf) is set by the file extension. This export format is only available for assemblies.
47
47
48
48
Importing DXF
49
49
##############
@@ -205,6 +205,28 @@ This is done by setting the name property of the assembly before calling :meth:`
205
205
206
206
If an assembly name is not specified, a UUID will be used to avoid name conflicts.
207
207
208
+
Exporting Assemblies to glTF
209
+
#############################
210
+
211
+
It is possible to export CadQuery assemblies to glTF format. glTF is a mesh-based format useful for viewing models on the web. Whether the resulting glTF file is binary (.glb) or text (.gltf) is set by the file extension.
212
+
213
+
CadQuery assemblies have a :meth:`Assembly.save` method which can write an assembly to a glTF file. An example assembly
214
+
export with all defaults is shown below. To export to a binary glTF file, change the extension to ``glb``.
0 commit comments