Grasshopper

algorithmic modeling for Rhino

Hi everyone,

Very new to Grasshopper here - I'm trying to do something that's probably quite simple, I just can't seem to find what I'm looking for.

So I have a surface, I've divided the domain^2 and made a matrix of subsurfaces from that.  Simple.  What I want to do now is select a checkerboard pattern in that collection of subsurfaces.  Simply adding a 'cull nth' set to every other number selects whole rows of subsurfaces in the 'v' direction.  I know this has something to do with the way the data is organized as it exits the isotrim icon, but I don't know how to augment that data to 'reset' it to achieve the checkerboard.  Any suggestions?.

Views: 3588

Replies to This Discussion

Hi Brorstein,

Using a Culling component, you can remove specific items from lists of data. If all your items (sub-surfaces in this case) would be in a single list, then a Cull Nth component would generate a checker pattern, provided there are an odd number of items along each side.

If your items are stored in separate columns, you'll have to operate on each column individually. You can either generate multiple series of numbers, starting at zero and one alternatively, or you could create different culling patterns.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Attachments:
Here's how I get around this :

where the expression is (a*c+b*d)%2
Nice! Thanks David and Daniel for the quick responses. I've already succeeded with David's technique. Daniel, I'm going to set up a scenario like you've posted and work through exactly what's happening at each component. This plug-in is like a crash course in a lot of math I've forgotten. :P
You got me started playing with checkerboards again :

:)
Showoff!

Another n00b question: the 1-rail sweep component seems to default w/ freeform. Is there a way to get it to the equivalent of roadlike top?
Not to keep bumping this thread, but I just figured out that a 2-rail sweep with a second rail holding the hand of the section basically does what I was intending - but I'm still curious if there's another workaround for 1-rails or not.
really!

Hi Daniel,

Could you tell me how are you doing this? 

Hi Daniel,

 

Thanks a lot for this trick, it works perfectly!

Could you explain how (a*c+b*d)%2 works ? what is the % for ?

Is there a way to get the culled faces?

 

Many thanks,

 

Arthur

I tried using this expression but it tells me that the expression ( (a*c+b*d)%2  ) can't be used in an If expression. How did you use it so that it can be used as a Boolean input for the cull component? 

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service