We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-02-21 12:35 AM - last edited on 2024-09-26 01:20 PM by Doreena Deng
Hi, everyone!
I'm trying to educate myself with GDL.
For the moment I'm trying to figure out how to use graphical hotspot. Generally I understand the idea but I have some issues.
I've made two circles, where the first one is static and the second one is movable.
Issue is that I want the moving point to be exactly at the right side (or right pole) of the second circle. However when I try to move it the cursor goes from right side to the center of the circle.
Tried to improve my code with chatGPT but it failed miserably.
The problem as I understand it is with coordinates of the moving point and the second circle itself.
Here is a code I made. There are few variables that defined:
radCircle - circle radius
movX - parameter for hotspots to works with
! First circle
CIRCLE2 0, 0, radCircle
hsID = hsID+1
HOTSPOT2 0, 0, hsID ! Center point of the first circle
hsID = hsID+1
HOTSPOT2 radCircle, 0, hsID ! Hotspot for the right side of the first circle
! Second circle
CIRCLE2 movX, 0, radCircle
hsID = hsID+1
HOTSPOT2 0, 0, hsID, movX, 1 ! Base point
hsID = hsID+1
HOTSPOT2 movRad, 0, hsID, movX, 2 ! Moving point
hsID = hsID+1
HOTSPOT2 -radCircle, 0, hsID, movX, 3 ! Reference point
Solved! Go to Solution.
2024-02-21 03:03 AM - edited 2024-02-21 03:23 AM
You have Circle 1 or radius radCircle, and Circle 2 of radius radCircle which can move along a linear path that runs through Circle 1?
hsID = 0
CIRCLE2 0, 0, radCircle
CIRCLE2 movX, 0, radCircle
HOTSPOT2 radCircle, 0, hsID, movX, 1 : hsID = hsID+1 !Base
HOTSPOT2 movX + radCircle, 0, hsID, movX, 2 : hsID = hsID+1 !Moving
HOTSPOT2 -radCircle, 0, hsID, movX, 3 : hsID = hsID+1 !Ref
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2024-02-21 03:03 AM - edited 2024-02-21 03:23 AM
You have Circle 1 or radius radCircle, and Circle 2 of radius radCircle which can move along a linear path that runs through Circle 1?
hsID = 0
CIRCLE2 0, 0, radCircle
CIRCLE2 movX, 0, radCircle
HOTSPOT2 radCircle, 0, hsID, movX, 1 : hsID = hsID+1 !Base
HOTSPOT2 movX + radCircle, 0, hsID, movX, 2 : hsID = hsID+1 !Moving
HOTSPOT2 -radCircle, 0, hsID, movX, 3 : hsID = hsID+1 !Ref
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2024-02-21 05:26 AM
Wow! Thank you so much. I didn't expect it to be so easily done.
Just to be clear, the problem was that base point was at the center of coordinates. But why moving the base point made everything as intended?
2024-02-21 05:43 AM
You had movRad so while you edited movX the node you were actually moving never changed.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |