Grasshopper

algorithmic modeling for Rhino

Hi all,

First of two parts - the simpler one.  I'm having trouble using the Region Difference module - I had assumed it was like Rhino's Curve Boolean because of the possibility of multiple curves to input and multiple curves to subtract from - but it appears that it's more like Rhinoscript's curve boolean difference that operates on only 2 curves at a time...  If that is really the case, I'm up the creek...

The attached snip shows just a test I'm using with one main region (closed planar curve) and 4 smaller rectangles (on the same plane) that overlap it to be subtracted.  I've fed in the curves and the planes (after much trying to adjust tree branch levels) and the result, which should be one curve, is 4.  Looks like each of the rectangles is being subtracted from a copy of the the main curve, so instead of one closed outline with the 4 rectangles missing, I have 4 closed outlines each with one of the rectangles subtracted from it... :-(

In Rhinoscript I would have to subtract the rectangles one by one from the main figure - each time replacing deleting the original and replacing it with the result of the last operation.  Please tell me I don't have to do this here...

The problem is this just represents one branch of what will eventually be a tree with potentially hundreds of outlines with more hundreds of rectangles to subtract from them, so I also need to get the mapping right to make sure the correct set of rectangles gets subtracted from the correct closed outline. (that will be part 2 if I ever get there...)  --Mitch

Views: 6115

Attachments:

Replies to This Discussion

Mitch,

unless you put the 4 rectangles into a single list, the Region component won't be able to operate them at the same time. You need to figure out how to modify your rectangles so that they are grouped properly.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Yeah, I just figured that out when I heard the "ding" that indicates a message arrived that I assumed was a reply in the forum... Had to path map the rectangle list down one level to get all of the same-profile rectangles in a list instead of on their own branch... It was the one thing I hadn't tried... :-( Thanks! I will have more questions soon, I'm afraid... --M
You can flatten all the inputs to the Boolean comp no?
Hmm, I specifically didn't flatten because I thought I needed to retain the corresponding tree structure for the curves to subtract from and the curves to subtract... But, just trying it here, it does seem to work so far... So now I don't understand why a completely flat list of curves to subtract will work with tree-structured list of profiles to subtract from... I would have thought it would subtract the whole list of curves from each profile, rather than just the ones that correspond...
No, actually flattening the input does NOT work here - at first it seemed to look OK, but on examining the output objects more closely, they are wrong. The wrong rectangles are getting subtracted from the profiles (not the ones that should correspond), so the tree structure is essential in this particular definition. I'm actually happy about that, because at least it fits with my understanding of the process... --M
Hi Mitch,

I'm having this very problem, and its taken me about 8hours to find your post. I thought I had restructured my data correctly but I realise I have actually just flattened my list. Would you be able to tell me how my data should look. Here is how it looks at the moment.

Many Thanks Mickey

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service