Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Wallniche side materials

runxel
Mentor
What's the secret for having custom surfaces in a WALLNICHE?
The status bit 256 is set, the materials (surfaces) as well, but it changes nothing.
Any insight here?
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
7 REPLIES 7

I battled with this initially too. In the end I found you just use the wallniche without the material set for each line and instead set the material before. You can even see in my example where I hid my original material setting.

for k = 1 to vardim1(nodes_x)
	put _nodes_x, _nodes_y, 31	!1+4+8+16, MATWallReveal
next k
material MATWallReveal
wallniche nsp/3, 1, 2+16,
	0,0,1,	0,
	get(nsp)
"MATWallReveal" in this example is a variable determined by either the external and internal wall surfaces or by a custom setting when the user opts to turn the custom setting on.

if bCustRevealMat then
	MATWallReveal	= _iSurfaces[5][1]
	MATWallOpposite = _iSurfaces[6][1]
else
	if WIDO_REVEAL_SIDE then
		if elTYPE = 1 then MATWallReveal	= WALL_MAT_A
		if elTYPE = 1 then MATWallOpposite 	= WALL_MAT_B

	else
		if elTYPE = 1 then MATWallReveal	= WALL_MAT_B
		if elTYPE = 1 then MATWallOpposite 	= WALL_MAT_A
	endif
endif
so simple... once you know.
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists

Barry Kelly
Moderator
Funny, I was working on this just last week.
This is what I used.
	
	m1=1	!!the polygon will create a visible edge upon entry into the body being cut
	m2=1	!!depth - the lengthwise edge of the cutting form will be visible
	m3=1	!!the polygon will create a visible edge upon exiting the body being cut
	m4=1	!!outside - the bottom edge of the cutting form will be visible
	m5=1	!!inside - the top edge of the cutting form will be visible
	m7=0	!!controls the viewpoint dependent visibility of the lengthwise edge

	MATERIAL rear_mat
		WALLNICHE 4, 1, 1*0 + 2*0 + 8*0 + 16*1 + 32*0 + 64*0 + 128*0 + 256*1,
		0, 0, 1, 0,
			-(a*0.5),0,1*m1 + 2*m2 + 4*m3 + 8*m4 + 16*m5 + 64*m7,bot_edge_mat,
			(a*0.5),0,1*m1 + 2*m2 + 4*m3 + 8*m4 + 16*m5 + 64*m7,left_edge_mat,
			(a*0.5),b,1*m1 + 2*m2 + 4*m3 + 8*m4 + 16*m5 + 64*m7,top_edge_mat,
			(-a*0.5),b,1*m1 + 2*m2 + 4*m3 + 8*m4 + 16*m5 + 64*m7,Right_edge_mat
The material for the rear of the niche is set with the standard MATERIAL command.
The edges are all controlled in the niche code.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Lingwisyer
Virtuoso
Would not the point of 256 be to have each side of the niche independent? Setting a material before hand only allows you to define a uniform side material.



Ling.
AC18-23 AUS 7000
Self-taught, bend it till it breaks.
Win10 | E5620 x 2 | 24GB | K2200

Sorry I was not assuming a different material for each side. I have not needed this yet so haven't tested it.

Barry seems to have it working fine though, and that is with the 256 (+ the 16 also).

Perhaps the issue runxel is witnessing is due to the settings of the mask codes as well.
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists

runxel
Mentor
Guys, thanks for so much input!
That was very helpful indeed! Glad to have you all here.

I got it sorted out.
So what was the issue here?
First of all, the first status bit j1 cancels the 256 j9 bit!
This is not documented in the GDL manual, and in the german translation I had open the wording is a bit off, so I misinterpreted that the first bit has to be set, while it is in fact the other way around.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

bouhmidage
Enthusiast
Oh god, gdl, the BIG SECRET OF ARCHICAD...
How do you learned it please, a 500 page book (gdl cookbook) wont be helpful to implement gdl quickly and use it's power in an office
AMD Ryzen 9 3900X, 32 GB RAM, RTX 3080 10 GB

Archicad 23

Windows 10 professional

https://www.behance.net/Nuance-Architects

Form me, I don't really need to do very many things with .gdl.   So it is a smaller thing to learn how to use a few scripts that I never wrote myself anyway 🙂  .  Mostly is is a matter of just adding a few lines of script to some existing object to get it to do what I want.   

 

ArchiCAD 25 3011 USA - Windows 10 Pro 64x - Dell 7720 64 GB 2400MHz ECC - Xeon E3 1535M v6 4.20GHz - (2) 1TB M.2 PCIe Class 50 SSD's - 17.3" UHD IPS (3840x2160) - Nvidia Quadro P5000 16GB GDDR5 - Maxwell Studio/Render 5.2.1.49 Multilight 2.1.0.1

Didn't find the answer? Start a new discussion

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!