GlTF: Difference between revisions

From FreeCAD Documentation
(Category:Formats -> Category:File_Formats)
(Marked this version for translation)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
== Background ==
<translate>


</translate>
glTF™ (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. glTF minimizes both the size of 3D assets, and the runtime processing needed to unpack and use those assets. glTF defines an extensible, common publishing format for 3D content tools and services that streamlines authoring workflows and enables interoperable use of content across the industry.
{{TOCright}}
<translate>


==Description== <!--T:1-->
Website: https://www.khronos.org/gltf/
Repo: https://github.com/KhronosGroup/glTF/blob/master/README.md


<!--T:2-->
== Importing ==
The [https://www.khronos.org/gltf/ GL Transmission Format] (glTF™) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. It minimizes both the size of 3D assets, and the runtime processing needed to unpack and use those assets.


==Installation== <!--T:15-->
Currently not supported in FreeCAD v0.19


<!--T:16-->
== Exporting ==
According to this [https://forum.freecadweb.org/viewtopic.php?f=8&t=31680&p=450917&#p450658 forum thread], OCC must be compiled with RapidJSON support in order to utilize glTF features. Therefore set the option {{incode|USE_RAPIDJSON}} in the CMake configuration step. This requires the package rapidjson-dev.


==Importing== <!--T:3-->
FreeCAD has native export support for gITF format since v0.19.23074. Access this through the [[Std_Export|Std Export]] dialog.


<!--T:4-->
=== Alternative export solutions ===
Currently not supported in FreeCAD.


==Exporting== <!--T:5-->
Previous to native glTF support there were a couple of workarounds:


<!--T:6-->
1. Export as STEP → Import into CAD Assistant from Opencascade -> Export glTF
Since FreeCAD version 0.19.23074 the [[Std_Export|Std Export]] command can export to the gITF format.


===Alternative export solutions=== <!--T:7-->

<!--T:8-->
For earlier versions these workarounds can be used:

<!--T:9-->
1. Export as STEP → Import into CAD Assistant from Opencascade -> Export to glTF

<!--T:10-->
OR
OR


<!--T:11-->
2. Use the python library {{incode|cqparts}} ([https://github.com/cqparts/cqparts website]) by importing in to the FreeCAD [[Python console]] like so:
2. Use the {{incode|cqparts}} Python library ([https://github.com/cqparts/cqparts website]):
{{code|
{{code|
import cqparts
import cqparts
Line 28: Line 44:
}}
}}


<!--T:12-->
<small>Source: [https://forum.freecadweb.org/viewtopic.php?f=8&t=31680&p=449977#p449977 Forum thread]</small>
Source: [https://forum.freecadweb.org/viewtopic.php?f=8&t=31680&p=449977#p449977 Forum thread]


== Related ==
==Related== <!--T:13-->


<!--T:14-->
* [[Import Export]]
* [[FreeCAD Howto Import Export]]
* [[Import_Export|Import Export]]
* [[FreeCAD_Howto_Import_Export|FreeCAD Howto Import Export]]




</translate>
{{Userdocnavi{{#translation:}}}}
[[Category:File_Formats{{#translation:}}]]
[[Category:File_Formats{{#translation:}}]]

Latest revision as of 19:36, 25 February 2021

Other languages:

Description

The GL Transmission Format (glTF™) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. It minimizes both the size of 3D assets, and the runtime processing needed to unpack and use those assets.

Installation

According to this forum thread, OCC must be compiled with RapidJSON support in order to utilize glTF features. Therefore set the option USE_RAPIDJSON in the CMake configuration step. This requires the package rapidjson-dev.

Importing

Currently not supported in FreeCAD.

Exporting

Since FreeCAD version 0.19.23074 the Std Export command can export to the gITF format.

Alternative export solutions

For earlier versions these workarounds can be used:

1. Export as STEP → Import into CAD Assistant from Opencascade -> Export to glTF

OR

2. Use the cqparts Python library (website):

import cqparts
cqparts.Assembly.importer('step')('myfile.stp').exporter('gltf')('myfile.gltf')

Source: Forum thread

Related