SketchBuilder and must return exactly one
sketch.profile(...).
Planes
A profile with holes
Entities
SketchBuilder supports:
point(id, position)line(id, start, end)circle(id, { center, radius })arc(id, { center, radius, startAngle, endAngle })polyline(id, points, { closed })rectangle(id, options)regularPolygon(id, sides, radius, options)
sketch.loop([...]) to assemble ordered lines and arcs. Reverse an edge use
when the loop traversal runs opposite its authored direction. A loop must be
closed and non-self-intersecting after solving.
Constraint example
Supported constraints
The built-in solver is a permissively licensed reference implementation for
0.1. It is replaceable through the sketch-solver protocol. Industrial conflict
isolation, redundant-constraint explanations, drag solving, and large sparse
systems remain roadmap items.
Tolerance and validity
Evaluator receive the same decision. Invalid
regions fail before the profile reaches a dependent kernel call with
SKETCH_NO_CLOSED_REGION. Relationship and self-contact diagnostics identify
the sketch and resolved loop index where available, and retain an implicated
entity only when solver provenance exactly matches the authored loop and
curve. Closure failures retain the established profile-scoped diagnostic.
Explicit outer/hole roles remain independent of clockwise or counterclockwise
traversal.
The validator uses analytic line, arc, and circle predicates plus adaptive
chord-sagitta bounds for separation proofs. Curve segments values are
rendering/backend tessellation hints and do not relax or discretize this
decision. The closure and hole-region checks share a cumulative work ceiling
per sketch, sourced from
DEFAULT_DESIGN_DOCUMENT_LIMITS.maxStructuralValues, and the evaluation abort
signal. Exhausting the ceiling returns RESOURCE_LIMIT_EXCEEDED, cancellation
returns EVALUATION_ABORTED, and a numerically uncertain clearance fails
closed.
This guarantee belongs to document evaluation. A direct low-level
GeometryKernel profile call bypasses the evaluator boundary and must satisfy
the kernel’s resolved-profile contract itself. InvariantCAD does not clamp,
move, or reinterpret an invalid hole, and it does not derive relational
parameter bounds automatically.
Stable entity IDs
Entity IDs are later available as sketch-source topology provenance. If a fillet intends the extrusion side created byoutline.e1, select that source
explicitly rather than relying on geometric position. Preserve entity IDs when
refactoring a sketch if downstream topology intent should remain stable.