Schemas / CAD / solids
rig.cad.dimension
v0.31.0 · draft 6 fields 3 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
kind |
enumlinear · aligned · horizontal · vertical · diameter · angle | required | linear, aligned, horizontal, vertical, diameter, or angle |
a |
entity | required | First solid / point entity |
b |
entity | optional | Optional. Second entity. Required for length and angle kinds. Unused for diameter |
value |
float | required | Driving or displayed number. Scene length (document.defaultUnit) except angle, which is degrees |
measurement |
bool | optional | Optional. Absent = false: a solver may move a / b to match value. True = label only; do not drive |
offset |
vec3 | optional | Optional. Absent = 0,0,0. Witness / label placement in the same space as the entities |
Numeric datum between CAD entities. Format when present.
This is not a solid. Do not put it on the same entity as rig.cad.cuboid / boolean. Compose rig.spatial.transform on this entity if the host needs a pose for the label.
linear is the 3D distance. aligned is the distance along the line between the two entities. horizontal / vertical are the X and Y components (Y-up). diameter reads one circular solid (a). angle is the angle between a and b.
A host without a solver still stores the fields and may draw the witness. Driving (measurement false) is fulfillment - rigSolveSpace is one kernel. Do not invent a parallel rig.cad.constraint tagged union; geometric constraints (coincident, parallel) stay later split schemas if they earn a catalog id.
A dimension measures. Geometry to build against - an unbounded line or plane carrying no number - is rig.cad.reference_line / reference_plane.
JSON Schema
Resolves at https://rig.works/schemas/rig.cad.dimension.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.cad.dimension.schema.json",
"title": "rig.cad.dimension",
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"type": "string",
"enum": [
"linear",
"aligned",
"horizontal",
"vertical",
"diameter",
"angle"
]
},
"a": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"b": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"value": {
"$ref": "./_defs.schema.json#/$defs/float"
},
"measurement": {
"$ref": "./_defs.schema.json#/$defs/bool"
},
"offset": {
"$ref": "./_defs.schema.json#/$defs/vec3"
}
},
"required": [
"kind",
"a",
"value"
]
}