<?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 Re: Triangular array with equal spacing between objects in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11946616#M30515</link>
    <description>&lt;P&gt;Its a case of Pythagoras you know the spacing is 0.781 so vertical is 0.781^2-(0.781 / 2)^2 =0.6763658403556 so can put that into my lisp. Just needs a couple of lines of code.&lt;/P&gt;</description>
    <pubDate>Sun, 07 May 2023 00:48:13 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2023-05-07T00:48:13Z</dc:date>
    <item>
      <title>Triangular array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11938649#M30509</link>
      <description>&lt;P&gt;I am looking for a routine that will repeat a triangular pattern with equal distances between shapes (circles) at different angles. Array will not work, as it only gives the distance between rows and columns, NOT the distance between the objects. The pattern would then be repeated about a center point. (The square pattern below can be done with the default array command, obviously)&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="intern59T6U_0-1683115747259.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1209922i2DEA74DE517808C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="intern59T6U_0-1683115747259.png" alt="intern59T6U_0-1683115747259.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="intern59T6U_1-1683116944097.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1209930i7AF9EB185DBEEA82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="intern59T6U_1-1683116944097.png" alt="intern59T6U_1-1683116944097.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 13:04:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11938649#M30509</guid>
      <dc:creator>intern59T6U</dc:creator>
      <dc:date>2023-05-03T13:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11938684#M30510</link>
      <description>While you wait... perhaps this &lt;A href="https://apps.autodesk.com/ACD/en/Detail/Index?id=1475905733858671708&amp;amp;appLang=en&amp;amp;os=Win32_64" target="_blank"&gt;https://apps.autodesk.com/ACD/en/Detail/Index?id=1475905733858671708&amp;amp;appLang=en&amp;amp;os=Win32_64&lt;/A&gt;&lt;BR /&gt;Or &lt;BR /&gt;&lt;A href="https://apps.autodesk.com/ACD/en/Detail/Index?id=1506866417278631717&amp;amp;appLang=en&amp;amp;os=Win32_64" target="_blank"&gt;https://apps.autodesk.com/ACD/en/Detail/Index?id=1506866417278631717&amp;amp;appLang=en&amp;amp;os=Win32_64&lt;/A&gt;&lt;BR /&gt;Or&lt;BR /&gt;some of these others &lt;A href="https://apps.autodesk.com/ACD/en/List/Search?isAppSearch=True&amp;amp;searchboxstore=ACD&amp;amp;facet=&amp;amp;collection=&amp;amp;sort=&amp;amp;query=array" target="_blank"&gt;https://apps.autodesk.com/ACD/en/List/Search?isAppSearch=True&amp;amp;searchboxstore=ACD&amp;amp;facet=&amp;amp;collection=&amp;amp;sort=&amp;amp;query=array&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 May 2023 12:54:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11938684#M30510</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-05-03T12:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Triangular array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11938875#M30511</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13862947"&gt;@intern59T6U&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... Array will not work, as it only gives the distance between rows and columns, NOT the distance between the objects. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you mean the clear space between objects?&amp;nbsp; If they're always Circles, that's just the column/row spacing minus the Circle diameter.&amp;nbsp; If they're sometimes other shapes, that becomes a lot more questionable depending on the angle of the Array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Were you aware that an ARRAY can do the angle for you?&amp;nbsp; It doesn't appear to be something you can specify within the command, for some reason, but once drawn, you can specify it in Properties:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_0-1683122261946.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1209991iDA481A19732B18BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_0-1683122261946.png" alt="Kent1Cooper_0-1683122261946.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That's not in your hexagonal arrangement, but maybe you can make use of it.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 14:01:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11938875#M30511</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-05-03T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Triangular array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11938919#M30512</link>
      <description>&lt;P&gt;This works for my purposes. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 14:21:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11938919#M30512</guid>
      <dc:creator>intern59T6U</dc:creator>
      <dc:date>2023-05-03T14:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Triangular array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11943205#M30513</link>
      <description>&lt;P&gt;Another&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rectangular-array-creating-every-other-row-offset/td-p/9667120" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rectangular-array-creating-every-other-row-offset/td-p/9667120&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Look for the lisp.&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 04:55:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11943205#M30513</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-05-05T04:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Triangular array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11944510#M30514</link>
      <description>&lt;P&gt;This one is close, but does not account for the XY spacing. It only works for the spacing between&amp;nbsp; X and Y (again, not the XY distance I am looking for. (I believe the second "copy" command&amp;nbsp; would need to be modified).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rectangular-array-creating-every-other-row-offset/td-p/9667120
; array rows a 1/2 x spacings
; Enter -ve values to change direction.
;By AlanH info@alanh.com.au Aug 2020

(defun c:zigzag ( / ent ss ans hor ver numx numy x )
(setq ent (entsel "\nSelect object to array"))
(setq ss (ssadd))
(ssadd (car ent) ss)
(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter spacings " "Horizontal  " 7 6 "100" "Vertical" 7 6 "50" "Num X " 5 4 "7"  "Num Y" 5 4 "7")))
(setq hor (atof (nth 0 ans)))
(setq ver (atof (nth 1 ans)))
(setq numx (atoi (nth 2 ans)))
(setq numy (atoi (nth 3 ans)))
(setq x 1.0)
(repeat (- numx 1)
(command "copy" ent "" (list 0.0 0.0) (list  (* x hor) 0.0) )
(ssadd (entlast) ss)
(setq x (+ x 1))
)
(setq x 1.0)
(while (&amp;lt; x numy)
(command "copy" ss "" (list 0.0 0.0) (list (* 0.5 (- hor)) (* x ver)))
(setq x (+ x 2))
)
(setq x 2.0)
(while (&amp;lt; x numy)
(command "copy" ss "" (list 0.0 0.0) (list 0.0 (* ver x)))
(setq x (+ x 2))
)
(princ)
)
(c:zigzag)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&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="intern59T6U_0-1683302007158.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1211076i98296A1CF190CC74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="intern59T6U_0-1683302007158.png" alt="intern59T6U_0-1683302007158.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 15:55:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11944510#M30514</guid>
      <dc:creator>intern59T6U</dc:creator>
      <dc:date>2023-05-05T15:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Triangular array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11946616#M30515</link>
      <description>&lt;P&gt;Its a case of Pythagoras you know the spacing is 0.781 so vertical is 0.781^2-(0.781 / 2)^2 =0.6763658403556 so can put that into my lisp. Just needs a couple of lines of code.&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 00:48:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11946616#M30515</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-05-07T00:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Triangular array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11947159#M30516</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Its a case of Pythagoras ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Or, it can be done trigonometrically:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;(setq &lt;/STRONG&gt;&lt;EM&gt;&lt;FONT color="#00CCFF"&gt;&lt;FONT color="#339966"&gt;Vertical&lt;/FONT&gt;Spacing&lt;/FONT&gt;&lt;/EM&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; (*&amp;nbsp;(sin (/ pi 3)) &lt;/STRONG&gt;&lt;/FONT&gt;&lt;EM&gt;&lt;FONT color="#00CCFF"&gt;&lt;FONT color="#3366FF"&gt;Horizontal&lt;/FONT&gt;Spacing&lt;/FONT&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 11:44:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11947159#M30516</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-05-07T11:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Triangular array with equal spacing between objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11948372#M30517</link>
      <description>&lt;P&gt;Good idea bit easier to code.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 07:41:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/triangular-array-with-equal-spacing-between-objects/m-p/11948372#M30517</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-05-08T07:41:57Z</dc:date>
    </item>
  </channel>
</rss>

