HI
the hinges are on the left and the front goes over the corp..if I change the hinges to the right I want the difference to move to the left..is it possible if I use “otvaranje”?
LOL
I just discovered that it is enough to write in the x position “Door1”:
if (door1.tipfronte=0;2;-50)
Nothing more.
Thank you for making me think more!
In a well-written macro, the hinges will automatically change position depending on the opening orientation. This means that there is a variable that reads the orientation of the front.
Therefore, in this example, such a variable should be used.
Since the position of the front can only be changed externally, the parent element should read the value of that variable and change the x position of the front accordingly.
Example
Let’s say we have an element called “Cabinet”.
We also have a door element called “Door1”.
Naturally, “Door1” is inside “Cabinet”.
Let’s call the first panel inside the door “Face”.
In the “Door1” element we need to have a variable that will read the opening direction.
Let’s call it “SideOpen”.
The formula is:
SideOpen=Face.tipfronte
Results can be 1 for right opening or 2 for left opening.
In the main element “Cabinet” you should put the formula for the x position of the door, which will read:
door1.x=if(door1.sideopen=1;2;-50)
For those who have a hard time reading oneline if statements, here is the “translation”:
IF sideopen=1 THEN door1.x=2
ELSE door1.x=50
I assumed that 2 mm is the distance of the door from the edge and that 50 mm is the extension of the door.
If I understand you correctly, you want the hinge holes on the front to be positioned as if the front is not extended to the right, like in the picture below?
If yes, then right-click on the connection and increase CasicaOdRuba
by the amount the front is extended to the left side.
I have a correction for the hinge in the macro, I’m sorry if I didn’t express myself correctly .. I can’t right-click on the hole because I’m using a 3d model that comes with holes on it, I’m using the front opening option from the corpus where you also position the handle, the question it was when i change the hinges to the opposite side of the distance that exceeds the width of the Corp it moves with the hinges…that is the distance that sticks out from the outside of the body move with the hinge
yes working “tipfronte”..i didnt knew it that can be use .. i was trying to use otvaranje