Grasshopper

algorithmic modeling for Rhino

how can i access the width and height information that is output by the rectangle component?

Views: 2345

Replies to This Discussion

Hi Matei,

Use this:

Part of the definition you need are these four components right of "Rectangle" component. The rest I used just to simulate your data.

Attachments:

Hi Djordje,

Thanks for the reply.

But you don't know if there is any way to directly access the data?

I used a slightly different work around, which I think is more flexible (my rectangles are not aligned to any plane)

If your rectangles are not parallel to any of XY, XZ, YZ and parallel with X,Y,Z directions, then - yes, my method would not work, and yours will.

That is why it is always helpful if a .gh file is attached, as from your screenshot it was not clear whether your rectangles fulfil upper conditions or not.
Glad you solved the problem.

This is all pretty horrific. I'll add a component for this that can sit next to Circle Center.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Added.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Nice.

wow, that is great

thanks

in the meantime, a script that does the same:

private void RunScript(System.Object x, ref object p, ref object w, ref object h)
{
Rectangle3d rect = (Rectangle3d) x;
p = rect.Plane;
w = rect.X;
h = rect.Y;
}

Nice. Thank you.

here is  another simple way. Funny it works with all the components default pattern settings :)

Attachments:

brilliant!

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