Schemas / Geometry / paint
rig.geometry.spline
v0.31.0 · draft 6 fields 3 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
degree |
int | required | Polynomial degree (typically 3) |
closed |
bool | optional | Optional. Absent = false |
controlPoints |
array<vec2>min 2 items | required | Control polygon (at least two points) |
knots |
array<number> | required | Knot vector (non-decreasing) |
weights |
array<number> | optional | Optional. Empty or absent = all weights 1 (non-rational). Same length as controlPoints when present |
fitPoints |
array<vec2> | optional | Optional. Authoring / DXF fit points; not required for evaluation when control points + knots are present |
NURBS / control-point spline in the plane. Format when present. Space curves use rig.geometry.spline3d.
Tessellation to polylines or path commands is host fulfillment - this schema is the parametric source of truth. Do not also attach rig.geometry.path for the same contour.
Appearance: rig.paint.fill_stroke.
JSON Schema
Resolves at https://rig.works/schemas/rig.geometry.spline.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.geometry.spline.schema.json",
"title": "rig.geometry.spline",
"type": "object",
"additionalProperties": false,
"properties": {
"degree": {
"$ref": "./_defs.schema.json#/$defs/int"
},
"closed": {
"$ref": "./_defs.schema.json#/$defs/bool"
},
"controlPoints": {
"type": "array",
"items": {
"$ref": "./_defs.schema.json#/$defs/vec2"
},
"minItems": 2
},
"knots": {
"type": "array",
"items": {
"type": "number"
}
},
"weights": {
"type": "array",
"items": {
"type": "number"
}
},
"fitPoints": {
"type": "array",
"items": {
"$ref": "./_defs.schema.json#/$defs/vec2"
}
}
},
"required": [
"degree",
"controlPoints",
"knots"
]
}