algorithmic modeling for Rhino
Great! If you would be so kind, I would be happy to use those defs!
OK, get the simplest (and least capable) for a start:
It works by testing region containment of "Level 1 nesting" so to speak (i.e. it doesn't work for curves that contain curves that contain ... blah blah).
See such a level 1 nesting using text (as curves):
BTW: Mind the size of curves VS the given document tolerance.
Load R file first.
But I think that it will not help me in the way I wanted to do it.
Tried it in your files. Worked if we are talking about holes, but still planes are in different directions. There should be better solution for me. Simplier one.
I will manage to do it. Hopefully. Because it's only part from big .gh file. Don't want to divide my algorithm to smallers steps in many files.
But still thank you for trying to help.
Planes? what planes? What directions? What have to do planes (other than the obvious co-planarity condition) with regions ???
Or maybe you mean that you want 2 things: (a) make the regions (b) create planes "related" (say: origin) with these AND pointing towards the same direction? (say: XAxis). If so it's very easy ... provided that you can explicitly describe what "direction(s)" mean to you.
Or by "direction" you mean curve orientation (say: VS World.ZAxis): clockwise or the other thing? (very easy as well).
Yes, you're right, I did not make myself clear.
Directions. I mean that each of the curves was oriented in the same direction (clockwise).
I tried to do this by a flip and dispatch components. But I not quite sure if I know how to achieve the geometry.
Then I wanted to swap curves to boundary surfaces.
Some of these surfaces comprises other, smaller inside, which should be subtracted from the larger. By creating such a plane with a hole.
Well ... since you are NOT after hole nesting > 1 ... it's a bit unclear to me why the C# provided doesn't cut the mustard for you.
BTW: "Swap" curves to Breps ??? You must do something with the (potential holes) first you know. Or you think that the orientation trick could ...er ... do that by miracle ???
Anyway ... get this V2: added a very naive piece of C# code that does the close curve (+/-) orientation job (VS a given "orienting" Vector). For large amount of curves ... set report == false (for speed).
I simply would like to understand how things work and use it. And if it is possible don't use the C# code. I got probably a similar script to change orientation from my friend. However, they work similarly. Just like yours. Doesn't change all of them to the same orientation.
Hi Agnieszka, I think the reason why the component is not working is because you have some self intersecting curves. You can remove them with the help of the self intersection component, and then it will work as expected.
As of how to repair the the self intersecting curves in grasshopper I am not sure what the best way to do it would be
Great! :) thx!