Appearance
Geometry Update
Curve/profile/contour update namespace — derive new geometry by editing existing handles. Inputs are never mutated; every method returns a fresh handle, and the original handle keeps referring to the unchanged geometry. Read the resulting geometry back as plain values with the query namespace. Accessed via snaptrude.core.geom.update.
Sub-namespaces
| Namespace | Accessed via | Operations |
|---|---|---|
| Update: Curve | snaptrude.core.geom.update.curve | Extend, split, trim, offset, reverse a CurveHandle |
| Update: Profile | snaptrude.core.geom.update.profile | Offset, move/rotate/scale/mirror (affine), add/remove/reverse/simplify a ProfileHandle |
| Update: Contour | snaptrude.core.geom.update.contour | Offset, move/rotate/scale/mirror (affine), addHole/removeHole on a ContourHandle |
Immutable derive-new semantics
Every method in this namespace is an immutable derive-new operation: it takes an opaque handle (plus any extra inputs) and returns a new handle for the resulting geometry — the input is never mutated.
ts
// Offset a closed profile inward; `profile` still refers to the original
const inset = await snaptrude.core.geom.update.profile.offset(profile, -0.5);