<?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 Erithage Material (surface) from the &amp;quot;base group&amp;quot; using SUBGROUP{3} in GDL in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571968#M5753</link>
    <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/6044"&gt;@Mario Sacco&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could use arrays and iterate through them, maybe. Probably not very efficient but it'll work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;pen 1

NUM_BLOCKS = 4

dim names[]
dim mats[]
	mats[1] = 5
	mats[2] = 4
	mats[3] = 3
	mats[4] = 2

for NUM = 1 to NUM_BLOCKS
	names[NUM]	= "A" + str(NUM, 1, 0) ! A1, A2...

	group names[NUM]
		addx 1.1*(NUM-1)
		material mats[NUM]
		block 1,1,1
		del 1
	endgroup
next NUM

group "B"
	for NUM = 1 to NUM_BLOCKS
		material 6
		add -.7+(1.2*(NUM-1)),.5,.5
		block 1,1,1
		del 1
	next NUM
endgroup

for NUM = 1 to NUM_BLOCKS
	placegroup subgroup{3} (names[NUM], "B", 0, mats[NUM], 0, 0)
next NUM&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Oct 2023 11:33:13 GMT</pubDate>
    <dc:creator>MF BIM</dc:creator>
    <dc:date>2023-10-21T11:33:13Z</dc:date>
    <item>
      <title>How to inherit Material (surface) from the "base group" using SUBGROUP{3} in GDL</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571852#M5749</link>
      <description>&lt;P&gt;I can't find a solution to inherit the material from the "base group" in GDL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code I made, always attribuites to the cut polygons the material of the "tool group"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to have the cubes inherit their own material&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;LI-CODE lang="java"&gt;PEN 1

GROUP "A"
MATERIAL 5
BLOCK 1,1,1
ADDX 1.1
MATERIAL 4
BLOCK 1,1,1
DEL 1
ENDGROUP

GROUP "B"
MATERIAL 7
ADD .5,.5,.5
BLOCK 1,1,1
DEL 1


MATERIAL 6
ADD -.7,.5,.5
BLOCK 1,1,1
DEL 1
ENDGROUP


PLACEGROUP SUBGROUP{3} ("A","B",0,0,0,0)&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarioSacco_0-1697808867519.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/47601iA5328BF8A8B88C22/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarioSacco_0-1697808867519.png" alt="MarioSacco_0-1697808867519.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 08:13:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571852#M5749</guid>
      <dc:creator>Mario Sacco</dc:creator>
      <dc:date>2024-09-24T08:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Erithage Material (surface) from the "base group" using SUBGROUP{3} in GDL</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571927#M5751</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/6044"&gt;@Mario Sacco&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to input the materialId value in the 4th argument of the subgroup command. If you want each block to have its own material then you would need to have as many base groups and subgroup commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;PEN 1
MAT_1 = 5
MAT_2 = 4

GROUP "A1"
	MATERIAL MAT_1
	BLOCK 1,1,1
ENDGROUP

GROUP "A2"
	ADDX 1.1
	MATERIAL MAT_2
	BLOCK 1,1,1
	DEL 1
ENDGROUP

GROUP "B"
	MATERIAL 7
	ADD .5,.5,.5
	BLOCK 1,1,1
	DEL 1

	MATERIAL 6
	ADD -.7,.5,.5
	BLOCK 1,1,1
	DEL 1
ENDGROUP

PLACEGROUP SUBGROUP{3} ("A1", "B", 0, MAT_1, 0, 0)
PLACEGROUP SUBGROUP{3} ("A2", "B", 0, MAT_2, 0, 0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 19:59:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571927#M5751</guid>
      <dc:creator>MF BIM</dc:creator>
      <dc:date>2023-10-20T19:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Erithage Material (surface) from the "base group" using SUBGROUP{3} in GDL</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571955#M5752</link>
      <description>&lt;P&gt;This solution is ok if I can separate the single objects.&lt;/P&gt;
&lt;P&gt;My code include hundreds of objects with different colours and I need execute the subtraction only one.&lt;/P&gt;
&lt;P&gt;As you can see the are many panels and the side cutted volumes have an incorrect surface.&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="MarioSacco_0-1697865165624.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/47653i4700472C557F2578/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarioSacco_0-1697865165624.png" alt="MarioSacco_0-1697865165624.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I probably will try to use CUTPOLY for my problem, but for complex operation it can't work.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 05:16:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571955#M5752</guid>
      <dc:creator>Mario Sacco</dc:creator>
      <dc:date>2023-10-21T05:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Erithage Material (surface) from the "base group" using SUBGROUP{3} in GDL</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571968#M5753</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/6044"&gt;@Mario Sacco&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could use arrays and iterate through them, maybe. Probably not very efficient but it'll work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;pen 1

NUM_BLOCKS = 4

dim names[]
dim mats[]
	mats[1] = 5
	mats[2] = 4
	mats[3] = 3
	mats[4] = 2

for NUM = 1 to NUM_BLOCKS
	names[NUM]	= "A" + str(NUM, 1, 0) ! A1, A2...

	group names[NUM]
		addx 1.1*(NUM-1)
		material mats[NUM]
		block 1,1,1
		del 1
	endgroup
next NUM

group "B"
	for NUM = 1 to NUM_BLOCKS
		material 6
		add -.7+(1.2*(NUM-1)),.5,.5
		block 1,1,1
		del 1
	next NUM
endgroup

for NUM = 1 to NUM_BLOCKS
	placegroup subgroup{3} (names[NUM], "B", 0, mats[NUM], 0, 0)
next NUM&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 11:33:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571968#M5753</guid>
      <dc:creator>MF BIM</dc:creator>
      <dc:date>2023-10-21T11:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to Erithage Material (surface) from the "base group" using SUBGROUP{3} in GDL</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571987#M5754</link>
      <description>&lt;P&gt;This is the code using CUTPOLYA. It works fine but you can use only an extrusion as subtraction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;LI-CODE lang="python"&gt;PEN 1
CUTPOLYA 11,1,0,
-1,-1,15,
-1,11,15,
11,11,15,
11,-1,15,
-1,-1,15,
1,1,15,
7,2,15,
8,7,15,
2,8,15,
1,1,15,
-1,-1,15

MATERIAL 2
BLOCK 4,10,1

ADDX 5
MATERIAL 3
BLOCK 5,10,1

CUTEND
&lt;/LI-CODE&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 21 Oct 2023 14:57:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-inherit-Material-surface-from-the-quot-base-group-quot/m-p/571987#M5754</guid>
      <dc:creator>Mario Sacco</dc:creator>
      <dc:date>2023-10-21T14:57:36Z</dc:date>
    </item>
  </channel>
</rss>

