Grasshopper

algorithmic modeling for Rhino

Hi guys!

I am new one here and still more or less beginner with grasshopper. I have some problem with my algorithm so I hope someone can help me with it.

Ok so, I have a set of surfaces- faces of the mesh and I have some lines in different directions projected on those surfaces. I needed to find an average direction among those lines and I managed to do it on one surface as an example, but now I have to apply it on the whole thing. The problem is my surfaces are on one list and lines on the other one, so when I apply my algorithm I get one average direction of all the lines, not one average direction separately for each face and set of lines on that face. 

I need help how to separate those things and how to make faces and lines on them work together independent from the others.

I dont know if my question is clear enough, let me know if I have to explain it better.

I am looking foreward to hearing from you.

Best,

Ani

Views: 780

Replies to This Discussion

Hi Ani,

I think I understand what you want to do, but it would be great if you could post up your code. and have the the Surfaces and curve Internalised (Right Click on component then click internalise).Also some screen captures of the code/rhino (Ctrl-Shift-Q). would be a great help.

As we are a visual bunch here ;)

Cheers

Matt

Hey Matt, thanks for your answer. Maybe is the easiest if I post my rhino and grasshopper files so you can see easily what I did and what I meant :)

Here it is..

When I apply it to the whole thing it gives me just one average direction of all the lines together, instead I need average direction line for each srf separately.

Thank you for your help and looking forward to hearing from you

Cheers

Attachments:

From what I can tell...

  • Your 'Srf' (surface) input consists of only one section out of 55 (5 X 11) sections on the large surface in your Rhino file?
  • Your 'Crv' input consists only of the lines (10) that cross that one section?

What about the other 54 sections of the large surface?

  • Three of the ten vectors created from those lines go in opposite directions - so how useful is their average ('Avr')?  Maybe that's why...
  • You want to subdivide ('SubSrf') this one section (of 55 total on the larger surface) and find the line segments (which become vectors) that cross each sub-section?

Is this correct so far?

By the way, in the second part of your code on the right, you are using 'VRot (Rotate a vector)' to rotate a line - that you created from a vector; probably could be simpler?

I did it only on one surface just as an example what I want to have on all the 55 surfaces. But I have a problem that I dont know how to apply the same logic on all the other surfaces, considering all the other curves and to have direction lines for each face separately.

So ultimately you want to subdivide all 55 surfaces?

What are you trying to accomplish?  What's the big picture?

P.S.  In the larger surface, the lines depart from the non-planar sections; this will cause 'Surface | Curve (SCX)' intersections to fail (obviously?).

here is the fixed one. these are original lines form which I should find the average one per each face.

Attachments:

Hi Ani

Been a busy day at work and could not get so far with you first example, Think I have solved it for this case but don't know if its bomb proof or what happens if you put in alot more curves and surfaces. But give it a try.

Hope its some help.

Matt

Ps. That's not a Beginner Problem.. That took some thinking... ;)

Attachments:

CODE UPDATE USE ME!!! Removes Duplication of surfaces so faster.

Attachments:

thank you very much Matt :) It gets a bit fucked up when I apply it on more surfaces and with more curves. But I will try to understand your principal and somehow solve it :)

It's a big help for sure! It's still a bit new for me all this, so I struggle a bit, but I hope I manage to make it.

Thanks again :)

Hmm... I did a few tests to break the example you sent but all seem to work here. Have a Play but if you can't solve it post the broken file and I will try and have another look. Don't like broken codes :(

thank you very much! I will keep working. If I really get in trouble and not able to make it, I will contact you again (at least some tips).

So kind of you!

Cheers

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service