We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2017-09-04 11:10 AM
! -------------------------------------------------------------------------------- ! Center ! -------------------------------------------------------------------------------- hotspot2 0, 0, unID, ang, 6 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Base ! -------------------------------------------------------------------------------- hotspot2 r, 0, unID, ang, 4 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Moving ! -------------------------------------------------------------------------------- hotspot2 r * COS(ang), r * SIN(ang), unID, ang, 5 : unID = unID + 1I have created parameters for ang and R.
2017-09-04 01:01 PM
2017-09-04 01:28 PM
Erwin wrote:Seems very strange. I was having some other issues when changing the centre point of the rotation so I have had to keep it at 0, 0 which is inconvenient. Thanks for the help.
If I look at page 197 of the GDL Reference Guide in ArchiCAD 20, the diagram is quite clearly going counter clockwise, perhaps this is intended?
Edit: this is also how the angles work in ArchiCAD when drafting.
2017-09-05 02:44 AM
JGoode wrote:All of the hotspots need to have the same base co-ordinates.
Seems very strange. I was having some other issues when changing the centre point of the rotation so I have had to keep it at 0, 0 which is inconvenient. Thanks for the help.
ADD x, y ! Center ! -------------------------------------------------------------------------------- hotspot2 0, 0, unID, ang, 6 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Base ! -------------------------------------------------------------------------------- hotspot2 r, 0, unID, ang, 4 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Moving ! -------------------------------------------------------------------------------- hotspot2 r * COS(ang), r * SIN(ang), unID, ang, 5 : unID = unID + 1 DEL 1or
! Center ! -------------------------------------------------------------------------------- hotspot2 x+0, y+0, unID, ang, 6 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Base ! -------------------------------------------------------------------------------- hotspot2 x+r, y+0, unID, ang, 4 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Moving ! -------------------------------------------------------------------------------- hotspot2 x+r * COS(ang), y+r * SIN(ang), unID, ang, 5 : unID = unID + 1Adding a flag value of 512 to the centre hotspot (type 6) will make it rotate in the opposite direction.
2017-09-05 10:07 AM
Barry wrote:Thanks very much. This is very useful.JGoode wrote:All of the hotspots need to have the same base co-ordinates.
Seems very strange. I was having some other issues when changing the centre point of the rotation so I have had to keep it at 0, 0 which is inconvenient. Thanks for the help.
An easy way to do this is leave the base at 0,0 but put an ADD before the hotspots
i.e.
ADD x, y ! Center ! -------------------------------------------------------------------------------- hotspot2 0, 0, unID, ang, 6 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Base ! -------------------------------------------------------------------------------- hotspot2 r, 0, unID, ang, 4 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Moving ! -------------------------------------------------------------------------------- hotspot2 r * COS(ang), r * SIN(ang), unID, ang, 5 : unID = unID + 1 DEL 1or! Center ! -------------------------------------------------------------------------------- hotspot2 x+0, y+0, unID, ang, 6 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Base ! -------------------------------------------------------------------------------- hotspot2 x+r, y+0, unID, ang, 4 : unID = unID + 1 ! -------------------------------------------------------------------------------- ! Moving ! -------------------------------------------------------------------------------- hotspot2 x+r * COS(ang), y+r * SIN(ang), unID, ang, 5 : unID = unID + 1Adding a flag value of 512 to the centre hotspot (type 6) will make it rotate in the opposite direction.
Barry.