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
| Layer | Typical imports | Best for |
|---|---|---|
| Native frontend | Model, Shape, Graph, NativeSession | Direct geometry, bounded batches, native handles |
| Functional modeling | make_*, *_rsolid, query and topology helpers | Existing feature-rich modeling workflows |
| Declarative workflow | @model, GraphSession, serialization | Recording, Model JSON, replay, semantic state |
| Engineering domains | assembly, scene, flexible, physical, simulation | Typed product and handoff contracts |
| Lazy namespace | cadflow.compat | Accessing 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:
- identify which layer owns the resulting value;
- preserve session or graph ownership;
- convert units explicitly;
- validate the result in the destination domain;
- avoid retaining private implementation objects.
The domain catalogs and alphabetical index are the authoritative public inventories.