I do the pivot door by setting the origin of the door prism at the pivot point (where DoorW=Door Leaf Width / DoorHT=Door Leaf Height / DoorThk = Door Leaf Thickness / Pivot = Pivot distance from door edge)
ADD DoorW/2-Pivot,0,Doorthk/2 !!! Centre the door in the opening
ROTx -90 !!! Lay it down flat on the floor
ROTz -Door_Opening_Arc !!! Swing the door open
cPRISM_ DoorMat,DoorMat,DoorMat,5,DoorHt,
Pivot,-DoorThk/2,15,
-DoorW+Pivot,-DoorThk/2,15,
-DoorW+Pivot,DoorThk/2,15,
Pivot,DoorThk/2,15,
Pivot,-DoorThk/2,15
DEL 3
The above places the centre of the door at the pivot so you can easily manipulate the opening action of the door. It also has the advantage that your door hardware is created at 0,0,0 then ROTated and moved by ADD into it's correct location. If you try to create the door from an edge, you'll get into a nightmare of translations using SIN & COS calculations.
Use a similar strategy in 2D using ADD2 DoorW/2-Pivot,0 & ROT2 -Door_Opening_Arc & POLY2 (just cut & paste the cPRISM_ coordinates and delete the '15' masking number) so that you can easily rotate the door open. Add your door swings using ARC2 & voila!
Cheers,
Cameron Hestler, Architect
Archicad 27 / Mac Studio M1 Max - 32 GB / LG24" Monitors / 14.5 Sonoma