Arch JSON/de: Difference between revisions

From FreeCAD Documentation
(Created page with "Der Hauptzweck dieses Exportformat ist es, FreeCAD-Modelldaten mit anderen Programmiersprachen zu verarbeiten. Das [http://json.org/ JSON]-Format ist wie folgt:")
 
(Created page with "Beachte, dass Facetten Dreiecke bilden und ihre Integer-Werte sich auf Punkte im '''Eckpunkte'''-Feld (vertices array) beziehen. Facetten-'Normale' (normals) finden sich an de...")
Line 16: Line 16:
]
]
}
}
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.
Beachte, dass Facetten Dreiecke bilden und ihre Integer-Werte sich auf Punkte im '''Eckpunkte'''-Feld (vertices array) beziehen. Facetten-'Normale' (normals) finden sich an der entsprechenden Position im '''Normalen'''-Feld (normals array). '''description''', '''color''' und '''wires''' sind alle optional. Dieses Format kann leicht erweitert werden, um zusätzliche Modelldaten zu enthalten.





Revision as of 22:40, 13 December 2018

Der Hauptzweck dieses Exportformat ist es, FreeCAD-Modelldaten mit anderen Programmiersprachen zu verarbeiten. Das JSON-Format ist wie folgt:

 {
   "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>], . . .]
     }, . . .
   ]
 }

Beachte, dass Facetten Dreiecke bilden und ihre Integer-Werte sich auf Punkte im Eckpunkte-Feld (vertices array) beziehen. Facetten-'Normale' (normals) finden sich an der entsprechenden Position im Normalen-Feld (normals array). description, color und wires sind alle optional. Dieses Format kann leicht erweitert werden, um zusätzliche Modelldaten zu enthalten.