Grasshopper

algorithmic modeling for Rhino

Hey guys,
Do you know how to change direction of curves ? I've got stuck here.
Boundary Suface - Could you explain me why it did not work?
As you can see in some cases smaller plane can cut a hole in larger ones.
But not in every case. Why is that? Would be glad for explanation and help with it.

Views: 3149

Attachments:

Replies to This Discussion

Hmm ... I have several defs that do (very fast) any Region imaginable out of any (planar) List of randomly sampled closed co-planar curves ... but they are carried over solely via code (meaning no native components of any kind).

Notify if you think that such an approach could be useful to you.

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: Your stuff is included at test AND down scaled in order to "fit" with the examples provided.

BTW: Mind the size of curves VS the given document tolerance.

Load R file first.

Attachments:

Thank you.

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.

Attachments:

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).

Attachments:

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.

color should be red in all of cases.

Hi.

I suppose it's not a common solution but you can check attached two cases if you want.

Attachments:

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

You're changing the subject... while solving the problem ! :) Good catch Mire (the selfintersections).

It seems just putting the selfintersecting curves in a separate branch prevents trouble:

Attachments:

Great! :) thx!

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