Skip to content
/ slvstopy Public

Python library for reading a SolveSpace file as a python-solvespace system - work in progress - improvements and pull requests are welcome!

License

Notifications You must be signed in to change notification settings

kktse/slvstopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slvstopy

Python library for reading a SolveSpace file as a python-solvespace system.

Getting Started

Installing

pip install git+https://github.com/kktse/slvstopy.git

Example

from slvstopy import Slvstopy

system_factory = Slvstopy('path/to/your/solvespace/file.slvs')
system, entities = system_factory.generate_system()

Where:

  • system is a SolverSystem
  • entities is a dictionary of type Dict[str, Entity] with dictionary keys corresponding to the entity id (ie. Entity.h.v)

Running Tests

Environment

Create a virtual environment (ex. python -m venv env) and run the following command to install project dependencies:

make init

Testing

To run unit tests:

make test

With code coverage:

make test-coverage

Linting

make lint

Formatting

make format

Dependencies

This library uses python-solvespace as a SolveSpace backend. This library will only support entities implemented by python-solvespace.

Caveats

  • 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

Motivation

This library addresses a need to graphically draw complex mechanisms and analyze them programmatically.

About

Python library for reading a SolveSpace file as a python-solvespace system - work in progress - improvements and pull requests are welcome!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published