Grasshopper

algorithmic modeling for Rhino

I've (along with a colleague) created a fairly rudimentary city building voronoi command, that populates a given region with a random scattering of points, and from those points creates a voronoi which is then in turn trimmed using the region inputted at the start.

At this stage everything works smoothly (picture 1). Using these curves I then want to offset to create a road network, offset once more to create a building depth and then loft to create the final building.

Unfortunately the voronoi curves along the edges are open curves from where they were trimmed, and as a result the offset fails to work correctly (not suprisingly) but I can't seem to find a method to close up the curves using the bounding area to close them? I've tried region difference/union/intersection as well as join curves to no avail.

At this point the only thing I can think of is to avoid the trim, check where the curves intersect and create points and then use those points to create a line and close the outer curves in that way, although that would ruin the curvature of the region.

Any suggestions?

Views: 7059

Attachments:

Replies to This Discussion

I am not a huge fan of the way offsetting works for closed polylines/polycurves (particularly the little tiny line segments you get when offsetting out).  I generally used the attached little cluster for all my polyline offsetting needs.  It is easy to adapt for custom offsets and to build in limits so you don't offset farther than some given value.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service