docs / capabilities / Surface continuity
Surface continuity
kernelCAD exposes continuity as both a construction option and a sampled inspection. The inspector reports G0, G1, G2, or a broken position join; it does not report G3 or G4.
The G ladder
- G0: the two sides meet at the same position.
- G1: the tangent direction agrees, so there is no sharp normal break.
- G2: curvature agrees across the join.
- G3: curvature changes at the same rate across the join.
- G4: the next derivative level also agrees.
Each class adds another geometric derivative condition. C0, C1, and C2 are parameter-space continuity grades; they are not interchangeable names for the G classes.
What the current operations request
Shape.fillet(radius, ..., { continuity })acceptsG1orG2.G1is the default. A G2 fillet can fail when the neighboring faces are not G2-compatible.Sketch.loft(..., { continuity })acceptsG0,G1, orG2. G1 and G2 use one multi-span skin. Themode: 'sewn'span path leaves C0 joins and warns when it cannot honor a G1/G2 request.Shape.filletIntersection(...)acceptsG1orG2.variableSweep(...)acceptsC0,C1, orC2; its default is C1.surfaceFromBoundary(...)accepts C0/C1/C2 per boundary edge.hermiteG2(...)andcurveBridge(...)construct G1/G2 curves. They do not certify a resulting surface or solid.- Chamfer, shell, boolean and offset operations have no G3/G4 guarantee.
These options request how a construction is made. They do not replace inspection of the resulting geometry.
Inspect the result
Call inspect({ of: 'continuity', code }) or pass file and optional edges. The result includes one row per sampled shared edge, with the reported class, maximum position gap, maximum normal angle, curvature difference, worst sample, and an optional OCCT stored-regularity value. Boundary edges are skipped.
The classifier samples nine points on each shared edge. Its thresholds are 0.001 mm for position, 1 degree for normal angle, and 0.05 for the combined curvature-difference score. A result is therefore a sampled classification under those thresholds, not a proof at every point on the edge. The checker stops at G2; this source snapshot has no G3/G4 classifier or G4-producing operation to document.
render_preview({ overlay: 'continuity' }) colors the sampled edge classes to help locate a join. The numbers remain in inspect; the overlay is a view of those results.