Skip to content

v1.7.11 — fromPointGrid degree clamp prevents a BRepMesh hang (#244)

Choose a tag to compare

@gsdali gsdali released this 19 Jun 22:35
· 14 commits to main since this release

Bug fix. No new operations; no xcframework change (same v1.7.1 binary).

Surface.fromPointGrid now clamps the B-spline fit degree to min(uCount, vCount) − 1. Passing a degMax higher than the grid supports (the default degMax: 8 on a 7×7 grid) over-parameterised the fit: a degree-8 surface from only 7 samples/direction oscillates (Runge phenomenon) and can self-overlap in 3D. The resulting face is topologically valid (BRepCheck passes) but geometrically rippling, so BRepMesh's adaptive refinement never converged — an in-process, uninterruptible hang (the OCCTReconstruct blocker). The clamp keeps the fit well-posed; the 7×7 case now meshes in ~40 ms.

Why not an interruptible mesh? A watchdog-based bounded mesh was prototyped and rejected — BRepMesh doesn't poll UserBreak during heavy meshing (verified: a fine sphere ran ~13 min / 5 GB ignoring a 0.01s deadline), so an in-process time bound can't be made both reliable and safe. Prevention (well-posed surfaces) is the robust fix.

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