Examples / cad-reference

cad-reference.json

targets v0.27.0 5 entities 5 schemas

Two posts plus three datums: a rig.cad.reference_line anchored to both posts by a / b so it tracks them on rebuild, a second one placed by origin + direction, and a rig.cad.reference_plane at deck height. None of them are solids and none appear in a boolean.operands list. An axis is a named reference line, not its own schema id.

Speaks

rig.cad.cuboid · rig.cad.reference_line · rig.cad.reference_plane · rig.meta.named · rig.spatial.transform

Document

Validates under npm run checkraw file.

{
  "rig": "0.27.0",
  "document": {
    "title": "CAD reference geometry",
    "defaultUnit": "cm"
  },
  "entities": [
    {
      "id": "post-a",
      "components": {
        "rig.meta.named": {
          "name": "post-a",
          "stableId": "post-a"
        },
        "rig.spatial.transform": {
          "position": [
            0,
            0,
            0
          ]
        },
        "rig.cad.cuboid": {
          "sizeX": 6,
          "sizeY": 70,
          "sizeZ": 6,
          "center": false
        }
      }
    },
    {
      "id": "post-b",
      "components": {
        "rig.meta.named": {
          "name": "post-b",
          "stableId": "post-b"
        },
        "rig.spatial.transform": {
          "position": [
            98,
            0,
            0
          ]
        },
        "rig.cad.cuboid": {
          "sizeX": 6,
          "sizeY": 70,
          "sizeZ": 6,
          "center": false
        }
      }
    },
    {
      "id": "post-line",
      "components": {
        "rig.meta.named": {
          "name": "post-line",
          "stableId": "post-line"
        },
        "rig.cad.reference_line": {
          "a": "post-a",
          "b": "post-b"
        }
      }
    },
    {
      "id": "centre-axis",
      "components": {
        "rig.meta.named": {
          "name": "centre-axis",
          "stableId": "centre-axis"
        },
        "rig.cad.reference_line": {
          "origin": [
            49,
            0,
            0
          ],
          "direction": [
            0,
            1,
            0
          ]
        }
      }
    },
    {
      "id": "deck-plane",
      "components": {
        "rig.meta.named": {
          "name": "deck-plane",
          "stableId": "deck-plane"
        },
        "rig.cad.reference_plane": {
          "origin": [
            0,
            110,
            0
          ],
          "normal": [
            0,
            1,
            0
          ]
        }
      }
    }
  ]
}