GDL
About building parametric objects with GDL.
SOLVED!

Close Wall in Floorview Building a Window

Martin Walter
Enthusiast
I created a window using the WALLHOLE command in the 3D script. Now the hole appears correctly in the floor view too. But the wall appears to be open in the floor view. What can I do to close the wall?
AC23, Windows 10, i7-6700HQ, 8Gb RAM, 500Gb SSD
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Anonymous
Not applicable
Kristian and David are correct. You could set it as 2d lines, but Wallhole command should do the wall 2d contours.

You probably have your composite lines off, or your window AC_WallContours is set to 0.
Hope this helps.

View solution in original post

11 REPLIES 11
David Maudlin
Virtuoso
Martin Walter:

You will need to write GDL code in the 2D Script with the 2D Shape commands to get the appearance you want.

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.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Closing the wall is simple if you just want a single line with a pen weight you can control.
line2 -a/2, wido_sill, -a/2, wido_sill -C_
However, if you want the closing to match each skin of the wall in a composite then you will need to use the properties for skin thickness and pens contain in this array:

"WALL_SKINS_PARAMS"

This will give you everything you need for when you want to wrap wall skins and create different reveals.
Its pretty cool that the opening tools in Archicad pick up this information by default, so I think we should use it to make our objects more capable.
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
Solution
Anonymous
Not applicable
Kristian and David are correct. You could set it as 2d lines, but Wallhole command should do the wall 2d contours.

You probably have your composite lines off, or your window AC_WallContours is set to 0.
Hope this helps.

Martin Walter
Enthusiast
Thank you very much!
The window AC_WallContours was set to 0.
AC23, Windows 10, i7-6700HQ, 8Gb RAM, 500Gb SSD
Braza wrote:
but Wallhole command should do the wall 2d contours.
The Wallhole2 doesn't seem to set the contours of the skin in my object (infinite Openings). Perhaps they are set if you don't use a custom wallhole
It would be nice if i didn't have to script it because its an ugly piece of code (that I could probably tidy up), and if it was automated it would have to work for the wallholes I create for cavity sliders & cover plates. Hence I feel it is just something you have to code manually, but i would love to be wrong.
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
Lingwisyer
Guru
Yeah, does not seem to work if you set a Wallhole2.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
This is what my code looks like to solve it. Its a bit messy as it grew slowly and I haven't found the need (time) to tidy it up, plus it has the pocket door stuff.

if GLOB_VIEW_TYPE = 2 \
&  _bShow2D[1][2] \
&  WALL_SKINS_NUMBER > 0 then
	skinSTART = 0
	for k = 1 to WALL_SKINS_NUMBER
		if WALL_SKINS_PARAMS[WS_ENDFACE_PEN] > 0 then
			pen WALL_SKINS_PARAMS[WS_ENDFACE_PEN]
		else
			pen WALL_SKINS_PARAMS[WS_CONT_PEN]
		endif
		if k = 1 then
			if dPocketRight > EPS then linEND = min((WALL_SKINS_PARAMS[2]), staPOCKET)
			if dPocketRight < EPS then linEND = WALL_SKINS_PARAMS[2]
			if not(bRightCornerFunction) then if not(_bTurnPlaster[2][2]) then WALLLINE2 posRIGHT, -wido_sill, posRIGHT -linEND/angR, -wido_sill +linEND
			if dPocketLeft > EPS then linEND = min((WALL_SKINS_PARAMS[2]), staPOCKET)
			if dPocketLeft < EPS then linEND = WALL_SKINS_PARAMS[2]
			if not(bLeftCornerFunction) then if not(_bTurnPlaster[2][1]) then WALLLINE2 -posLEFT, -wido_sill, -posLEFT +linEND/angL, -wido_sill +linEND
		else
			skinSTART = skinSTART +WALL_SKINS_PARAMS[k -1][2]
			if k = WALL_SKINS_NUMBER then
				if dPocketRight > EPS then linSTA = max(skinSTART, finPOCKET)
				if dPocketRight < EPS then linSTA = skinSTART
				if not(bRightCornerFunction) then if not(_bTurnPlaster[1][2]) then WALLLINE2 posRIGHT -linSTA/angR, -wido_sill +linSTA, posRIGHT -(skinSTART +WALL_SKINS_PARAMS[2])/angR, -wido_sill +skinSTART +WALL_SKINS_PARAMS[2]
				if dPocketLeft > EPS then linSTA = max(skinSTART, finPOCKET)
				if dPocketLeft < EPS then linSTA = skinSTART
				if not(bLeftCornerFunction) then if not(_bTurnPlaster[1][1]) then WALLLINE2 -posLEFT +linSTA/angL, -wido_sill +linSTA, -posLEFT +(skinSTART +WALL_SKINS_PARAMS[2])/angL, -wido_sill +skinSTART +WALL_SKINS_PARAMS[2]
			else
				if skinSTART < staPOCKET then !external
					linSTA = skinSTART
					linEND = skinSTART +WALL_SKINS_PARAMS[2]
					if dPocketRight > EPS then linEND = min((skinSTART +WALL_SKINS_PARAMS[2]), staPOCKET)
					if not(bRightCornerFunction) then if linSTA < linEND then WALLLINE2 posRIGHT -linSTA/angR, -wido_sill +linSTA, posRIGHT -linEND/angR, -wido_sill +linEND

					linSTA = skinSTART
					linEND = skinSTART +WALL_SKINS_PARAMS[2]
					if dPocketLeft > EPS then linEND = min((skinSTART +WALL_SKINS_PARAMS[2]), staPOCKET)
					if not(bLeftCornerFunction) then if linSTA < linEND then WALLLINE2 -posLEFT +linSTA/angL, -wido_sill +linSTA, -posLEFT +linEND/angL, -wido_sill +linEND
				else !internal
					linSTA = skinSTART
					if dPocketRight > EPS then linSTA = max(skinSTART, finPOCKET)
					linEND = skinSTART +WALL_SKINS_PARAMS[2]
					if not(bRightCornerFunction) then if linSTA < linEND then WALLLINE2 posRIGHT -linSTA/angR, -wido_sill +linSTA, posRIGHT -linEND/angR, -wido_sill +linEND

					linSTA = skinSTART
					if dPocketLeft > EPS then linSTA = max(skinSTART, finPOCKET)
					linEND = skinSTART +WALL_SKINS_PARAMS[2]
					if not(bLeftCornerFunction) then if linSTA < linEND then WALLLINE2 -posLEFT +linSTA/angL, -wido_sill +linSTA, -posLEFT +linEND/angL, -wido_sill +linEND
				endif
			endif
		endif
	next k
else
	pen WALL_SKINS_PARAMS[1][WS_CONT_PEN]
	if not(bRightCornerFunction) then WALLLINE2 posRIGHT, -wido_sill, posRIGHT, -wido_sill +WALL_SKINS_PARAMS[1][2]
	if not(bLeftCornerFunction) then WALLLINE2 -posLEFT, -wido_sill, -posLEFT, -wido_sill +WALL_SKINS_PARAMS[1][2]
endif

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
Anonymous
Not applicable
Hi Kristian,

I just did a quick test with a custom window (Save Selection (2slabs, one with ID = Wallhole) as Window).
I inspected the result code and it was this:
3D
!!wallhole 6DEF8E73-32AA-4BEB-94A8-8CADF905B89A
addz    0.7259584402351
wallhole	     4,      1,
        15.97413158518, 7.293474162633,     15,
        17.59320053688, 7.293474162633,     15,
        17.59320053688, 8.912543114331,     15,
        15.97413158518, 8.912543114331,     15,
                   0,            0,            1
del          1
group 	"group_AE8D15B6_82CF_4C05_B675_CEFFD583B297"
endgroup
2D
rot2 180
project2 4, 90, 1
del 1
And this is the result 2d/FloorPlan


Hope this helps to clarify the situation.

Cheers,

Paulo

BTW: Your Infinite Openings Object (And all your GDL work) looks amazing. This is proper GDL Kungfu!
Thanks Paulo, "Kung Fu lives in everything we do" so I appreciate your comment.

I'm glad the solution your provided works and i am sure it can be put to good use, however, I stay away from the "project2" function, which i think is the advice in the GDL Technical Standards.

Your solution is perfect for someone who is building a custom element for in house use, and far more efficient than my code. However it shouldn't be use for a library that will be distributed (such as mine) as there is a responsibility to follow the GDL Technical Standards.
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