Align bounding box with selected edge?

Orange is the bounding box, Grey is the floor, any node I can use to align and rotate the bounding box with the selected edge (red line) on floor? Thank you.

Below is the result I want that I did manually.

You’ll need to transform the geometry to align with the Coordinate System, Create the Bounding Box and then transform back the Bounding Box geometry to its original position

In the example below the floor edge (to which the BB needs to be aligned) and floor are selected


cs.dyn (23.7 KB)

5 Likes

Thanks Vikram!! It works nicely. Successful work below. :blush:

1 Like

Got stuck on aligning the tiles (399 cuboid) with the selected edges.

I tried to use the Geometry.Transform but warning is shown. Any idea? Attached the dyn file for your quick reference.

Split surface (bounding box fix).dyn (1.1 MB)


tiling.dyn (53.0 KB)

1 Like

Thanks Vikram, but this created another bounding box rather than the original one, I tried to apply your script with my original bounding box (it created a new light orange bounding box under the polygon floor), is there a way to translate the existing tiles?


Split surface (bounding box fix 2).dyn (1.2 MB)

If the objective is to get the number of tiles (cut,uncut and total), you should be able to obtain that information from the graph provided without attempting to incorporate it into another graph.
You’ll need to just get the count of the lists from the last FilterByBoolMaskNode (in and out should give you cut and uncut)

You’ll need to create the tiles after the first transform (not earlier) and then transform it to the original floor orientation.That way the alignment is also transformed, not just the position.

Another way to think about this type of exercise is cutting up the existing surface. This is one such example: