Grasshopper

algorithmic modeling for Rhino

Black = Wall

Red = Wall Center Line

.. 
I want to extract the center line of each wall, when i selected Wall Curves. 

any idea?

Views: 3743

Replies to This Discussion

There's nothing in the Rhino SDK that will help you, you'll need to develop some sort of algorithm from scratch. This sounds like it would be pretty difficult, unless you can make a lot of assumptions for the specific cases you'll be needing this for (ie. walls never thicker than x mm, walls never shorter than y mm, walls always at 90 degrees angles, ...)

There is a way, using veronai, to find the center line, I believe one of Daniel Piker's older posts show this method. Also, if you look at the method shown a few days ago by Shridhar Mamidalaa for producing beveled text from a curve, then extract or calculate the 'centerline ridge', that will also give you the centerline, more accurately than the veronai method.

another way, if you will always be working  with linear walls (no curves), is to calculate midpoints of the endlines of the wall, perpendicular to the long axis of each wall segment, then connect the dots. Or, if you can filter out the discontinuities, try using the "tween curves" component.

Depending on your needs, the Medial Axis or the Straight Skeleton might work for you. There are several algorithms for calculating these. I remember seeing a couple of medial axis implementations on the forum, believe they all use the subdivision/voronoi method.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service