Arch JSON/it: Difference between revisions

From FreeCAD Documentation
(Created page with "Lo scopo principale di questo formato di esportazione è rendere più semplice l'elaborazione dei dati del modello di FreeCAD dai linguaggi di programmazione. Il formato [http...")
(Created page with "Category: User Documentation/it")
Line 19: Line 19:




[[Category: User Documentation]]
[[Category: User Documentation/it]]
{{clear}}
{{clear}}
<languages/>
<languages/>

Revision as of 21:17, 26 February 2018

Lo scopo principale di questo formato di esportazione è rendere più semplice l'elaborazione dei dati del modello di FreeCAD dai linguaggi di programmazione. Il formato JSON è il seguente:

 {
   "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.