Skip to content

v1.7.9 — face from surface bounded by a wire / UV polygon

Choose a tag to compare

@gsdali gsdali released this 19 Jun 19:17
· 26 commits to main since this release

Additive, source-compatible. Trim a curved analytic surface (cylinder / cone / sphere / B-spline) to a non-rectangular region — closes #233.

  • Surface.toFace(uvBoundary: [SIMD2<Double>]) — a closed UV-space boundary polygon → 2D edges with pcurves on the surface → BRepBuilderAPI_MakeFace(surface, wire) + BuildCurves3d. (Ground-truthed: a cylinder region trims to 39.75 vs 60 for the full UV box.)
  • Shape.face(from: Surface, boundary: Wire) — a 3D boundary wire: exact MakeFace + ShapeFix_Face when the wire lies on the surface, else a fallback that projects the wire's ordered points to UV and trims by that polygon (handles sampled boundary polylines — the reconstruction case; seam-crossing boundaries not handled by the fallback).

Surfaces 86→88, total 4,290 operations. No xcframework change (same v1.7.1 binary).

Also lands the #232 investigation (doc + tests, no behavior change): Shape.bounds over-reports for B-spline/faceted geometry — threaded solids are bounded exactly to length/depth; Issue232BoundsTests asserts the true (mesh-vertex) extent.

📖 Docs & cookbook: https://gsdali.github.io/OCCTSwift/