Introduction
This python package tailored to the GH/Rhino environment allows for distance based removal of curves. When a bunch of curves are too close to adjacent curves the python package identifies the curves that have to be removed in order to fulfill the distance constraints but also keep as many curves as possible.
Theory
A group of curves can be representet as a graph where each curve is a vertex (curve = V) and each edge represents a distance violation between two curves (E(u,v) if dist(u,v)< dist_limit). To find the maximum set of curves that do not violate the distance constraint one has to identify the maximum independent set of vertices that do not have an edge (thus no distance violation). This is done utilizing a greedy MIS (maximum independent set) algorithm on the graph based. The heuristic removes the vertices with the most conflicts at first offering a approximation to the "perfect" solution as it is an NP-hard problem.
Input
The python package takes at most three inputs:
- A list of curves (Required)
- A distance threshold (Required)
- User-defined curves that should not be removed. (Optional)
The python package can just be called inside of a python3 grasshopper component.
Example files
A GH example file can be found on: https://github.com/Brandes21/PyPa/tree/main/Example_files
For any questions or in case of bugs feel free to contact me on: niclasbrandt97@gmail.com
Metadata
Release files for MIS-curves 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mis_curves-0.1.4.tar.gz | 4.3 kB | Without provenance | Details for mis_curves-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mis_curves-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for mis_curves-0.1.4-py3-none-any.whl |
Total release size: 9.0 kB
Release files / mis_curves-0.1.4.tar.gz
| Download URL | mis_curves-0.1.4.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6f740e2a0ff6e47a5c26c3bddee79a98a7c5ca1a3dc69d5db9b5000c2a08c9e
|
|
BLAKE2b-256 checksum How to use checksums |
1b06d0e828f524826da9dca617cdd206d174043311a985f836f7f8b93feb5897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.1
|
Release files / mis_curves-0.1.4-py3-none-any.whl
| Download URL | mis_curves-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3935417a16838fcdaf31c85bc1d0c33ca4017b07ce360dbb79c9b51cb54a4313
|
|
BLAKE2b-256 checksum How to use checksums |
2aae9b34f34437461ffd52a418d4502aa1084cff1c7c1f449b37c12ca2226f89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.1
|
Security for MIS-curves 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.