Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/normanrichardson/rhino_shapely_interop
A python package for converting rhino geometry into shapely geometry
https://github.com/normanrichardson/rhino_shapely_interop
numpy python rhino3dm shapely
Last synced: 6 days ago
JSON representation
A python package for converting rhino geometry into shapely geometry
- Host: GitHub
- URL: https://github.com/normanrichardson/rhino_shapely_interop
- Owner: normanrichardson
- License: mit
- Created: 2021-07-08T21:53:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T19:57:23.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T23:39:52.293Z (about 1 month ago)
- Topics: numpy, python, rhino3dm, shapely
- Language: Python
- Homepage:
- Size: 323 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
README
# rhino_shapely_interop
A python package for converting rhino geometry (https://www.rhino3d.com/) into shapely geometry (https://pypi.org/project/Shapely/).## Installation
```
$ pip install rhino-shapley-interop
```## Supported Geometry:
1) Rhino Points -> Shapely Points
2) Rhino Curves -> Shapely LineStrings
3) Rhino Breps -> Shapely Polygon (limited to planer single surface breps)## Current Limitations:
1) One way (Rhino to Shapely)
2) Rhino is 3D, Shapely is 2D (effectively)
* Breps are limited to planer single surface breps
* A shapely plane is defined
3) InstanceDefinition geometries are ignored (geometry listed in rhino3dm.File3dmInstanceDefinitionTable)
* Blocks
* Annotations## Examples:
See
1) [`example1.py`](https://github.com/normanrichardson/rhino_shapely_interop/blob/master/examples/example1.py), and [`example3.py`](https://github.com/normanrichardson/rhino_shapely_interop/blob/master/examples/example3.py) for importing from a file
2) [`example2.py`](https://github.com/normanrichardson/rhino_shapely_interop/blob/master/examples/example2.py) for importing from serialized brep# Development/Contributions
1. Fork and clone to a local working directory
2. Setup a virtual environment
```
$ python -m venv env
$ source env/bin/activate
```3. Install in editable mode
```
$ pip install -e .[dev]
```4. Testing
```
$ python -m unittest test.unittests
```