Schemas / CAD / solids

rig.cad.boolean

v0.31.0 · draft 2 fields 2 required

Fields

FieldTypeMeaning
op enumunion · difference · intersection required union, difference, or intersection
operands array<entity>min 2 items required At least two solid entities (cad primitives, other booleans, or mesh solids). Difference is operands[0] minus the rest, in order

CSG combination of solids. Format when present.

Each operand's rig.spatial.transform applies before the boolean. This entity's transform places the result.

Do not put two primitive cad components on one entity. One solid source: a primitive, an extrude/revolve, or this boolean. rig.cad.fillet / rig.cad.chamfer may compose on the same entity as modifiers.

When this component is present it is the solid source of truth; rig.geometry.mesh on the same entity is an optional bake a CSG host may rebuild.

JSON Schema

Resolves at https://rig.works/schemas/rig.cad.boolean.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.cad.boolean.schema.json",
  "title": "rig.cad.boolean",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "op": {
      "type": "string",
      "enum": [
        "union",
        "difference",
        "intersection"
      ]
    },
    "operands": {
      "type": "array",
      "items": {
        "$ref": "./_defs.schema.json#/$defs/entity"
      },
      "minItems": 2
    }
  },
  "required": [
    "op",
    "operands"
  ]
}

Seen in

cad-boolean.json