Grasshopper

algorithmic modeling for Rhino

Hey !

Is there any component that computes the optimal rectangle for a planar curve/polysurface, as the bounding box do w/ Breps but 1 dimension less ?

Actually, I tried with the bounding box but only problems came to myself.

Thx for your kind answers !

Views: 3864

Replies to This Discussion

What do you mean by "optimal"?  Minimum area?  'BBox' typically keeps its edges aligned to WorldXY so it's possible there might be a rectangle with a smaller area if it were rotated a bit.

Why did the 'BBox' fail?  Post some code.

Works for me:

But as you can see, minimal area of the rectangle for this curve happens when the 'BBox' plane is rotated ~66 degrees:

Attachments:

You guessed rightly, i were searching for the minimum area but finally, i dont quite need this optimal rectangle.

Just a fitting one do the job in my case.

So, BBox problem : when your surface is worldXY no problem but there are some orientation you dont have an untrimmed srf, nor a flat box but a box.

I was almost writing a piece of C# when a friend reminded me the existence of "Plane Through Shape" (cutted banana)

Worked at work, 'll work at home

Thx again mister, have a nice evening !

There are many ways to create a reference plane for 'BBox'.  Rotating a 'WorldXY' plane, a I did above, is one of them.  It can be rotated using any arbitrary axis (or two!).  Have fun.

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