Skip to main content

Removal of too close curves in the GH/Rhino environment

Project description

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:

  1. A list of curves (Required)
  2. A distance threshold (Required)
  3. 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:

For any questions or in case of bugs feel free to contact me on: niclasbrandt97@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mis_curves-0.1.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mis_curves-0.1.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file mis_curves-0.1.3.tar.gz.

File metadata

  • Download URL: mis_curves-0.1.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.1

File hashes

Hashes for mis_curves-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6691ec358cc6a5af480a67933593dd610bdc39118d5f6bc5ee1a1893f4e13cca
MD5 ea3ee6d8de6def2dea750503e47d0680
BLAKE2b-256 a6852be2364facba51d3e913557c468f2e9c9f04b036788401a57fc263ee7f6b

See more details on using hashes here.

File details

Details for the file mis_curves-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: mis_curves-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.1

File hashes

Hashes for mis_curves-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d7efadb5a86e0d74570dccc47960d35794b31b462f39c89bbfd915411e9b87d6
MD5 9db3e0738d661b437dd9f84d9ba252f3
BLAKE2b-256 bbd6555c0ba879732e809011088258c6678189694abf99dd267dcfbc601e8002

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page