Need help to mirror panels

I should take some random panels and rotate them by 180 degrees while still maintaining their orientation on the plane. The panels need to rotate, but the normal vector should remain the same. They should not rotate in space, only on the XY plane of support. However, I’m not sure how to do it.

file pcc.gh (69.5 KB)

This was not the answer? What was the issue?

this catches the rotation plane for each panel, then sifts based on a True/False pattern for panels that do_not_rotate / do_rotate

file pcc_Re.gh (83.5 KB)

edit: I assumed your panels were somehow geometric along their length, but I just noticed rotating them produces a small but noticeable difference in their alignment

the reason why it happens is because the original panels have weird edges slitting out of their structure, so rotating a panel around the central plane of its own bounding box produces the following misalignment:

I suggest to solve those edges

that is not a problem but, when i flip the panels it appears misaligned and i think that is a problem linked to the extrusion of the curve. It seems that the problem is that the panels don’t have equal sides because when I adapted them to the surface, they underwent a stretch, but when i realized them the panels were square.


file pcc 2.gh (80.7 KB)

in your definition, the finished and not-stretched panel is located here, inside the Merge component

of that “base panel” you take the bounding box, and that bounding box is used as Base Geometry input to the Box Morph

this is your base panel from top view:

you will notice two small corners indicated by the red arrows, which overextend outside the projection of side walls of the panel itself

the center of rotation of a panel, defined as center of its bounding box, should be like this:

but because of those protusions, the center of the bounding box of each panel gets moved (here exagerated for sake of explanation)

given that the whole definition is based on Box Morph, and Box Morph is based on Bounding box, the best advice would be at least to have the center of the bounding box on the actual center of the panel :slight_smile:

imagine rotating the red square 180 degrees around a point that is not its center: you end-up with the blue square → that is exactly what is happening in the definition

1 Like

thank you so much for the explanation,I tried to follow your instructions but it keeps giving me the same issue. I removed the parts that were shifting the center of the panel but it doesn’t work
edit: In fact, the actual dimensions of the panel are 2.17x2.17 meters, but when I adapt it to the surface, they become 2.17x1.94

each panels gets deformed the very same way its bounding box gets deformed

if you look at the curve that generates the distribution surface from side view, you will notice it’s not an arc, so it does not have uniform curvature:

that means that when you divide that surface into n parts to create the destination bounding boxes, those boxes are identical along the direction the curve is extruded, but are different along the flow of the curve:

if you consider the view in the above image, horizontal rows of boxes are all equal among each other, because they come from an extrusion generated by a vector, while each vertical row of boxes has 21 different boxes because they follow portions of the curve

so, despite your initial panel being a projection of a perfect square (after your corrections), it is being deformed into boxes that do not have a perfect square projection anymore: they have 21 different sizes, so you probably get 21 different deformations of that panel

if you want your base panel to be used “as it is”, with no deformation whatsoever, then maybe the best way would be to Orient the panel itself based on Start Plane and Destination Planes (orient component)

if you also want to rotate each panel, then I would advice in having reference Planes centered on the panel itself (to make rotations easier)

do you know how can I solve this problem?

As I remember your way of panel design was and was not interesting at the same time. Seems you need a few more time first on “modeling”

Your solution had resolved my issue, but I had to correct other things in the algorithm, and the random command stopped working

could you show me how can i solve this problem?

if you want the panels to keep their original sizes then I think you should not use Box Morph, because the “morph” itself is what you are trying to avoid

the easiest solution that comes to my mind is using Orient, which is like a “repeated pick and place” of a given (unmodified) geometry based on a starting plane and one (or more) destination planes

for instance, given a placeholder panel like this, built on XY

you can Orient that to destination planes:

the whole thing is determined by the destination planes, so if you want to get a zero-spaced paneling, you will need a grid/array of planes with spacing equal to the edge length of the panel

it becomes much easier to rotate things, for instance, because you can rotate the destination planes before orienting the geometry over them, for instance:

Orient_Random_Rotation.gh (20.8 KB)

2 Likes