Skip to main content

Compatibility boundary

CadFlow exposes one package with multiple public layers. “Compatibility” describes the broader functional and declarative surface retained alongside the compact native Model frontend; it does not mean unsupported or deprecated by default.

Layer map

LayerTypical importsBest for
Native frontendModel, Shape, Graph, NativeSessionDirect geometry, bounded batches, native handles
Functional modelingmake_*, *_rsolid, query and topology helpersExisting feature-rich modeling workflows
Declarative workflow@model, GraphSession, serializationRecording, Model JSON, replay, semantic state
Engineering domainsassembly, scene, flexible, physical, simulationTyped product and handoff contracts
Lazy namespacecadflow.compatAccessing the public compatibility inventory without importing every implementation eagerly

Naming convention

Functional names often encode the return domain after _r, for example make_box_rsolid, inspect_sketch_rsketchresult, or export_scene_rpath. This makes generated plans and automated dispatch easier to check. The suffix is part of the public name, not a Python type cast.

Supported imports

Prefer top-level exports when available. Public module imports are supported when listed in this reference. cadflow.compat resolves the same published compatibility surface lazily.

from cadflow import compat

body = compat.make_box_rsolid(40.0, 25.0, 6.0)

Do not import from cadflow._engine. Those paths expose implementation ownership, optional dependencies, and internal types that public facades are intended to isolate.

Mixing layers

Mix layers only at documented conversion points. Native Shape and compatibility Solid values have different ownership models. Product geometry references, recorded graph nodes, and Scene resources also carry domain-specific identity.

When adapting between them:

  1. identify which layer owns the resulting value;
  2. preserve session or graph ownership;
  3. convert units explicitly;
  4. validate the result in the destination domain;
  5. avoid retaining private implementation objects.

The domain catalogs and alphabetical index are the authoritative public inventories.