Python library for reading a SolveSpace file as a python-solvespace
system.
pip install git+https://github.com/kktse/slvstopy.git
from slvstopy import Slvstopy
system_factory = Slvstopy('path/to/your/solvespace/file.slvs')
system, entities = system_factory.generate_system()
Where:
system
is aSolverSystem
entities
is a dictionary of typeDict[str, Entity]
with dictionary keys corresponding to the entity id (ie.Entity.h.v
)
Create a virtual environment (ex. python -m venv env
) and run the following command to install project dependencies:
make init
To run unit tests:
make test
With code coverage:
make test-coverage
make lint
make format
This library uses python-solvespace
as a SolveSpace backend. This library will only support entities implemented by python-solvespace
.
- Entities and constraints only
- Not all entity types are implemented
- Not all constraint types are implemented
- Circles are supported in 2D only
- Do not dimension from a workplane in 2D
This library addresses a need to graphically draw complex mechanisms and analyze them programmatically.