Recently I started investing my time in learning GDL scripting. So I apologize if my question is silly. I will probably have many of them in the future, so thank you upfront for understanding.
My first question is regarding the graphical hotspots department.
I am trying to make it so that certain spots from POLY2_B shape can be moved freely,
Also, I struggle in figuring out how to make code structure regarding the offset of the diagonal shape with the ability to have a parameter for thickness.
Solved! Go to Solution.
you need to create a hotspot that modify the C dimension when you move it, to made this is necesary define a group of hotspot working together , Base hotspot, reference hotspot and moving hotspot , the base hotspot will be in the start of C dimension and rererence hotspot indicate de direction where the spot will move and the move hotspot will be the one you move and will be and the end of dimension C
Hello @Jorge_Arreguin ,
Thank you for replying.
I understand the basic concept of how hotspot works, and I already made Variable C work. What confuses me is, is there a way to create an independent code structure to move that one point independently, inside my C distance (DX1 distance as shown in the picture)?
I tried following code structure:
!LDX parameter for DX1 distance
HOTSPOT2 A, St, hsid+1, LDX, 1+128: hsid=hsid+1 !base (hidden)
HOTSPOT2 -1, St, hsid+1, LDX, 3: hsid=hsid+1 !referece
HOTSPOT2 DX1, St, hsid+1, LDX, 2: hsid=hsid+1 !moving
With this code, I am able to create a hotspot, but without luck in changing DX1 length
Two problems I see are:
@Kristian Bursell Thank you very much for help,
Such a dumb thing to not notice :D.
While I have your attention, could you help me also with how to structure the code to have a diagonal shape thickness as a parameter?
Use the same hotspot definition method you have been (x direction) then simply do a "ROT2" 2d transformation to rotate the hotspot relative to the diagonal angle.
You will obviously have to do basic math to position the hotspot reference just remember you DON'T have to put these position values in the hotspot coordinates but instead can put them in the 2d transformations such as "ADD2" and "ROT2" before the hotspot code. It's just easier to read the logic this way and keeps the hotspot definition simple.
would look like this:
add2 x, y !you do the maths 😉