How hlorus/cad_sketcher works
CAD Sketcher is a Blender extension for editable, constraint-driven 2D/3D sketching and part creation. Users create sketch geometry with viewport tools, add geometric or dimensional constraints, and rely on the solver to resolve the sketch; viewport drawing and picking support that interaction. The broader feature set includes workplanes, projection, modifiers/part operations, arrays, booleans and IFC export. Relationships below follow the sampled source references and README; several capability branches are documented but their runtime wiring was not sampled.
Main entry points: operators Sketch operators · curve_ref.py Geometry references · draw_handler.py Viewport drawing · workspacetools Sketch tools
Components 21
Viewport interaction
- Sketch tools
workspacetools - Sketch operators
operators - Tool state machine
stateful_operator/logic.py - Selection state
drawing/selection.py - Panels and menus
ui
Sketch model
- Sketch access
model/sketch_ref.py - Geometry references
model/curve_ref.py - Curve data
utilities/curve_data.py - Workplanes
utilities/workplane.py
Constraints and solving
- Constraint model
model/base_constraint.py - Constraint types
model - Constraint solver
curve_solver.py
Part operations
- Part and modifiers
operators/modifiers.py - Part modeling
utilities/part.py - Geometry projection
utilities/projection_anchor.py - IFC export
utilities/ifc_export.py
Display and integration
- Viewport drawing
draw_handler.py - Render data
drawing/render_data.py - Constraint icons
drawing/constraint_icons.py - Viewport gizmos
gizmos
Other components
- Blender user
Connections 20
- Blender user → Sketch tools: starts tools
- Sketch tools → Tool state machine: uses states
workspacetools/manager.py - Sketch tools → Sketch operators: invokes tools
- Blender user → Panels and menus: uses panels
- Sketch operators → Selection state: updates selection
operators/context_menu.py - Sketch access → Constraint solver: calls solve
model/sketch_ref.py - Geometry references → Curve data: reads geometry
model/curve_ref.py - Constraint model → Geometry references: resolves curves
model/base_constraint.py - Constraint model → Constraint solver: creates solver data
- Viewport drawing → Render data: uses render data
draw_handler.py - Viewport drawing → Constraint icons: draws icons
draw_handler.py - Viewport drawing → Selection state: reads selection
draw_handler.py - Constraint icons → Selection state: reads highlights
drawing/constraint_icons.py - Viewport gizmos → Geometry references: uses geometry
- Part and modifiers → Curve data: uses curve data
utilities/curve_data.py - Part modeling → Part and modifiers: uses modifiers
utilities/part.py - Geometry projection → Geometry references: references curves
utilities/projection_anchor.py - IFC export → Blender user: exports model
- Sketch operators → Workplanes: edits workplanes
- Sketch operators → Constraint model: adds constraints