We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Poly2_B and Solid Fills

fuzzytnth3
Booster
Weird one well tis to me.

It seems that you can't use a Solid fill with Poly2_B as it doesn't show the fill but just the contour. Does this happen with the other Poly2_ commands?

Below is an illustration showing what I get using Solid, Vectorial and Symbolic fills

AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
7 REPLIES 7
fuzzytnth3
Booster
One workaround would be to set both pens to white / 91 that way you can't see the pattern.

I've tried stealing the code from an Archicad generated object but that didn't work although the object does. I must be missing something
!=====================•••Frame Fill•••==================
IF shwfrafil = 1 THEN
SET FILL frmfil

PEN 251
	POLY2_B{5} 	9,		frmfil, 	0, 		3,  frmfilptpen , frmfilbkgdpen, 
                   0, 0, 1, 0, 0, 1, 0, 
		-frmsz,		-strucszbot, 		1,	!1
		0,			-strucszbot, 		1,	!2
		0,			b, 					1,	!3
		a,			b, 					1,	!4
		a,			-strucszbot,		1,	!5
		a+frmsz,	-strucszbot, 		1,	!6	
		a+frmsz,	b+frmsz, 			1,	!7
		-frmsz, 	b+frmsz, 			1,	!8
		-frmsz,		-strucszbot,		1	!9
ENDIF
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
Anonymous
Not applicable
The second parameter is the frame fill - it controls whether the edge lines, the fill or both are displayed. The only options for POLY2_B{5} are 1, 2 or 4. (*see note below)

Change frmfil to 1+2 and it should work.

---------------------------

*While looking at this I noticed (in AC15 at least) that the manual says 1,2,or 4 are the only options, but dragging in a fill from the plan with the fill set to cut or cover, it adds 32 or 64 to this figure -

poly2_b{5} 5, 35, 1, 3, 110, 130,

poly2_b{5} 5, 67, 1, 3, 110, 130,

...which is how the other poly2_b{x} should behave, and specifically not poly2_b{5}! Although this doesn't stop the object from working, it doesn't control the cut or cover properties at all; the next parameter does (set at 1 in my examples).

The manual is also incorrect about the value this should be set to. It says fillcategory: 0 - Draft 1 - Cut 2- Cover, but it appears actually 0&1 are Draft, 2&3 are Cut, and 4&5 are Cover!

Don't trust the auto-scripted fills - they are incorrect!

I hope this has been corrected in AC17! (I can't check I'm afraid)
Jochen Suehlo
Moderator
Manual says:
frame_fill = j1 + 2*j2 + 4*j3 + 8*j4 + 16*j5 + 32*j6 + 64*j7, where each j can be 0 or 1.
j1: draw contour
j2: draw fill
j3: close an open polygon
...

So I think you must use: 1 + 2 + 4 = 7 for frame_fill
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
fuzzytnth3
Booster
What you are both missing is I'm not having a problem getting the Poly2_B type polygon to display but that it only displays certain types of fill.

ArchiCAD has 4 categories of Fill ie Solid, Gradient, Vectorial and Symbolic. For whatever reason Poly2_B seems to only display certain Fill types and what is even more puzzling is that with Vectorial Fills it displays some but not all, weird!

Anyway to get round the problem I have regressed back to Poly2_ type polygon and it plays nicely with Solid Fills

POLY2_ 9, 3,		!Working fill for white
		-frmsz,		-strucszbot, 		15,	!1
		0,			-strucszbot, 		15,	!2
		0,			b, 					15,	!3
		a,			b, 					15,	!4
		a,			-strucszbot,		15,	!5
		a+frmsz,	-strucszbot, 		15,	!6	
		a+frmsz,	b+frmsz, 			15,	!7
		-frmsz, 	b+frmsz, 			15,	!8
		-frmsz,		-strucszbot,		-1	!9
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
Dominika Bobaly
Graphisoft
Graphisoft
fuzzytnth3,

I have tried to look into your case, with a simple scripted test object:

! Comments:
! boolean type parameters: bDrawFillBit, bCutFillBit, bCoverFillBit
! pen type parameters: fillContPen, fillPen, fillBgPen
! fill type parameter: fillTypePoly
! variables: recess, frame_fill

pen fillContPen
fill fillTypePoly

recess = 0.22
frame_fill = 1 + bDrawFillBit*2 + 4 + 32*bCutFillBit + 64*bCoverFillBit

poly2_B 10, frame_fill,
		fillPen, fillBgPen,
		0, 0, 1,
		A, 0, 1,
		A, B, 1,
		0, B, 1,
		0, 0, -1,

		recess, recess, 1, 
		A-recess, recess, 1,
		A-recess, B-recess, 1,
		recess, B-recess, 1,
		recess, recess, -1

nameFill = ""
n = REQUEST ("Name_of_fill", fillTypePoly, nameFill)

define style "textStyle" "Helvetica", 3, 1, 0
set style "textStyle"

text2 0, 0, nameFill
I wasn't able to reproduce the missing function, worked fine for me (same AC version you have).
Please give it another go with the test object.

Change the "fillTypePoly" parameter to any fill you wish to try( I have tried several from Solid/Vectorial/Symbolic types, all working).
There are booleans to turn certain fill attributes on/off inside the frame_fill variable, depending on your needs. If you want an empty fill, set "bDrawFillBit" to zero. Turning off this bit hides the fill completely, leaving only the contours of the polygon (this looks a lot like your first example). The 1 before that controls the visibility of the contours. If you set that to 0, no contours will be visible. Bit 4 closes the open polygon. With 32 and 64 you can make your poly behave like a cut or a cover fill (only turn on one of those at a time, and when both is off, your fill acts like a draft fill).
This way you can create a matrix of draft/cut/cover and solid/Vectorial/Symbolic fill objects.

If the above does not solve the problem, please review your Model View Options settings in Document/Set Model View menu. There are certain possibilities to override different filltype's attributes in your plan on the "Override Fill Display" tab.

Give these a try. Falling back to poly2_ should be your last option:)
If the problem is still visible, please contact our Support Team or your Reseller, and send us a plan (preferably .pla) with your scripted objects.

-----------------------------------------------------
Software Engineer
ArchiCAD Development - Library Team
-----------------------------------------------------

Product Manager

Graphisoft
fuzzytnth3
Booster
Thanks for taking a look at this. I made the fill test object as per your script and instructions and it worked as you said.

I then tried to apply it to my object and I found that it worked when I used the frame_fill parameter the way you did in the test object.

So thank you again it is working nicely now.
frame_fill = 1 + bDrawFillBit*2 + 4 + 32*bCutFillBit + 64*bCoverFillBit 
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
Dominika Bobaly
Graphisoft
Graphisoft
I'm glad to hear it's working for you as well:)
-----------------------------------------------------

Product Manager

Graphisoft