Grasshopper

algorithmic modeling for Rhino

Hello All, 

I've got multiple polysurfaces in a group. Id like to create a rectangular surface thats edges meet with the farthest outside edge of the grouped geometries. My plan was to pick the exterior face of a bounding box of each group of polysurfaces. The bounding box however is currently aligned to the xy. Im trying to align the bounding box via 3 points at the corners of the geometry. I havn't gotten very far past the bounding box part of this but my train of thought had to do with using a point to measure for the farthest distance to points which would be the "outside edges" of the geometry. Hopefully that was clear enough. Let me know if you have any ideas for an approach. Attached is some images and the groups of polysurfaces I'm working with.

Thanks!

Views: 2018

Attachments:

Replies to This Discussion

My brain isn't working right today...  Embarrassing.  Or will be when Pieter comes along with a much simpler solution.  ;-)

Rather than determine this from the collection of parts in each "panel/group", don't you have the overall dimensions somewhere to build the surface you want?

I don't know how to write GH code to handle groups of geometry separately, so my clunky solution works on only one at a time.

'BBox' returns a separate bounding box for each of the eleven parts in your group, including four polyline curves(?).  I get 'Box Corners' for all eleven bounding boxes, 'Deconstruct' all the points and sort them by X, Y and Z.  I use the minimum ('List Item, i=0') and maximum ('List Item, i=-1') X, Y and Z values to create two points used for 'Box 2Pt', a box that encompasses the whole group.

Then 'DeBrep' that box, sort its 'Faces' by 'Area' and get the last one (the largest); or its opposite, 2nd to last if you prefer, using the "One/Two" 'Value List',

Attachments:

P.S.  'Entwine' to the rescue - but you still have to assign each group separately, manually...  'Params | Group' doesn't seem to accept a collection of groups from the Rhino file?

Attachments:

Hi Shaun - Joseph,
are you trying to get the biggest (one of two) surface(s) of the boundingbox, or did I misunderstand?

Attachments:

Yeah, all the junk in the (now disconnected) purple group in the image below was because I didn't pass the 'Geo' through a 'Group' component first.  They were already grouped so I didn't know that was necessary.  The 'Params | Geometry | Group' component appears to be relatively useless.

Attachments:

Let's not forget that using 'Bounding Box (BBox)' the way we have here will fail if the panel/group is not aligned with either the 'X' or 'Y' axis...  So this approach is of limited value.

Hi Joseph and Pieter,

Thanks for the response! Your approach seems to be similar but cleaner and simpler than what I had played with earlier today. The only problem I am running into is yes the groups of poly surfaces are not all aligned to 'x' 'y'. In this case however they are aligned vertically to the 'z'. In the future though I'm sure I'll run into situations where they are not aligned to any axis. There's got to be a way to sort out a points to create a plane to align the bbox to though right? 

I haven't seen any way to align a 'BBox', though I just discovered a 'Union Box' option on 'BBox' (right click) that gets a box surrounding a collection of breps - like what I did the hard way...

I've found some interesting results by sorting and sifting the 'Vertices (V)' output from 'DeBrep', but nothing definitive yet.  (Warning - this is silly code!)

P.S.  Maybe this?

Galapagos: Minimum Bounding Box

http://www.grasshopper3d.com/forum/topics/galapagos-minimum-boundin...

Attachments:

I've attached a new approach that I think works for any orientation. Sort of, because the white faces are a bit too big for the side they're on, because they are just faces of a boundingbox. I used the most common vector for the BBox base plane's x axis, and a random other one from the list for the base plane y axis. On second thought: you could probably use "any" (I'd choose the biggest one) of the group's surfaces as a base plane for the BBox , but I have to go now, so please try that your self.

Attachments:

Very, nice Pieter!  How in the world did I miss the 'Plane (P)' input for 'BBox'!???  Doh!

I learn so much from studying your code, thank you.  'PShift' is a beautiful thing.

Even bits as simple as "+" at the _top_ of 'List Item' to get negative offsets (-1, -2,-3) instead of positive (+1, +2, +3) using "+" at the bottom.

And the 'Reverse' option (right click) on all list inputs - so convenient, but I either missed it or forgot about it.

One thing I'm still puzzled about is the 'Map (M)' output of 'CSet' - not what it is but how you use it?  Sorting it and picking the first and last items?  Can you elaborate on that part?

Very cool.

Nice one Pieter, this is another approach using Human for set multiple groups and 2d analysis to get the correct face (in your regular case).

Attachments:

I would go for the 'any-surface' approach here, plus Erick's 'Pipeline - geo group indices' logic (Thanks to Erick & Andrew): Since I'm not sure if the smaller back face is also needed, I added a way to find that (in the attached definition).

Attachments:

Here's one that's slightly less silly... and works on collections of breps that are not oriented to World XY:

The purple box creates a point at the "center" of any point cloud.  In this case, the points are the 'DeBrep Vertices (V)', filtered by 'Cull Duplicates (CullPt)'.

Then I sort the points by their distance from the center point and take the last four items (the ones farthest from the center); those four are then sorted with 'Sort Pt' to get their sequence correct for connecting to 'Srf4Pt'.

Rhino geometry for the panels/windows (or whatever they are) is internalized, with one rotated 40 degrees.

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