Skip to main content

Native and compatibility boundary

CadFlow is migrating geometry-heavy work into the native C++ session while preserving the complete public feature surface. A passing compatibility suite does not imply that every geometry path is native.

Current measured surface

The CadFlow 0.1.0 repository snapshot documents:

MetricCount
Preserved compatibility exports329
Complete current package exports414
Public functions in the compatibility surface213
Modeling-operation functions164
Native dispatcher operations36
Regression tests1010 plus 313 parametrized subtests

Counts are implementation evidence, not a compatibility promise. Use public imports and capability reports rather than branching on these totals.

Native C++ today

The session owns and executes:

  • box, cylinder, sphere, and cone primitives;
  • polyline, circle, arc, interpolated spline, helix, and exact B-spline curves;
  • planar faces, Bezier surfaces, fitted B-spline surfaces, and surface construction;
  • extrude, revolve, loft, sweep, twisted sweep, fillet, chamfer, and shell;
  • exact cut, union, and intersection;
  • translate, rotate, mirror, and scale;
  • mass properties, bounds, topology, distance, normals, curvature, and face-pair metrics;
  • tessellation, STEP/BREP/STL import, STEP/STL export, and GLB source buffers;
  • a multi-operation batch graph through one C ABI call.

Python by design

The following are intentionally Python-owned:

  • expression graphs and unit systems;
  • Model JSON, strict replay, Scene archives, and schema validation;
  • product assemblies, connectors, and constraint reports;
  • materials, physical connection declarations, and solver-neutral contact packages;
  • semantic tags, source mapping, and lineage;
  • translators, documentation tools, and standard-part parameterization.

These are public features even when they are not native.

Remaining kernel migration

Two richer compatibility paths are explicitly tracked:

  1. Hole filling with the full legacy N-side constraint parameter set.
  2. Exact Gordon curve-network interpolation matching the optional ocp_gordon behavior byte-for-byte.

The native facade already provides deterministic surface filling and Gordon construction, but it does not promise every legacy parameter or identical implementation detail.

Integration rule

Depend on behavior and public modules, not implementation placement:

import cadflow as cad

with cad.Model() as model:
part = model.box(10, 20, 3)

Do not import cadflow._engine, retain OCP objects, inspect private shape handles, or load libcadflow_core directly. That boundary is what lets a feature move from Python to C++ without rewriting application code.