Appearance
Geometry Query
Geometry-kernel query namespace — read geometry, topology, and relationships as plain values or child handles (all-handle model). No query mutates its inputs. Accessed via snaptrude.core.geom.query.
Queries take opaque handles in and return either plain values (numbers, booleans, Vec3Components, BBoxComponents) or fresh child handles — see the Handles concept page. BREP topology handles (BrepHandle, FaceHandle, EdgeHandle, HalfEdgeHandle, VertexHandle) are session-ephemeral: obtain a BrepHandle via design.query.geometry.getBrep, walk it with the brep/face/edge/halfedge/vertex sub-namespaces, and note that these handles go stale on undo/redo/re-topologize.
Sub-namespaces
| Namespace | Description |
|---|---|
curve | Shared line/arc queries and two-curve relationships — points, lengths, distances, parameters, predicates as plain values. |
arc | Arc-specific reads — radius, centre, axis, sweep angle, validity. |
circle | Circle-specific reads — closed-circle properties as plain values (a circle is not part of the shared CurveHandle surface). |
profile | Profile reads — areas, perimeters, bounding boxes, child curves, and two-profile relationships. |
contour | Contour reads (outer profile + holes) — child profiles, areas, and two-contour relationships. |
brep | BREP mesh topology + geometry — enumerate faces/edges/vertices/half-edges and read positions. |
face | BREP face reads — boundary and hole loops, child topology handles. |
edge | BREP edge reads — topology and geometry of a single edge. |
halfedge | BREP half-edge walks — getNext/getPrev/getFlip traversals and reads. |
vertex | BREP vertex reads — topology and position of a single vertex. |
Example
ts
// Walk a BREP from a scene component and read a vertex position
const brep = await snaptrude.design.query.geometry.getBrep(component);
const faces = await snaptrude.core.geom.query.brep.listFaces(brep);
const vertices = await snaptrude.core.geom.query.face.listVertices(faces[0]);
const position = await snaptrude.core.geom.query.vertex.getPosition(brep, vertices[0]);
// position is Vec3Components: { x, y, z } in Snaptrude units