<?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 Betreff: Draw a polygon in the user interface? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614465#M6774</link>
    <description>&lt;P&gt;Several years ago I experimented with composite 1 pixel graphics.&lt;BR /&gt;There is a problem if you place a lot of single-pixel graphics. Then you can see how Archicad paints the lines in the UI bit by bit and does not deliver them completely assembled.&lt;/P&gt;
&lt;P&gt;I discarded this approach at the time and work with straight line pixels, e.g. 100 x 1 pixel, which works well.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jul 2024 09:10:58 GMT</pubDate>
    <dc:creator>Jochen Suehlo</dc:creator>
    <dc:date>2024-07-07T09:10:58Z</dc:date>
    <item>
      <title>Draw a polygon in the user interface?</title>
      <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614259#M6767</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;Is there anyway I can draw a polygon in the user interface? I have a slab accessory, and it would be great if I could draw the slab in the user interface using a simple polygon or line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is not possible, are there any good ideas for workarounds? Using multiple lines, dots, perhaps multiples O's in a line?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;/Kaj&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="grey"&gt;Operating system used: &lt;EM&gt;Windows 11&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 08:10:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614259#M6767</guid>
      <dc:creator>Kaj_AL</dc:creator>
      <dc:date>2024-09-24T08:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a polygon in the user interface?</title>
      <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614277#M6768</link>
      <description>&lt;P&gt;Straight lines and rectangles only unfortunately as far as I know.&lt;/P&gt;
&lt;P&gt;I don't think you can even draw an angled line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The best you could do is to add a picture with a transparent background (alpha channel) maybe?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you want a live image of your slab, I don't think that is possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 10:13:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614277#M6768</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2024-07-05T10:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a polygon in the user interface?</title>
      <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614318#M6770</link>
      <description>&lt;P&gt;I started fiddling with it, but if anyone see this and have better ideas or an idea on how to simplify the code, feel free to chime in! Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have issues with it not being rotated correctly (to the north), as well as the number furthest to the right (here number 4) disappear.&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="Kaj_AL_0-1720187689338.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/65729iEBABEA73C0EA862C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kaj_AL_0-1720187689338.png" alt="Kaj_AL_0-1720187689338.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;!MAP
MapZeroX=300
MapZeroY=80
!Max mapsize: 200x170

LowX=0
HighX=0
LowY=0
HighY=0

!Find the highest and lowest X and Y points of the slab
FOR i=1 TO antal_nodes
IF ac_coords[i][2]&amp;gt;HighX THEN HighX=ac_coords[i][2]
IF ac_coords[i][3]&amp;gt;HighY THEN HighY=ac_coords[i][3]
IF ac_coords[i][2]&amp;lt;LowX THEN LowX=ac_coords[i][2]
IF ac_coords[i][3]&amp;lt;LowY THEN LowY=ac_coords[i][3]
NEXT i

!Make sure they fit on the interface. The ReSizer is a number to scale the drawing.
SlabSizeX=HighX-LowX
SlabSizeY=HighY-LowY
IF SlabsizeX/SlabSizeY&amp;gt;200/170 THEN ReSizer=SlabsizeX/200 ELSE ReSizer=SlabsizeY/170

DIM SlabMapX[]
DIM SlabMapY[]
DIM SlabHypoLength[]
DIM NumSlabHypoNodes[]
DotDistance=25 !Distance between dots on the interface.

!Translate slab polygon coordinates to interface coordinates
FOR i=1 TO antal_nodes
SlabMapX[i]=(ac_coords[i][2]/Resizer+MapZeroX-LowX/Resizer)
SlabMapY[i]=(ac_coords[i][3]/Resizer+MapZeroY-LowY/Resizer)
UI_SEPARATOR SlabMapX[i]-3,SlabMapY[i]-3,SlabMapX[i]+3,SlabMapY[i]+3
NEXT i

!Divide slab edges in multiple points
FOR i=1 TO antal_nodes-1
SlabHypoLength[i]=SQR((SlabMapX[i+1]-SlabMapX[i])*(SlabMapX[i+1]-SlabMapX[i])+(SlabMapY[i+1]-SlabMapY[i])*(SlabMapY[i+1]-SlabMapY[i]))
NumSlabHypoNodes[i]=ROUND_INT(SlabHypoLength[i]/Resizer/DotDistance)
IF NumSlabHypoNodes[i]&amp;lt;0.5 THEN NumSlabHypoNodes[i]=1 !Make sure there's at least one node in between
FOR n=1 TO NumSlabHypoNodes[i]-1
MidX=(SlabMapX[i]*(1-n/NumSlabHypoNodes[i]))+(SlabMapX[i+1]*(n/NumSlabHypoNodes[i]))
MidY=(SlabMapY[i]*(1-n/NumSlabHypoNodes[i]))+(SlabMapY[i+1]*(n/NumSlabHypoNodes[i]))
UI_SEPARATOR MidX-2,MidY-2,MidX+2,MidY+2
NEXT n
NEXT i

!Add edge number to edges
FOR i=1 TO antal_nodes-1
EdgeCenterX=SlabMapX[i]*0.5+SlabMapX[i+1]*0.5
EdgeCenterY=SlabMapY[i]*0.5+SlabMapY[i+1]*0.5
EdgeNum=STR(i,2,0)
UI_OUTFIELD EdgeNum,EdgeCenterX-6,EdgeCenterY-6
NEXT i&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 14:02:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614318#M6770</guid>
      <dc:creator>Kaj_AL</dc:creator>
      <dc:date>2024-07-05T14:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a polygon in the user interface?</title>
      <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614395#M6772</link>
      <description>&lt;P&gt;Very nice!&lt;/P&gt;
&lt;P&gt;I once saw an UI where something similar was done, but instead of tiny seperators the author had used a single pixel picture, so basically drawing non-anti-aliased lines. The upside of that approach is that colored lines are possible.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 20:13:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614395#M6772</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2024-07-05T20:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a polygon in the user interface?</title>
      <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614427#M6773</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/640"&gt;@runxel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I once saw an UI where something similar was done, but instead of tiny seperators the author had used a single pixel picture, so basically drawing non-anti-aliased lines. The upside of that approach is that colored lines are possible.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I remember that.&lt;/P&gt;
&lt;P&gt;We used to put red rectangles around buttons for changing UI pages if I remember correctly.&lt;/P&gt;
&lt;P&gt;This was before we had the hierarchical pages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2024 09:36:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614427#M6773</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2024-07-06T09:36:34Z</dc:date>
    </item>
    <item>
      <title>Betreff: Draw a polygon in the user interface?</title>
      <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614465#M6774</link>
      <description>&lt;P&gt;Several years ago I experimented with composite 1 pixel graphics.&lt;BR /&gt;There is a problem if you place a lot of single-pixel graphics. Then you can see how Archicad paints the lines in the UI bit by bit and does not deliver them completely assembled.&lt;/P&gt;
&lt;P&gt;I discarded this approach at the time and work with straight line pixels, e.g. 100 x 1 pixel, which works well.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2024 09:10:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/614465#M6774</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2024-07-07T09:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a polygon in the user interface?</title>
      <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/615877#M6784</link>
      <description>&lt;P&gt;The only reliable thing with drawn pics is the rectangle, which I use a lot with different pic colors - it looks better that the ui_separator or groupbox&lt;/P&gt;
&lt;P&gt;sometimes the leader lines...&lt;/P&gt;
&lt;P&gt;The only possible advantage for me would be the overlay of something over another picture.&lt;/P&gt;
&lt;P&gt;With the other ui elements overlay is possible with doubling the commands:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;[commands]&lt;/P&gt;
&lt;P&gt;pictiure&lt;/P&gt;
&lt;P&gt;[commands]&lt;/P&gt;
&lt;P&gt;BTW:&lt;/P&gt;
&lt;P&gt;Long time ago Olivier Dentan had experimented with such scripts with dot pics. I have just found out that I sill have them in my stash. (line, arc, arrow)&lt;/P&gt;
&lt;P&gt;Maybe I will go back to this idea..&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 12:23:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/615877#M6784</guid>
      <dc:creator>Piotr Dobrowolski</dc:creator>
      <dc:date>2024-07-16T12:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a polygon in the user interface?</title>
      <link>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/616563#M6831</link>
      <description>&lt;P&gt;This would be the top of my wish list for GDL features - a "ui_poly". For me it would save so many little png's I have created over the years. And for this sort of thing, create a much nicer UI..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just released an update to my roof accessory. I found a slightly better work around for creating a polygon in the UI.&lt;/P&gt;
&lt;P&gt;I found the 'dot' method a bit slow and un-sightly - particularly on PC&lt;/P&gt;
&lt;P&gt;Rather than create dots that get repeated, I create a few png's, about 10px by 10px with a diagonal line across them. So I only need to place 4 or 5 per segment.. here are the results. Looks pretty neat - even when the line is not a 45 degree angle...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4D Roofing UI.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/66484iEFD88F7332F4449A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="4D Roofing UI.png" alt="4D Roofing UI.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 09:33:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Draw-a-polygon-in-the-user-interface/m-p/616563#M6831</guid>
      <dc:creator>Ben Cohen</dc:creator>
      <dc:date>2024-07-19T09:33:28Z</dc:date>
    </item>
  </channel>
</rss>

