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

Part Section Marker Background Fill - GDL

Anonymous
Not applicable
Hello all and Happy New year,

We use a section marker with different ends to reference section details etc, a circle plus text and arrow at one end and a rectangle tail at the other as in the attached.

We couldn't find a marker in the version of Archicad we use that could accomplish this so after a lot of searching I found the 'Section Park Marker' which is exactly what we need, however the circle with text in doesn't have a background fill, as shown by the blue line in the attached.

I've been trying to edit the script to give the circle a fill with no luck, would anyone be able to help please, or can anyone point me to a better marker?!! I tried replacing circle2 with Poly2 as a stab in the dark with no luck...!

The script I believe is for the 2D representation of the marker is below. Thanks in advance!
!!!************************************ Section Part Marker_NCS ************************
IF elev_sect_mark_US_type = 2 THEN


	pen gs_cont_pen


	! centered, always horizontal marker text
	style centerstyle

	dist=AC_MarkerSize/sqr(2)
	mark_rad=AC_MarkerSize/2		!!!*sqr(2)

	If not(SYMB_MIRRORED) Then
		If gs_flipp Then
			flipp=1
		Else
			flipp=0
		EndIf
	Else
		If gs_flipp Then
			flipp=0
		Else
			flipp=1
		EndIf
	EndIf



	If not(flipp) Then
		unID=1
		hotspot2 0,0,unID : unID=unID+1
		hotspot2 -dist,0,unID : unID=unID+1
		hotspot2 -dist,dist,unID : unID=unID+1
		hotspot2 -2*dist,0,unID : unID=unID+1

		add2 -dist,0

		for i=1 to 2
			poly2_b	5, 7, gs_backfill_pen_fg, gs_backfill_pen_bg,
					-dist, 0, 1,
					-mark_rad, 0, 1,
					0, 0, 901,
					mark_rad, -45, 4001,
					-dist, 0, -1
			mul2 -1,1
		next i
		del 2

		poly2_b	5, 7, gs_backfill_pen_fg, gs_backfill_pen_bg,
				0, dist, 1,
				mark_rad*sqr(2)/2, mark_rad*sqr(2)/2, 1,
				0, 0, 901,
				mark_rad, 90, 4001,
				0, dist, -1

		circle2 0,0,mark_rad


		!!! Text division line !!!!!!!!!!!!!!!

		if gs_marker_text_rotation_int = 1 or gs_marker_text_rotation_int = 2 then	! Horizontal, Vertical
			mrr = SYMB_MIRRORED - not(SYMB_MIRRORED)	! 1 / -1
			rot2 SYMB_ROTANGLE * mrr					! reset x to horizontal
			if gs_marker_text_rotation_int = 2 then
				rot2 90
			endif
		endif


		line2 -mark_rad,0,mark_rad,0

		if gs_marker_text_rotation_int = 1 or gs_marker_text_rotation_int = 2 then
			if gs_marker_text_rotation_int = 2 then del 1
			del 1
		endif


	Else
		thk=0.0015*1000
		len=0.0030*1000
		gs_fill_pen=1 : gs_back_pen=91
		poly2_b	5, 7, gs_backfill_pen_fg, gs_backfill_pen_bg,
				0, 0, 1,
				0, len, 1,
				-thk, len, 1,
				-thk, 0, 1,
				0, 0, -1

	endif

ENDIF

4 REPLIES 4
David Maudlin
Rockstar
PrendosJoe:

This is a guess as I just scanned the code, but I am thinking that the line:
circle2 0,0,mark_rad
is the circle. So just after this line your would add a line of code for the fill using the POLY2_ command (or other versions of it if you want more control) after setting the fill you want to use. Since the Poly2_ command has Status values, you can use the Additional Status Codes (see the GDL Reference Guide) to draw the circle.

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

This one makes a poly circle with contour line

poly2_B 6, 1+2+4, gs_fill_pen,gs_back_pen,
	mark_rad,	0,	1,
	0,			0,	901,
	0,			180,	4001,
	0,			0,	901,
	0,			180,	4001,
	mark_rad,	        0,	-1
Anonymous
Not applicable
Fantastic, thank you very much both!

The only issue with this is that the background pen of the circle and the arrow are now the same, whereas we would prefer the arrow part to be black and the circle white. Is this relatively straight forward or would it require a new parameter adding etc?

Many thanks
Anonymous
Not applicable
Hello,

You could use the screen pen (usually white) for the background, it
has the index number -1.


fill "Empty"
poly2_B 6, 1+2+4, gs_cont_pen, -1, 
   mark_rad,   0,   1, 
   0,         0,   901, 
   0,         180,   4001, 
   0,         0,   901, 
   0,         180,   4001, 
   mark_rad,           0,   -1