Grasshopper

algorithmic modeling for Rhino

Hello :)

I'm new in the Grasshopper world and I do some exercises in order to lern how to work with it. I'm trying to orient a polygonal ,,bricks'' on a surface, but the corners of the polygons dont lay correctly on the contour. How can I orient the edges on the contour?

Thank you :)))

Views: 957

Attachments:

Replies to This Discussion

You are attempting to divide curves (and place planes) with the same variable whilst their length varies.

Thus:

(1). Either mastermind some way to take into account the min length curve and then divide the rest "proportionally" (division by count). A possible approach is a variable division as follows:

for a given curve > divisions = divisionsForMinLengthCurve * (integer) ( currentCurveLength / minCurveLength)

(2). Or divide them by length (no results if the curve's length is less than the division length).

The attached demonstrates the above 2 ways. Since is carried over via code ... use it only as guideline and make what it does using native GH components ... a good exercise on these matters.

Of course in most of real life cases a wall consisting from odd/even modules ("bricks") it should be rather more "reasonable" (for instance by extruding vertically a curve) yielding equal length contour curves.

Attachments:

Thank you for the quick respond. Maybe I will need the help of my brother as a programer to undestand the code, but I will try to. Its anyway a great solution.

best regards

Kristina Yordanova

Did you consider rotating either the 'HFrames' or the 'Polygons' by 30 degrees?

It would be better to determine the number of bricks on each row based on the contour line lengths.

And the cull pattern should alternate between rows.  Something along these lines:

Your surface is internalized in this GH file, no need for the Rhino file.

Peter, I don't think it's appropriate to sucker people who are new and want to learn Grasshopper into looking at your C code.  They will learn nothing about GH from it.

Frankly, I still wonder if your code is safe for anyone to use?

Attachments:

Joseph Oster, thank you also for your respond.  Determining the number of the modules on each row based on the line lengths, was the next step of the program, which I wanted to achieve. So thank you about showing me the solution, before asking about that.

You are right: your solution is much more easyer to understand since I am new.

I started to learn coding one month ago and that's also a new  sphere for me, but having two solutions for the same problem is great. 

People, you are awesome. Thank you, thank you, thank you both!!!!

best wishes

Kristina Yordanova

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service