<?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: how to pass a whole array to a geometry functions? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265232#M3311</link>
    <description>Thanks David i wasn't aware of the special forum for the gdl center, i will try my luck there.</description>
    <pubDate>Wed, 28 Nov 2018 15:26:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-11-28T15:26:28Z</dc:date>
    <item>
      <title>how to pass a whole array to a geometry functions?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265230#M3309</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hey everyone,&lt;BR /&gt;
&lt;BR /&gt;
is it possible to pass all values from a one dimensional array to a geometry generating function without referencing the index of each single element?&lt;BR /&gt;
&lt;BR /&gt;
simple Array:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;dim sides[]

for i=1 to 3
verts&lt;I&gt; = i
next i
&lt;/I&gt;&lt;/PRE&gt;

This is possible:
&lt;PRE&gt;block verts[1], verts[2], verts[3]&lt;/PRE&gt;

But i want to pass the whole array at once something like this (not possible):
&lt;PRE&gt;block verts&lt;/PRE&gt;

This would be extremly helpful for more complicated geometry functions like the tube function. Example:
&lt;PRE&gt;TUBE 4, 7, 16+32,
	
	0,	0,	0,
	-0.5,	0,	0,
	-0.5,	-0.5,	0,
	0,	-0.5,	0,
	
	0 +0.2,	0,	0,	0,
	0,	0,	0,	0,
	0,	2,	0,	0,
	1,	2,	0,	0,
	1,	0,	0,	0,
	0,	0,	0,	0,
	0,	0+0.2,	0,	0
&lt;/PRE&gt;

&lt;BR /&gt;
For these i would like to just pass an array with the right values (for example different profiles) that can vary in length. Does someone know how this can be achieved? Thanks in advance!&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 28 Nov 2018 13:36:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265230#M3309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-28T13:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass a whole array to a geometry functions?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265231#M3310</link>
      <description>el_flamenco:&lt;BR /&gt;
&lt;BR /&gt;
I don't have the answer (maybe the Put and Get functions), but you should also post the query at &lt;A href="http://gdl.graphisoft.com/forums" target="_blank"&gt;GDL Center Forum&lt;/A&gt;, the GDL developers follow this forum.&lt;BR /&gt;
&lt;BR /&gt;
You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Wed, 28 Nov 2018 13:48:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265231#M3310</guid>
      <dc:creator>David Maudlin</dc:creator>
      <dc:date>2018-11-28T13:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass a whole array to a geometry functions?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265232#M3311</link>
      <description>Thanks David i wasn't aware of the special forum for the gdl center, i will try my luck there.</description>
      <pubDate>Wed, 28 Nov 2018 15:26:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265232#M3311</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-28T15:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass a whole array to a geometry functions?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265233#M3312</link>
      <description>Yes, you can use PUT and GET, and No, you cannot use an array as whole in a 3D command (as far as I know).&lt;BR /&gt;

&lt;PRE&gt;You can write something like this:


DIM x_g[6]: DIM y_g[6]

x_g[1]=100		:		y_g[1]=0
x_g[2]=0		:		y_g[2]=0
x_g[3]=0		:		y_g[3]=10
x_g[4]=10		:		y_g[4]=10
x_g[5]=10		:		y_g[5]=0
x_g[6]=0		:		y_g[6]=100

GOSUB "tube_4eck~"

END

"tube_4eck~":

PUT			0,0,0,		!Profil
			0,1,0,
			1,1,0,	
			1,0,0,
			0,0,0	

profpoints = NSP/3
!-----------------------------
FOR ii = 1 TO VARDIM1(x_g)
     PUT			x_g[ii],			y_g[ii],			0,		0	
NEXT ii

pathpoints = (NSP - profpoints * 3)/4
!-------------------------------

BODY -1
TUBE profpoints, pathpoints, 1+2+4+8+16+32,
GET(NSP)
BODY -1


RETURN&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Nov 2018 17:01:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265233#M3312</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2018-11-28T17:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass a whole array to a geometry functions?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265234#M3313</link>
      <description>There is an example object utilising &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;Tube&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;Put / Get&lt;E&gt;&lt;/E&gt; commands. There is a link to it in this &lt;A href="https://archicad-talk.graphisoft.com/viewtopic.php?t=56819#p272719" target="_blank"&gt;thread&lt;/A&gt;. Do not recall where the original link is...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ling.</description>
      <pubDate>Thu, 29 Nov 2018 02:28:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/how-to-pass-a-whole-array-to-a-geometry-functions/m-p/265234#M3313</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2018-11-29T02:28:04Z</dc:date>
    </item>
  </channel>
</rss>

