How jacobstoren/solvespacelib works
SolveSpaceLib is a small library exposing SolveSpace’s geometric constraint solver to applications. The main workflow is to construct parameters, entities, and constraints, request a solve, then read updated parameter values and the solve status. The graph preserves the indexed solver, sketch, geometry, and rendering modules, though the README does not describe them as separate product capabilities. Internal call relationships are only connected where shown; dashed links mark likely runtime handoffs not verified by the excerpts.
Main entry points: solvespace.h Geometry declarations · example_S_Curve.cpp S-curve example · SolveSpaceSystem.h C++ system wrapper · lib.cpp API adapter
Components 19
Library API
- S-curve example
example_S_Curve.cpp - C solver API
libslvs/include/slvs.h - C++ system wrapper
libslvs/include/SolveSpaceSystem.h - API adapter
libslvs/lib.cpp - Wrapper implementation
libslvs/SolveSpaceSystem.cpp
Constraint Solver
- Solver system
libslvs/system.cpp - Constraint equations
libslvs/constrainteq.cpp - Symbolic expressions
libslvs/expr.cpp - Expression types
libslvs/expr.h
Geometry Model
- Sketch model
libslvs/sketch.h - Geometric entities
libslvs/entity.cpp - Geometry declarations
libslvs/solvespace.h - Solver structures
libslvs/dsc.h - Parametric surfaces
libslvs/srf/surface.h
Geometry Support
- Polygon geometry
libslvs/polygon.h - Rendering interface
libslvs/render/render.h - Platform utilities
libslvs/platform/platform.h - Resource declarations
libslvs/resource.h
Other components
- Calling application
Connections 17
- Calling application → S-curve example: runs example
- S-curve example → C++ system wrapper: builds and solves
example_S_Curve.cpp - C++ system wrapper → Wrapper implementation: implemented by
libslvs/SolveSpaceSystem.cpp - Wrapper implementation → API adapter: invokes solver API
- API adapter → Solver system: delegates solving
- Constraint equations → Geometry declarations: uses declarations
libslvs/constrainteq.cpp - Geometric entities → Geometry declarations: uses declarations
libslvs/entity.cpp - Symbolic expressions → Geometry declarations: uses declarations
libslvs/expr.cpp - Solver system → Geometry declarations: uses declarations
libslvs/system.cpp - Geometry declarations → Platform utilities: includes
libslvs/solvespace.h - Geometry declarations → Resource declarations: includes
libslvs/solvespace.h - Geometry declarations → Solver structures: includes
libslvs/solvespace.h - Geometry declarations → Polygon geometry: includes
libslvs/solvespace.h - Geometry declarations → Parametric surfaces: includes
libslvs/solvespace.h - Geometry declarations → Rendering interface: includes
libslvs/solvespace.h - Geometry declarations → Sketch model: includes
libslvs/solvespace.h - Geometry declarations → Expression types: includes
libslvs/solvespace.h