Arch JSON/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Docnav/pl |OBJ |3DS |Środowisko pracy Arch}}")
(Created page with "Głównym celem tego formatu eksportu jest ułatwienie przetwarzania danych modelu FreeCAD z języków programowania. Format [http://json.org/ JSON] jest następujący:")
Line 5: Line 5:
|[[Arch_Module|Środowisko pracy Arch]]}}
|[[Arch_Module|Środowisko pracy Arch]]}}


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:
Głównym celem tego formatu eksportu jest ułatwienie przetwarzania danych modelu FreeCAD z języków programowania. Format [http://json.org/ JSON] jest następujący:
<pre>
<pre>
{
{

Revision as of 18:52, 15 July 2020

Głównym celem tego formatu eksportu jest ułatwienie przetwarzania danych modelu FreeCAD z języków programowania. Format JSON jest następujący:

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