<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Modifying Zone marker - scale offset and rotation in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Modifying-Zone-marker-scale-offset-and-rotation/m-p/393689#M1183</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to modify the OOTB zone marker. I really like the possibility to have different position for the marker when using the 1/500, 1/100 or 1/200 scale whith the x and y offset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that this offset is relative to the rotation of the view and not to an actual displacement in space:&lt;/P&gt;
&lt;P&gt;If I offset the mark in my part to the right, and create a second view with a 90° rotation, the mark will end up at the top (or bottom) of the part.&lt;/P&gt;
&lt;P&gt;I'd like the position to be fixed.&lt;/P&gt;
&lt;P&gt;I've created a simple object (a square + text with positioning managed by a hot spot) that has the desired behavior.&lt;/P&gt;
&lt;P&gt;I tried to modify the zone marker. The marker itself has the desired behavior, but the hot spot doesn't really work anymore... Can you help me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2023-07-28 à 11.20.08.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44103iF10BA26D62CB808F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2023-07-28 à 11.20.08.png" alt="Capture d’écran 2023-07-28 à 11.20.08.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2023-07-28 à 11.19.13.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44104i46728ACF2741B4B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2023-07-28 à 11.19.13.png" alt="Capture d’écran 2023-07-28 à 11.19.13.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;What I tried:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;	r = request ("View_Rotangle", "", _angleViewRot)

	hypothenuse=SQR((offsetX^2)+(offsetY^2))
	IF hypothenuse THEN 
		TEST2=(offsetX/hypothenuse)
	ELSE
		TEST2=0
	ENDIF

	IF posy&amp;gt;0 THEN
		alpha=ACS(TEST2)+_angleViewRot
	ELSE
		alpha=-ACS(TEST2)+_angleViewRot
	ENDIF
	
	offsetX =(cos(alpha)*hypothenuse)
	offsetY =(sin(alpha)*hypothenuse)

	ROT2 _angleViewRot

	
	hotspot2  0, 		offsetY,	unIDoffset, "offsetX_50", 1+128				:	unIDoffset = unIDoffset + 1
	hotspot2 -1, 		offsetY,	unIDoffset, "offsetX_50", 3					:	unIDoffset = unIDoffset + 1
	hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetX_50", 2					:	unIDoffset = unIDoffset + 1
	hotspot2 offsetX,  	0, 			unIDoffset, "offsetY_50", 1+128				:	unIDoffset = unIDoffset + 1
	hotspot2 offsetX, 	-1, 		unIDoffset, "offsetY_50", 3					:	unIDoffset = unIDoffset + 1
	hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetY_50", 2					:	unIDoffset = unIDoffset + 1


	DEL 1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What was before:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;	if GLOB_SCALE &amp;lt; 100 then

		offsetX					= offsetX_50
		offsetY					= offsetY_50

		hotspot2  0, 		offsetY,	unIDoffset, "offsetX_50", 1+128				:	unIDoffset = unIDoffset + 1
		hotspot2 -1, 		offsetY,	unIDoffset, "offsetX_50", 3					:	unIDoffset = unIDoffset + 1
		hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetX_50", 2					:	unIDoffset = unIDoffset + 1
		hotspot2 offsetX,  	0, 			unIDoffset, "offsetY_50", 1+128				:	unIDoffset = unIDoffset + 1
		hotspot2 offsetX, 	-1, 		unIDoffset, "offsetY_50", 3					:	unIDoffset = unIDoffset + 1
		hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetY_50", 2					:	unIDoffset = unIDoffset + 1&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 28 Jul 2023 09:45:49 GMT</pubDate>
    <dc:creator>Mathias Jonathan</dc:creator>
    <dc:date>2023-07-28T09:45:49Z</dc:date>
    <item>
      <title>Modifying Zone marker - scale offset and rotation</title>
      <link>https://community.graphisoft.com/t5/GDL/Modifying-Zone-marker-scale-offset-and-rotation/m-p/393689#M1183</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to modify the OOTB zone marker. I really like the possibility to have different position for the marker when using the 1/500, 1/100 or 1/200 scale whith the x and y offset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that this offset is relative to the rotation of the view and not to an actual displacement in space:&lt;/P&gt;
&lt;P&gt;If I offset the mark in my part to the right, and create a second view with a 90° rotation, the mark will end up at the top (or bottom) of the part.&lt;/P&gt;
&lt;P&gt;I'd like the position to be fixed.&lt;/P&gt;
&lt;P&gt;I've created a simple object (a square + text with positioning managed by a hot spot) that has the desired behavior.&lt;/P&gt;
&lt;P&gt;I tried to modify the zone marker. The marker itself has the desired behavior, but the hot spot doesn't really work anymore... Can you help me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2023-07-28 à 11.20.08.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44103iF10BA26D62CB808F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2023-07-28 à 11.20.08.png" alt="Capture d’écran 2023-07-28 à 11.20.08.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2023-07-28 à 11.19.13.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44104i46728ACF2741B4B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2023-07-28 à 11.19.13.png" alt="Capture d’écran 2023-07-28 à 11.19.13.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;What I tried:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;	r = request ("View_Rotangle", "", _angleViewRot)

	hypothenuse=SQR((offsetX^2)+(offsetY^2))
	IF hypothenuse THEN 
		TEST2=(offsetX/hypothenuse)
	ELSE
		TEST2=0
	ENDIF

	IF posy&amp;gt;0 THEN
		alpha=ACS(TEST2)+_angleViewRot
	ELSE
		alpha=-ACS(TEST2)+_angleViewRot
	ENDIF
	
	offsetX =(cos(alpha)*hypothenuse)
	offsetY =(sin(alpha)*hypothenuse)

	ROT2 _angleViewRot

	
	hotspot2  0, 		offsetY,	unIDoffset, "offsetX_50", 1+128				:	unIDoffset = unIDoffset + 1
	hotspot2 -1, 		offsetY,	unIDoffset, "offsetX_50", 3					:	unIDoffset = unIDoffset + 1
	hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetX_50", 2					:	unIDoffset = unIDoffset + 1
	hotspot2 offsetX,  	0, 			unIDoffset, "offsetY_50", 1+128				:	unIDoffset = unIDoffset + 1
	hotspot2 offsetX, 	-1, 		unIDoffset, "offsetY_50", 3					:	unIDoffset = unIDoffset + 1
	hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetY_50", 2					:	unIDoffset = unIDoffset + 1


	DEL 1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What was before:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;	if GLOB_SCALE &amp;lt; 100 then

		offsetX					= offsetX_50
		offsetY					= offsetY_50

		hotspot2  0, 		offsetY,	unIDoffset, "offsetX_50", 1+128				:	unIDoffset = unIDoffset + 1
		hotspot2 -1, 		offsetY,	unIDoffset, "offsetX_50", 3					:	unIDoffset = unIDoffset + 1
		hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetX_50", 2					:	unIDoffset = unIDoffset + 1
		hotspot2 offsetX,  	0, 			unIDoffset, "offsetY_50", 1+128				:	unIDoffset = unIDoffset + 1
		hotspot2 offsetX, 	-1, 		unIDoffset, "offsetY_50", 3					:	unIDoffset = unIDoffset + 1
		hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetY_50", 2					:	unIDoffset = unIDoffset + 1&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 28 Jul 2023 09:45:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Modifying-Zone-marker-scale-offset-and-rotation/m-p/393689#M1183</guid>
      <dc:creator>Mathias Jonathan</dc:creator>
      <dc:date>2023-07-28T09:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Zone marker - scale offset and rotation</title>
      <link>https://community.graphisoft.com/t5/GDL/Modifying-Zone-marker-scale-offset-and-rotation/m-p/394095#M1184</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there is an option for zone stamps to rotate with the model:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterBaksa_0-1690963121853.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44239i964B948CEE3470A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PeterBaksa_0-1690963121853.png" alt="PeterBaksa_0-1690963121853.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If that doesn't solve your problem:&lt;/P&gt;
&lt;P&gt;hotspots work in the transformed coordinate system, you don't need to recalculate their positions.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;! show model x, y, axes
line2 0,0,1,0
line2 0,0,0,1

r = request ("View_Rotangle", "", _angleViewRot)

! undo view rotation
ROT2 -_angleViewRot

! define hotspots in rotated coordinate system
offsetX					= offsetX_50
offsetY					= offsetY_50
unIDoffset				= 1

hotspot2  0, 		offsetY,	unIDoffset, "offsetX_50", 1+128				:	unIDoffset = unIDoffset + 1
hotspot2 -1, 		offsetY,	unIDoffset, "offsetX_50", 3					:	unIDoffset = unIDoffset + 1
hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetX_50", 2					:	unIDoffset = unIDoffset + 1
hotspot2 offsetX,  	0, 			unIDoffset, "offsetY_50", 1+128				:	unIDoffset = unIDoffset + 1
hotspot2 offsetX, 	-1, 		unIDoffset, "offsetY_50", 3					:	unIDoffset = unIDoffset + 1
hotspot2 offsetX, 	offsetY,	unIDoffset, "offsetY_50", 2					:	unIDoffset = unIDoffset + 1

! draw in same coordinate system
line2 0,0, offsetX, offsetY
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Zone stamp positioning information is not available for GDL, you can't achieve a solution which works with all possible combination of settings.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 08:19:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Modifying-Zone-marker-scale-offset-and-rotation/m-p/394095#M1184</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2023-08-02T08:19:04Z</dc:date>
    </item>
  </channel>
</rss>

