Arch JSON/fr: Difference between revisions

From FreeCAD Documentation
(Created page with "Arch JSON")
 
(Created page with "L'objectif principal de ce format d'exportation est de faciliter le traitement des données du modèle FreeCAD à partir de langages de programmation. Le format [http://json.o...")
Line 1: Line 1:
The main purpose of this export format is to make it easier to process FreeCAD model data from programming languages. The [http://json.org/ JSON] format is as follows:
L'objectif principal de ce format d'exportation est de faciliter le traitement des données du modèle FreeCAD à partir de langages de programmation. Le format [http://json.org/ JSON] est le suivant:
{
{
"version": "0.0.1",
"version": "0.0.1",

Revision as of 13:45, 11 May 2018

L'objectif principal de ce format d'exportation est de faciliter le traitement des données du modèle FreeCAD à partir de langages de programmation. Le format JSON est le suivant:

 {
   "version": "0.0.1",
   "description": "Mesh data exported from FreeCAD",
   "objects": [
     {
       "name": "<object name>",
       "description": "<object description>",
       "color": "<object color>",
       "wires": [[[<float>, <float>, <float>], . . .], . . .],
       "vertices": [[<float>, <float>, <float>], . . .],
       "normals": [[<float>, <float>, <float>], . . .],
       "facets": [[<int>, <int>, <int>], . . .]
     }, . . .
   ]
 }

Note that facets form triangles and their integer values reference points in the vertices array. Facet normals are found at the corresponding position in the normals array. description, color and wires are all optional. This format could easily be expanded to include additional model data.