algorithmic modeling for Rhino
I'm new to Rhino and Grasshopper, and have been teaching myself Grasshopper as part of a architecture course at university. Things have been pretty fun and interesting so far, but I've come to an issue where I'm not sure how automate a check to tell whether a closed curve will expand or contract when used with the Offset capsule (for curves, not surfaces).
More detailled explanation of what I'm working with:
1) Define a planar surface (currently a rect, but I'd like to generalise later on).
2) Define some curves on the same plane as that surface (any number of intersections between curves allowed).
3) Surface split that surface using the curves, cutting it into as many non-overlapping subsurfaces as possible (like cutting out a jigsaw puzzle).
4) For each subsurface curve, offset to *shrink* it by, say, 2 units, and make that a surface if possible.
Is there a way to ensure the curves will always shrink, rather than occasionally expanding like they sometimes are now?
My current workaround is a VBScript that offsets in a positive and negative direction, then compares the AreaMassProperties area of the surfaces generated to return the smaller surface. It works in all cases except when offsetting in one direction causes the curve to self-intersect so it "flips" inside-out.
Thanks
(Sorry if this is posted in the wrong section, this is my first time here!)
Tags:
In general, I do the same thing you're describing, but with components - offsetting in both directions and comparing the length. However, as you note, occasionally this doesn't work, so for situations like that I have a script that uses a different offset method from the SDK, one that takes the additional input of a point in order to specify the offset direction. I posted this script here: http://www.grasshopper3d.com/forum/topics/offset-problems?commentId...
Hope that helps!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2025 Created by Scott Davidson.
Powered by