GDL
About building parametric objects with GDL.

Cut Material in 3D

Anonymous
Not applicable
A project I'm working on is pretty complicated when it comes to height differences. So I decided to show those differences with a rainbow colour spectrum.
The issue I have is that the graphical overriding (in German it's called Graphische Überschreibung) only works on the ceilings.

I've created a object which layers Polys every 0.50 m and changes surface accordingly.

My thought being that I could then use solid intersection to get these colors also on the ramp and ceiling of the parking garage.

The surface which is cut is just grey. I assume it's because of the building material. Is there a way to override this?

When I set the status code of the poly to 1 I can see that the colors are still there but only where the layers of the poly are.
MODEL SOLID

For i =Von to bis

Material BM

set Material i
!block A,B,hohe

put 0	,0	,15
put A	,0	,15
put A	,B	,15
put 0	,B	,15

prism_ NSP/3,hohe,
	get (NSP)


addz hohe

next i
10 REPLIES 10
Podolsky
Ace
Hi. Check options in SEO - there must set "Use Own Attributes". And if you would like to see same colour when you cut in 3D (with marquee for example), set "Use Element Attributes" in Filter and Cut Elements in 3D dialog.
Lingwisyer
Guru
I think this has got to do with the Cut_fill settings. You would have to set it for each of your layers. I can only think of being able to change this via the Building Material command.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Marc H
Advisor
Very nice visualization idea.
“The best thing about the future is that it comes one day at a time.” - Abraham Lincoln

AC27 USA on 16” 2019 MBP (2.4GHz i9 8-Core, 32GB DDR4, AMD Radeon Pro 5500M 8G GDDR5, 500GB SSD, T3s, Trackpad use) running Sonoma OS + extended w/ (2) 32" ASUS ProArt PAU32C (4K) Monitors
Anonymous
Not applicable
Lingwisyer wrote:
I think this has got to do with the Cut_fill settings. You would have to set it for each of your layers. I can only think of being able to change this via the Building Material command.



Ling.

I was afraid so. In the end the solution i found without creating a building material for each colour was to draw the layers as mesh and then using solid intersection. After I could turn it into a mesh again and save it as an Object.
A bit of a work around though
Anonymous
Not applicable
Podolsky wrote:
Hi. Check options in SEO - there must set "Use Own Attributes". And if you would like to see same colour when you cut in 3D (with marquee for example), set "Use Element Attributes" in Filter and Cut Elements in 3D dialog.
Is the a way to set this up within a 3D script?
Podolsky
Ace
You cannot control external ArchiCAD commands with GDL script. Maybe I don't understand something - what exactly you need. If this is the case - I can review your file and script - if you upload it here.
Anonymous
Not applicable
Podolsky wrote:
You cannot control external ArchiCAD commands with GDL script. Maybe I don't understand something - what exactly you need. If this is the case - I can review your file and script - if you upload it here.
I got a bit further in my project.

My thinking is that if get this object to override the surface of what I'm loading into it in segments, it could easily adjust to change.
I would just have to select everything I want coloured and save them as an Object which I then "call" into it.

The issue now is that it doesn't change the materials of what I'm loading into it.

I thought that it might be possible to repeat the solid operation in using "for to next".
Here I encountered two problems: The Group "Z" doesn't change material and seems to stay on the first index
And I can't "count" the groups (As in "O(i)")

Is the a way to override materials given to something before? like clearing all attributes and assigning a new one


Versatz = 9.00
Von = 1
Bis = 21
Hohe = 0.5

addz -GLOB_ELEVATION-Versatz			!GLOB_CUTPLANES_INFO[1] + GLOB_CSTORY_ELEV - GLOB_HSTORY_ELEV

Group "Z"



	For i =Von to bis
	set Material i
	BUILDING_MATERIAL i
	hotspot 0,0,0
	
	put 0	,0	,15
	put A	,0	,15
	put A	,B	,15
	put 0	,B	,15
	
	prism_ NSP/3,hohe,
		get (NSP)
	
	addz hohe
	
	next i

del top

Endgroup


Group "O"


!!Afterwards I want to insert a Call here

!!The Idea being that if something changes, I can select all ceilings and ramps and just replace the object I'm calling

	add A/4, B/4,0

	hotspot 0,0,0

	set Material 1
	BUILDING_MATERIAL 1
	
	put 0	,0	,15
	put A/2	,0	,15
	put A/2	,B/2	,15
	put 0	,B/2	,15
	
	prism_ NSP/3,5,
		get (NSP)
	

Endgroup

Placegroup "Z" !Ziel

Placegroup "O" ! Operator

Result = ISECTGROUP{3} ("Z", "O", 0, 0, 0 , 2)


addx A*2

Placegroup Result

del 1
Anonymous
Not applicable
Hi Arnaut,
If I understand you correctly, there is a solution for this that I used in the Composite Mesh Object.
It is what I call a "GDL Jedi Trick" like "These are not the droids we are looking for"
So, to fool a Called custom saved object to display new BM's or any other parameters, the trick is to: In the Call definition of the saved object, define all the parameters that you want to override with a "-1" value. The CALL commands says something like: if the compiler can't find the value in the local list of attributes it will adopt the very previous BM definition. So put a BM definition right before the CALL. Then it will stick to the Called object.
It will give only a "minor error occurred message" while saving it, but it wont affect the object functionality.
Hope this helps.
Anonymous
Not applicable
Braza wrote:
Hi Arnaut,
If I understand you correctly, there is a solution for this that I used in the Composite Mesh Object.
It is what I call a "GDL Jedi Trick" like "These are not the droids we are looking for"
So, to full a Called custom saved object to display new BM's or any other parameters, the trick is to: In the Call definition of the saved object, define all the parameters that you want to override with a "-1" value. The CALL commands says something like: if the compiler can't find the value in the local list of attributes it will adopt the very previous BM definition. So put a BM definition right before the CALL. Then it will stick to the Called object.
It will give only a "minor error occurred message" while saving it, but it wont affect the object functionality.
Hope this helps.
Worked perfectly! Thank you so much!

i can now, call -> Override -> Cut and repeat

A lot more elegant than I would have managed!
MODEL SOLID

if GLOB_CONTEXT = 2 then
add 0,0,GLOB_CUTPLANES_INFO[1] + GLOB_CSTORY_ELEV - GLOB_HSTORY_ELEV
CUTPLANE{2} 0,0
del 1
endif

i = von

h = von_H


Group "O"

CALL "Operator Höhenfarben" PARAMETERS materialAttribute_1 = 2, materialAttribute_2 = 3, materialAttribute_3 = i

Endgroup

if Sichtbar then
placegroup "O"
endif



repeat

	i = i + 1
	h = h + hohe
Gosub "Schicht":

until h >= bis_H



IF GLOB_CONTEXT=2 THEN
CUTEND
ENDIF

del top

!===========================================================
End
!===========================================================



"Schicht":
addz h-GLOB_ELEVATION!-Versatz
CUTPLANE 1,1,0,0
addz -hohe
CUTPLANE 1,1,0,1
!Circle 10
del 2

!material i
!addz -10
!Block 10,10,10
!del 1


CALL "Operator Höhenfarben" PARAMETERS materialAttribute_1 = i, materialAttribute_2 = i, materialAttribute_3 = i, materialAttribute_4 = i, materialAttribute_5 = i, buildingMatAttribute_1 = i

Cutend
Cutend
Return