Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Editable Hotspot on negative Y axis

jc4d
Advocate

Hello,

 

I have an editable hotspot2 to control the depth of my object, the problem I have is that the hotspot is "growing" to the back of the object and not to the front. I tried different combinations for the hotspot2 coordinates without success.

2D View:

jc4d_0-1650343728743.png

FloorPlan:

jc4d_1-1650343859247.png

2D Script:

 

HOTSPOT2 Width/2, 0, unID, Depth, 1+128
unID = unID+1
HOTSPOT2 Width/2, Depth, unID, Depth, 2
unID = unID+1
HOTSPOT2 Width/2, -1, unID, Depth, 3+128
unID = unID+1

ADD2 0, Depth
RECT2 0,0, Vert_sup_Width, Vert_sup_Depth	!!!!VERTICAL SUPPORT
ADD2 Width - Vert_sup_Width, 0
RECT2 0,0, Vert_sup_Width, Vert_sup_Depth   !!!!VERTICAL SUPPORT
DEL 2
RECT2 0,0, Width, Depth						!!!!BASE

 

 

Juan.

1 ACCEPTED SOLUTION

Solution
scottjm
Booster

Try this.  You need to change the reference hotspot y coord to positive, and then also use those negative 'depth' values on your add2 and rect2. 

 

HOTSPOT2 Width/2, 0, unID, Depth, 1+128
unID = unID+1
HOTSPOT2 Width/2, -Depth, unID, Depth, 2
unID = unID+1
HOTSPOT2 Width/2, 1, unID, Depth, 3+128
unID = unID+1

ADD2 0, -Depth
RECT2 0,0, 0.03, 0.06
ADD2 Width - 0.03, 0
RECT2 0,0, 0.03, 0.06
DEL 2
RECT2 0,0, Width, -Depth

 

Alternatively, you could just add a  ROT2 180 before drawing these hotspots and their associated 2d linework, and work with a within rotated workplane so you still can deal with positive depth values, this can get confusing though.

AC13 - AC23.7000 / AC25.5010
Python, GDL, VBA, PHP, SQL, CSS
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe

View solution in original post

4 REPLIES 4

scottjm
Booster

Are you able to post your whole object?  I'm not sure what you mean by growing to the front. The hotspot2 appears to working as expected with "depth" increasing in the positive direction of the y axis.  Maybe you need invert those value to go negative on the y-axis?

AC13 - AC23.7000 / AC25.5010
Python, GDL, VBA, PHP, SQL, CSS
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe

Sorry I didn't explain myself properly, yes the object is increasing on the positive Y, I would need to increase on the negative Y.

I tried setting the hotspot2 (2) to -Depth, but that only affects the location of the hotspot.

The object is not much more than the 2D script.

 

 

HOTSPOT2 Width/2, 0, unID, Depth, 1+128
unID = unID+1
HOTSPOT2 Width/2, -Depth, unID, Depth, 2
unID = unID+1
HOTSPOT2 Width/2, -1, unID, Depth, 3+128
unID = unID+1

ADD2 0, Depth
RECT2 0,0, 0.03, 0.06
ADD2 Width - 0.03, 0
RECT2 0,0, 0.03, 0.06
DEL 2
RECT2 0,0, Width, Depth

 

 

Solution
scottjm
Booster

Try this.  You need to change the reference hotspot y coord to positive, and then also use those negative 'depth' values on your add2 and rect2. 

 

HOTSPOT2 Width/2, 0, unID, Depth, 1+128
unID = unID+1
HOTSPOT2 Width/2, -Depth, unID, Depth, 2
unID = unID+1
HOTSPOT2 Width/2, 1, unID, Depth, 3+128
unID = unID+1

ADD2 0, -Depth
RECT2 0,0, 0.03, 0.06
ADD2 Width - 0.03, 0
RECT2 0,0, 0.03, 0.06
DEL 2
RECT2 0,0, Width, -Depth

 

Alternatively, you could just add a  ROT2 180 before drawing these hotspots and their associated 2d linework, and work with a within rotated workplane so you still can deal with positive depth values, this can get confusing though.

AC13 - AC23.7000 / AC25.5010
Python, GDL, VBA, PHP, SQL, CSS
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe

Thank you, I had the ROT2 180 before and everything was working as it should be, but like you said it can get confusing at some point so I wanted to find a more cleaner way to do it and that's when I had to ask 😅.

 

Juan.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!