Skip to content

Instantly share code, notes, and snippets.

@ToJans
Last active August 29, 2015 14:20
Show Gist options
  • Save ToJans/58fa2f5bd6cddc7f24ea to your computer and use it in GitHub Desktop.
Save ToJans/58fa2f5bd6cddc7f24ea to your computer and use it in GitHub Desktop.
Export format

Sales designer export formats

Value types

GUID

A Globally Unique IDentifier, usually represented as a series of hexadecimal values.

Example

"07810131-30f4-4c1f-874f-cb60fb412d3d"

Vertex (vertices)

(A series of) 2D or 3D coordinates, with optionally an identifier.

Usually serialized as an array.

Example

[330,650,0,"vertex1430011303057561749"]
  • x: 330
  • y: 650
  • z: 0
  • id: vertex1430011303057561749

Edge

2 Vertices representing a vector.

Usually serialized as an array.

Example

{
    "v1":[400,550,0,"vertex143023831469869713"],
    "v2":[800,550,0,"vertex14302382461211202"]
}

Polygon

3 or more vertices representing an area (in either 2D or 3D).

Polygons are defined by their vertices, and vertices are always ordered clockwise when looking from the front-side.

Example

{
    "vertices":[
        [330,650,0,"vertex1430011303057561749"],
        [330,300,0,"vertex1430011303057561750"],
        [920,300,0,"vertex1430011303057561751"],
        [920,650,0,"vertex1430011303057561752"]
    ],
    "id":"GDAK",
    "type":"polygon"
}

Segment

A recursive structure representing a binary space partitition tree (BSP-tree).

It partitions a polygon into 2 seperate polygons by splitting the polygon along an edge.

TODO: SEGMENTTYPES

Example:

{
    "id":"SEGMENTS",
    "segments":[
        {   
            "poly":
            {
                "vertices":[
                    [250,300,0,"vertex14301568746556547605"],
                    [950,300,0,"vertex14301568746556547606"],
                    [950,1010,0,"vertex14301568746556547607"],
                    [250,1010,0,"vertex14301568746556547608"]
                ]
            },
            "edge":
            {
                "v1":[400,550,0,"vertex143023831469869713"],
                "v2":[800,550,0,"vertex14302382461211202"]
            },
            "id":"segvertex1430150884710709427",
            "children":[
                {
                    "poly":
                        {
                            "vertices":[
                                [250,300,0,"vertex14301568746556547605"],
                                [950,300,0,"vertex14301568746556547606"],
                                [950,550,0,null],
                                [250,550,0,null]
                            ]
                        },
                        "edge":
                            {
                                "v1":[700,370,0,"vertex143024107529329283"],
                                "v2":[700,480,0,"vertex143023835045645520"]
                            },
                            "id":"segvertex1430238258949948276",
                            "children":
                            [

                            "<< CUT FOR BREVITY >>"

            ],
            "segmentType":null,
            "isExtendedEdge":false
        }
    ],
    "type":"segments"
}

Color

A HTML representation of a color (RGB, RGBA, named color, ...).

Example

"#FF0000"

Parameters

Some parameters defined using JSON data. Data can be primitives as well as composed objects.

Example

{
    "id":"GDAK",
    "color":"#FF0000",
    "height":"2650",
    "dak.style":"modern",
    "dak.color":"#2a505c",
    "roofVisible":true,
    "type":"parameters"
}

Side

A definition of a side, typically contains:

  • type of the side:
    • fixed panel
    • frameless
    • sliding left
    • sliding Right
    • TODO
  • the amount of horizontal subdivisions
  • the amount of vertical subdivisions
  • all widths of the subdivisions (empty if the remains should be subdivided equally)
  • all heights of the subdivisions (empty if the remains should be subdivided equally)
  • the size and dimensions of all the panes

Example

{"sideType":"fixed","columnCount":5,"rowCount":3,"widths":["","","","",""],"heights":[500,"",500],"panels":[["0",0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]],"id":"edge_vertex14300112020111015_vertex143025415163363278","type":"side"}

Collada .obj

JSON-data

This is the export of all the data used to build the 3D model.

It is exported in JSON, and consists out of key/value pairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment