<?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 Random block insertion into defined area in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/random-block-insertion-into-defined-area/m-p/4981630#M1610</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a command or lisp to randomly insert certain blocks (eg. trees) into polyline defined area ? So I select some area defined with polyline and then I want to insert into that area randomly lots of tree blocks (or whatever blocks).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried to google but didn't find anything useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas ?&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Apr 2014 07:05:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-04-23T07:05:02Z</dc:date>
    <item>
      <title>Random block insertion into defined area</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/random-block-insertion-into-defined-area/m-p/4981630#M1610</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a command or lisp to randomly insert certain blocks (eg. trees) into polyline defined area ? So I select some area defined with polyline and then I want to insert into that area randomly lots of tree blocks (or whatever blocks).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried to google but didn't find anything useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas ?&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 07:05:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/random-block-insertion-into-defined-area/m-p/4981630#M1610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-23T07:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Random block insertion into defined area</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/random-block-insertion-into-defined-area/m-p/4985444#M1611</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did something like that with the following principle steps:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;get bounding box of the polygon&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;for x = boundingbox.min.x to boundingbox.max.x by your x-stepsize&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;&amp;nbsp;&amp;nbsp; for y = boundingbox.min.y to boundingbox.max.y by your y-stepsize&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; here is a new xy-coordinate (like that of an array command)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xnew = x + random value (within a tolerance to the left/right, positive or negative)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ynew = y + random value &lt;/FONT&gt;&lt;FONT color="#000080"&gt;(within a tolerance to the left/right, positive or negative)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; that coordinate xnew/ynew is now more randomized, depending on a higher or lower tolerance value it look more like an array or more randomized&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check if that new coordinate is inside the polygon&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if yes ==&amp;gt; that's a new point&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;&amp;nbsp;&amp;nbsp; next y&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#000080"&gt;next x&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH, - alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2014 11:04:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/random-block-insertion-into-defined-area/m-p/4985444#M1611</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2014-04-24T11:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Random block insertion into defined area</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/random-block-insertion-into-defined-area/m-p/5000022#M1612</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Insert one block&lt;/P&gt;&lt;P&gt;2. Use array to multiply the&amp;nbsp;entire area&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" height="94" title="Capture.PNG" width="225" border="0" src="https://forums.autodesk.com/t5/image/serverpage/image-id/97702i1067A1D834851D42/image-size/original?v=mpbl-1&amp;amp;px=-1" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Use MAPCLEAN.Select objects / Duplicates / Desired minimum distance&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" height="87" title="Capture.PNG" width="199" border="0" src="https://forums.autodesk.com/t5/image/serverpage/image-id/97696i4D3CFC83208DE7A3/image-size/original?v=mpbl-1&amp;amp;px=-1" align="center" /&gt;&lt;/P&gt;&lt;P&gt;4. Use MAPTRIM. Select Boundary/Select Objects/Trim Outside Boundary&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" height="143" title="Capture.PNG" width="311" border="0" src="https://forums.autodesk.com/t5/image/serverpage/image-id/97700i5A0226C75EB575B4/image-size/original?v=mpbl-1&amp;amp;px=-1" align="center" /&gt;&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>Tue, 29 Apr 2014 17:59:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/random-block-insertion-into-defined-area/m-p/5000022#M1612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-29T17:59:38Z</dc:date>
    </item>
  </channel>
</rss>

