Grasshopper

algorithmic modeling for Rhino

maintain operation (slice) result list length by adding "null" items

Hello.

I'm slicing some boxes by some horizontal planes.
I also want to extrude each plane slices by a certain amount defined in a list.
It's pretty simple if planes always intersect boxes and all result branches have the same number of items.

The problem is when some boxes don't intercept all slicing planes.
Then the resulting slices for that box don't match the number of slicing planes and consequently the amount I need to extrude for each plane slice.

Hope I managed to make myself clear...

So...my question is...what can I do to maintain the relation between extrusion amounts and slicing planes?

If the "section" operation could return some kind of "null" or "empty" item for all failed intersections could be a solution.

Can someone help me?

Thanks


Views: 406

Replies to This Discussion

make a vb component, plug your section output in to the x input.

double click the component and type 'a = x'

This will replace empty branches with nulls.
I vaguely remember dealing with that issue when I put this definition together.

There's a fair amount of branch management involved.

http://fancywires.com/?p=59

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service