Skip to content

Tolerancing DSL

Tolerancing

  • refSurface(selector) -> RefSurface
  • refFrame(selector) -> RefFrame
  • refEdge(selector) -> RefEdge
  • refAxis(selector) -> RefAxis
  • refPoint(selector, locator?) -> RefPoint
  • datumFeature(id, label, target, opts?) -> FTIDatum
  • datumRef(datumId, modifiers?) -> DatumRef
  • surfaceProfileConstraint(id, target, tolerance, opts?) -> SurfaceProfileConstraint
  • flatnessConstraint(id, target, tolerance, opts?) -> FlatnessConstraint
  • parallelismConstraint(id, target, tolerance, datumRefs, opts?) -> ParallelismConstraint
  • perpendicularityConstraint(id, target, tolerance, datumRefs, opts?) -> PerpendicularityConstraint
  • positionConstraint(id, target, tolerance, datumRefs, opts?) -> PositionConstraint
  • sizeConstraint(id, target, opts) -> SizeConstraint
  • dimensionDistance(id, from, to, opts?) -> DimensionDistance
  • dimensionAngle(id, from, to, opts?) -> DimensionAngle
  • cosmeticThread(id, target, opts?) -> CosmeticThread

Notes:

  • Cosmetic threads are preferred for most cases; they propagate to PMI and STEP AP242.
  • For dimensionDistance and dimensionAngle, include nominal whenever tolerance or plus/minus are provided.
  • Use evaluatePartDimensions(part, kernelResult, opts?) to evaluate semantic dimensions from resolved kernel metadata (center, normalVec/normal).
  • refPoint(..., locator) is intent-first and derives a point from an existing semantic selection rather than exposing raw kernel vertices.
    • Supported locators:
      • center for faces/edges/solids/surfaces
      • mid for edges
      • start / end for open edges
    • Runtime mesh selection metadata can expose the same derived anchors under selection.meta.pointAnchors for application-side discovery. That metadata is descriptive only; authored documents should still use refPoint(selectorNamed("<source-id>"), "<locator>").
    • For application round-tripping, refPoint(selectorNamed("<source-id>.point.<locator>")) is also supported. This lets a client feed a discovered anchor id back into a constraint without introducing a separate top-level point selector kind.

Examples: