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

GDL
About building parametric objects with GDL.

Poly2 - Fill & Outline combined

GDL Enthusiast
Enthusiast
Hi GDL Experts,

A simple question, is it possible to write both the fill and the outline in the same code shape syntax?

Currently I write two pieces of Syntax, one for the fill and one for the outline:

!=== Fill Syntax
pen 1
SET FILL "Solid"
POLY2_ 5,7,
0,0,1,
A,0,1,
A,B,1,
0,B,1,
0,0,-1

!=== Outline Syntax
pen 1
LINE2 0,0,A,0
LINE2 A,0,A,B
LINE2 A,B,0,B
LINE2 0,B,0,0

Is there a way to combine them so that I don't double up the code?

Many thanks in advance!
2 REPLIES 2
runxel
Legend
Use POLY2_B.
Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Podolsky
Ace
Any POLY2, POLY2_, POLY2_A, POLY2_B etc have second parameter, that defines presence of fill and outline. This parameter can be written as 1+2+4 where 1 means draw contour, 2 - draw fill, 4 - close an open polygon.
In your case you have chosen 7 - so it works. If you want to use different pens for fill and outline, use POLY2_A, POLY2_B or POLY2_B{2}.
For more details refer to GDL user manual.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!