Box Morph Question: unwanted scaling and rotation

Hi all, after a long while of being stuck here I am.

Trying to apply a simple facade module (12 closed breps) to a part of a facade using Box Morph.
Each piece of the dispatched modules somehow gets scaled and rotated (see original facade module).
Tried swapping UV.
Attached is an isolated and simplified script highlighting my issue. Any pointers appreciated.

220119 box morph question.gh (108.8 KB)


220119 box morph question_update.gh (105.9 KB)

Thanks for your time Ethan. This is helpful. (wanted them perpendicular as you showed it)
nowhere near origin cuz it’s a massive master planning model :sweat_smile:

It seems a little counter-intuitive that the source box is oriented perpendicular to the geometry it contains, why is that?

And why does yours not have the werid scalling issue?

Thanks

I tried rebuilding the surfaces to fix horizontal vs. vertical orientation but got an unexplained result!?


box morph_2022Jan19a.gh (116.4 KB)

Thanks, Joseph. Seems to be the exact issue I am having as well.

I simplified the code to get this, where length of the boxes is mixed up with width.


box morph_2022Jan20a.gh (111.3 KB)

Which led to the insight that the box is misaligned and needs to be rotated to match the base pattern. (white group)


box morph_2022Jan20b.gh (111.6 KB)

P.S. Small detail… Change the Rot3D ‘A’ (Angle) to negative to get the facade “boxes” flush on the surface side: -0.5 * Pi


box morph_2022Jan20b2.gh (113.6 KB)

This is the simplest so far, and arguably most correct because it responds to panel orientations (which are reversed top and bottom) instead of always aligning with ‘Z’. It uses YZ as the BBox ‘P’ (reference plane) input instead of the default XY plane.


box morph_2022Jan20c.gh (109.4 KB)

P.S. If you prefer to ignore surface orientations and align top and bottom facades to match, the yellow group (below) does that:


box morph_2022Jan20c2.gh (110.7 KB)

1 Like

What would this forum be without you! Thanks. The result from Jan20c is exactly what I am after. (The orientations are intentional.)

Although I still don’t understand why the bounding box worked while the twisted box didn’t (why the original is misaligned). I made sure that I had the surfaces oriented the way I wanted, then made the twisted box with “Surface Box”, expecting that they will be correctly aligned…

I didn’t fully understand what you were doing with SBox (Surface Box) but I’m extremely used to thinking about plane orientation, as used by BBox and many other components. Getting planes to match is a very common requirement.

By the way, a great deal of visual information about plane orientation is lost when geometry gets “very large”. The useful oriented plane icon gets lost because it doesn’t scale with large geometry. (use ‘Shaded’ mode to see the plane’s ‘Z’ axis)