Append Rectangle XY "mirror effect"

Hello :waving_hand:

I’m working on a sort of architecture CAD software. I’m trying to do a wall drawing tool. Here is the current advancement, but I have a problem, there is a sort of “mirror effect” depending of in which direction the wall is facing. I assume it’s a problem with the rotation or something else, but my brain is boiling for a few days now, and I can’t find the solution…

Thanks for any help :folded_hands: