Grasshopper

algorithmic modeling for Rhino

hey guys,
i have been trying to subdivide a triangle by rectangle perpendicular to the longer side of the triangle.. i am able to do it on a single triangle, but i have a case where i have many triangles.. can anyone tell me how to proceed or revise the script..

many thanks


Views: 1133

Replies to This Discussion

Hi Tushar,

that image is very small, difficult to make out what you've got so far.
What do you actually need from each triangle? A rectangle which shares one of the edges and which encompasses the entire triangle? A Plane which has an x-axis aligned with the longest triangle edge?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
hey david,
i have attached the file for u to check whats wrong.. i have a large triangle (consider it as a large plot) and i have to make small rectangular cells in it (say smaller plots in a large plot) .. so i managed to get it on one triangle (giulio helped me) .. now i want the same procedure for the other triangles as well at the same time.. and i cant get that, it messes up between them..
hope attached diagram helps

Attachments:
Hi Tushar,

Add a graft component after your referenced curves to plug into the square grid and the curve region. And remove The flatten after the dispatched curves. That should give you the right data structure to do this with multiple curves.
hey danny,
i tried that and it is givin me a chaotic result.. i have attached the image.. if possible can u edit the script and send me ..
thanks a lot

hey guys,
one more question in addition to that, i am also stuck at a point where i want to impose the base rectangular grid.. as seen in the image, i have a situation where i have a rectangle and i subdivided it into many rectangle (i.e layer 1).. on layer 2 i have triangles .. now i want to impose the rectangular cells onto the triangle to get the result as shown in the picture (i.e cells in a triangle) ..i tried to region union it (as a discussion added before, but didnt get a reply)..

can u'll please please help me with this.. its damn urgent

Hi Tushar,

To make it work I had to include a Path Mapper {A;B;C;D;E}(i) --> {A;B} to bring it back inline with the original three curves.


I also Just noticed that one of your triangles is not using the long curve for its perpendicular base.
Attachments:
thanks a lot danny..
i am a bit confused about a path mapper as usual.. so i didnt use it...
its converting 5 streams to 2? is it? i mean if i have 10 triangles, how do i judge what values i have to put in path mapper?

and also i cannot figure out how its just working o 2 triangles and not all 3 (the perpendicular thing) any clue?

and hid u understand the second doubt?

thanks for ur help
hey danny, it started working on the 3rd one as well.. i juss added 'C' in path mapper right side result..hope its correct.. was just a guess..
Path Mapper solution:

With out the path mapper applied there is a mismatch of data and because GH does not know you intentions it references all of the grid curves to all of the original curves.


When you use the path mapper you are changing the address of what you are pointing at. Think of it like a street of houses full of people in every house. If you addressed a postcard to a single person in a particular house, the postal service looks at the street address then the house and then the person. But if you wanted everyone in the house to read the postcard you wouldn't address it to an individual you would just leave it as the house name. Thereby addressing many people with one address.

So after changing the path address you are referencing 3 sets of grid curves instead of 21 individual grid curves. And because you have 3 original curves GH will think that you only want to apply one set of grid curves to one original curve

Perpendicular Solution:

It appears that you are not singling out the longest curve to start you grid from. You are only getting the grid size from the Longest curve. And then applying that to what ever the plane that is created form the polyline is, which probably starts at the origin of the polyline and it just so happens that you have drawn two of the three curves correctly by chance.
Thank U Danny,
I got it ... yeah and the perpendicular issue, as i said was solves.. i just added 'C'.. jus 2 triangles A and B were referenced.. it works now..

hey sorry to annoy u ..
can u please check this definition.. i have a problem in region intersection, same problem as stated before.. i want to project the regular rectangular grid into the triangles.. in this case i cannot use the rectangular grid component from grasshopper.. i have to manually make it.. if u check the definition, u'll understand what i mean to do..
thanks a ton again
Attachments:

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