Grasshopper

algorithmic modeling for Rhino

Hi.

I have a geometry with a lot of different planar surfaces. I want to extrude these surfaces. Think of a cube rotated in 3D. All the surfaces I want to extrude in their normal direction away from the center. To make the story short, I have a list with false and true values. This list represents a list of vectors. Those "true" I want to reverse. But I want to keep the same sorting in my vector list. I thought about using dispatch, but then I quess my sorting will change! Anybody's got a clue??

Views: 665

Replies to This Discussion

Hey there!

One way of achieving what you're trying to do would be by using an index map.

You make a series with the same number for count as you have true/false values - this is your index map. When you cull your objects using the list of true and false values you cull the index map as well. Afterwards you merge the culled objects - the reversed and non-reversed vectors and you do the same for the index-map values. The you just need to sort the objects using the index-map as key.

Kind regards
Thomas
WEM3
Hey... tak for svaret. Det lyder meget fornuftigt...det vil jeg prøve.
Lidt i samme boldgade, sidder jeg og roder med en anden liste... Det er en list indeholdende flader og dertil hørende hjørnepunkter. Nu kunne jeg så godt tænke mig for hver flade at tegne en kurve udfra hjørnerne som kontrolpunkter. Ved du hvordan man kan tegne en kurve for en flade ad gangen? Jeg vedhæfter lige et billede af min liste....
Attachments:
Hej Rasmus

Godt du fik det til at virke, men lad os holde snakken på engelsk her så de andre også får noget ud af det.

I'm gonna look at the new problem you mention when i have some time!

/Thomas
I've done the exact thing you are trying to do by using a dispatch, flipping the group I want, then using a weave component. Just put the same list of true/false values into the weave component. Dispatch and weave work very well together when you want to test for something, edit a subset of a list , and then put the whole list back together.
Thanks. That seems to work as well. Nice.

Best regards

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service