How mariow98/cad_zero works
CAD_0 is a dual-representation CAD kernel with a desktop modeling application and Python interfaces. A user creates or edits scene features— including sketch profiles extruded and subtracted into solids—then views, exports, or saves the result. The scene layer coordinates SDF and B-Rep operations; the kernel also supports mesh extraction, interchange formats, and conversion between representations. The README and source index establish these major branches, but several UI and kernel implementations were not sampled, so their internal call paths are not expanded here.
Main entry points: scene.hpp Feature Scene · __init__.py Python API · main_window.py Desktop App · sketch_workbench.py Sketch Workbench
Components 20
Desktop UI
- Desktop App
app/src/CAD_0/ui/main_window.py - Sketch Workbench
app/src/CAD_0/ui/sketch_workbench.py - Sketch Canvas
app/src/CAD_0/ui/sketch_canvas.py - 3D Viewport
app/src/CAD_0/ui/viewport_widget.py
Python Interfaces
- Python API
app/src/CAD_0/__init__.py - CLI
bindings/python/CAD_0/cli.py - Native Bindings
bindings/python/src/module.cpp
Scene and Persistence
- Feature Scene
core/scene/include/CAD_0/scene/scene.hpp - Native Projects
core/io/src/native.cpp
Geometry Kernel
- SDF Kernel
core/sdf/include/CAD_0/sdf/operators.hpp - Sketch Profiles
core/sdf/include/CAD_0/sdf/sketch_profile.hpp - Sketch Constraints
core/sdf/include/CAD_0/sdf/sketch_solver.hpp - SDF Meshing
core/sdf/src/mesh_extract.cpp - Exact B-Rep
core/brep/src/boolean.cpp - B-Rep Topology
core/brep/include/CAD_0/brep/topology.hpp - Representation Bridge
core/bridge/src/brep_to_sdf.cpp - Rendering Engine
core/viewport/src/renderer.cpp
Interchange
- Mesh Import Export
core/io/src/obj.cpp - Body Reports
bindings/python/CAD_0/report.py
Other components
- CAD User
Connections 23
- CAD User → Desktop App: models in
- Desktop App → Feature Scene: edits features
app/src/CAD_0/ui/main_window.py - Desktop App → Native Projects: saves projects
app/src/CAD_0/ui/main_window.py - Desktop App → 3D Viewport: displays model
app/src/CAD_0/ui/main_window.py - Desktop App → Sketch Workbench: opens workbench
app/src/CAD_0/ui/main_window.py - Sketch Workbench → Sketch Canvas: edits profiles
- Feature Scene → SDF Kernel: dispatches SDF
core/scene/include/CAD_0/scene/scene.hpp - Feature Scene → Exact B-Rep: dispatches B-Rep
core/scene/include/CAD_0/scene/scene.hpp - Feature Scene → Representation Bridge: converts shapes
core/scene/include/CAD_0/scene/scene.hpp - Feature Scene → SDF Meshing: extracts meshes
core/scene/include/CAD_0/scene/scene.hpp - Sketch Workbench → Sketch Profiles: creates profiles
- Feature Scene → Sketch Constraints: stores sketch constraints
core/scene/include/CAD_0/scene/scene.hpp - Sketch Profiles → SDF Kernel: extrudes to solid
- SDF Kernel → SDF Meshing: extracts surface
- Exact B-Rep → B-Rep Topology: operates on topology
core/brep/src/boolean.cpp - 3D Viewport → Rendering Engine: renders scene
- Python API → Native Bindings: exposes kernel
- CLI → Python API: uses package
- Python API → Feature Scene: creates scenes
- Python API → Mesh Import Export: imports exports
- Python API → Native Projects: saves loads
- Python API → Body Reports: reports bodies
bindings/python/CAD_0/report.py - Mesh Import Export → SDF Meshing: exports meshes