DEV Community

cadguide.tools
cadguide.tools

Posted on Originally published at cadguide.tools

Parasolid vs. OpenCASCADE Geometric Kernels: NURBS Surface Trimming & B-Rep Shell Stitching Mathematics

Parasolid vs. OpenCASCADE Geometric Kernels: NURBS Surface Trimming & B-Rep Shell Stitching Mathematics

In mechanical engineering software architectures, the underlying geometric modeling kernel governs how curves, surfaces, and solids are evaluated, stitched, and offset. Two kernels dominate modern mechanical CAD:

  • Siemens Parasolid: The proprietary standard driving Siemens NX, SolidWorks, Onshape, and Solid Edge.
  • Open CASCADE Technology (OCCT): The open-source LGPL boundary representation (B-Rep) kernel powering FreeCAD, SALOME, and custom industrial translators.

While both represent 3D geometry using the boundary representation (B-Rep) paradigm, they handle parametric curve evaluations, surface trimming tolerances, and manifold shell healing with fundamentally different mathematical tolerances.

Here is an architectural deep dive into how these two modeling engines process non-uniform rational B-spline (NURBS) surface intersections and sew loose topological faces into closed manifold shells.


1. Parametric Geometry: NURBS Surface Trimming Formulations

A tensor-product rational B-spline (NURBS) surface $S(u, v)$ is mathematically defined by a 2D grid of control points $P_{i,j}$ and associated scalar weights $w_{i,j}$:

$$S(u, v) = \frac{\sum_{i=0}^{n} \sum_{j=0}^{m} N_{i, p}(u) N_{j, q}(v) w_{i, j} P_{i, j}}{\sum_{i=0}^{n} \sum_{j=0}^{m} N_{i, p}(u) N_{j, q}(v) w_{i, j}}$$

Where $N_{i, p}(u)$ and $N_{j, q}(v)$ represent normalized B-spline basis functions evaluated recursively using the classic Cox-de Boor algorithm:

$$N_{i, 0}(u) = \begin{cases} 1 & \text{if } u_i \le u < u_{i+1} \ 0 & \text{otherwise} \end{cases}$$

$$N_{i, p}(u) = \frac{u - u_i}{u_{i+p} - u_i} N_{i, p-1}(u) + \frac{u_{i+p+1} - u}{u_{i+p+1} - u_{i+1}} N_{i+1, p-1}(u)$$

Surface Trimming Discrepancies

In CAD workflows, faces are rarely full rectangular parametric patches $[0, 1] \times [0, 1]$. Instead, they are bounded by trimming loops consisting of 2D parametric curves (p-curves) residing in the $(u, v)$ domain.

  • Parasolid Behavior: Uses convergent Newton-Raphson iterations paired with adaptive bounding boxes. Parasolid maintains an internal linear edge-vertex tolerance of $\delta = 10^{-5}$ mm. If a trimming loop diverges from the 3D edge evaluation by more than $10^{-5}$ mm, it automatically introduces a toleranced edge (PK_EDGE_set_tolerance).
  • OpenCASCADE Behavior: Relies on BRepLib and IntPatch intersection routines with a default precision of Precision::Confusion() ($10^{-7}$ mm). Because OCCT's native mathematical precision is significantly tighter than Parasolid's default modeling tolerance, importing a STEP file generated in SolidWorks directly into FreeCAD/OCCT frequently flags "face boundary out of tolerance" errors.

Engineers migrating STEP assemblies across multi-CAD pipelines can inspect schema flags and header definitions instantly using our browser-based ISO 10303 STEP File Header Parser without installing proprietary translation licenses.


2. B-Rep Topological Sewing & Edge Tolerance Homogenization

When neutral CAD models (STEP ISO 10303-21 or IGES) are exchanged between systems, the imported geometry typically enters as an unsewn TopoDS_Compound of disconnected faces (TopoDS_Face). Converting these sheets into a closed solid requires topological sewing.

   Face A [NURBS Patch]           Face B [NURBS Patch]
          \                             /
           \                           /
            Edge A: pA(t)      Edge B: pB(t)
             \                  /
              \  Hausdorff d   /
               \<------------>/
                \            /
                 Shared Boundary
Enter fullscreen mode Exit fullscreen mode

Mathematical Sewing Workflow:

  1. Geometric Distance Minimization: For every pair of candidate boundary edges $e_A$ and $e_B$, compute the continuous Hausdorff distance: $$d_H(e_A, e_B) = \max \left( \sup_{x \in e_A} \inf_{y \in e_B} |x - y|, \sup_{y \in e_B} \inf_{x \in e_A} |x - y| \right)$$
  2. Tolerance Envelope Adjustment: If $d_H(e_A, e_B) \le \delta_{\text{max}}$ (where $\delta_{\text{max}}$ is the user-configured sewing tolerance, typically $0.01$ mm to $0.1$ mm), both edges are replaced by a single topological edge with an updated bounding tolerance: $$\delta_{\text{new}} = \max(d_H(e_A, e_B), \delta_{eA}, \delta_{eB})$$
  3. Manifold Euler Check: After topological unification, the resulting shell is verified against the polyhedral Poincaré-Euler characteristic: $$V - E + F = 2(S - G)$$ Where $V$ is the vertex count, $E$ is edge count, $F$ is face count, $S$ is connected shells, and $G$ is topological genus (through-holes).

If you are evaluating format compatibility and geometric fidelity between CAD suites, reference our live CAD Format Compatibility Matrix & Version Guide.


3. Engineering Recommendations for Cross-Kernel STEP Exchange

To guarantee robust translation between Parasolid and OpenCASCADE environments:

  1. Export STEP AP242 rather than AP203: AP242 includes explicit geometric tolerance specifications and semantic assembly constraints, reducing heuristic edge matching during import.
  2. Clamp Maximum Sewing Tolerance: In FreeCAD/OCCT, never set Sewing Tolerance larger than $0.1$ mm. Over-aggressive sewing merges tiny fillet edges into single curves, creating downstream self-intersecting meshes.
  3. Audit Upstream Feature Trees: Ensure upstream chamfers and draft angles in SolidWorks/NX terminate on clean planar or cylindrical boundaries rather than degenerated spline singularities.

Explore full CAD/CAM engineering calculators, local drawing checkers, and benchmark guides at CADGuide.tools.

Top comments (0)