Jump to content

Group by size


Recommended Posts

Hello everyone, how i can do groups by geometry size, per example, i want have the little chunks of a demolition

thanks

if your "chunks" are a mesh surface, ie 1 prim, then you can use an measure SOP > Area and use that attribute to group by their size. If they are a poly surface, then you could try a For Each SOP to measure the Bounding Box of each "chunk"...Inside the For Each SOP you could get the "size" of the Bounding by measuring the length of two opposite corners

length($XMAX - $XMIN, $YMIN - $YMAX, $ZMAX - $ZMIN)

and then group based on the "size"

Link to comment
Share on other sites

two other methods

1.

you can use foreach sop and measure sop to calculate area/volume of each chunk directly

inside foreach (filtered by piece* group mask)

-> measure SOP area/volume (it is calculated per primitive)

-> attribPromote SOP area/volume from Primitive to Detail with SUM method

-> attribPromote SOP area/volume from Detail to Primitive with almost any method, say Average

this way each primitive will have area/volume attribute with value of the area/volume of the whole chunk it belongs to

then primitive group by volume attribute treshold ($VOLUME<10 or similar)

(maybe you'll need to create attribCreate SOP before group, just to create AREA/VOLUME variable, so set it to primitive and uncheck write values)

2.

if you have DOP simulation of the chunks you can use "dopobject" attribute created by Dop_import SOP to get mass of each chunk from your dopnetwork by dopfield() expression

then group by mass atrtibute treshold

  • Like 1
Link to comment
Share on other sites

  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...