2022-04-19 06:52 AM - edited 2022-04-19 07:29 AM
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:
FloorPlan:
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.
Solved! Go to Solution.
2022-04-19 07:28 AM - edited 2022-04-19 07:29 AM
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.
2022-04-19 07:14 AM
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?
2022-04-19 07:22 AM - edited 2022-04-19 07:23 AM
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
2022-04-19 07:28 AM - edited 2022-04-19 07:29 AM
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.
2022-04-19 07:34 AM
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.