Streamline your workflows and master BIM coordination! Program starts April 28!

GDL
About building parametric objects with GDL.
SOLVED!

Define Symbol_Fill

Joze Marinko
Booster

I don't know how to define Symbol fill within GDL. Please give me an example.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

That is funny. 🤣

I just finished creating a roof accessory for a fibre-cement ceiling panel, and ended up defining my own symbol fill as well (although I really didn't want to because of the forced attribute creation).

 

Here is my symbol fill definition ...

gamma=0
spacingx1 = (tile_length+space_x)*2
spacingx2 = 0
spacingy1 = 0
spacingy2 = (tile_depth+space_y)*2
ac_pitch = 0

file_dependence "brick pattern - stack bond"

DEFINE SYMBOL_FILL	"Stack bond"    8,  28,  42,  73, 255,  74,  44,  24,
	spacingx1,     spacingx2,     spacingy1, spacingy2,      gamma,
	tile_length/3.00, tile_depth*cos(ac_pitch)/1.2,
	"brick pattern - stack bond" PARAMETERS tile_length = tile_length, tile_depth = tile_depth, space_x = space_x, space_y = space_y

 

You need an object (macro) with a 'Fill Definition' sub-type which I have attached here - basically a pattern file.

Mine are quite large panels - 3000mm x 1200mm, so the default size in this file is for that size.

That is why in the  symbol fill definition, you will see the length /3.00 and depth/1.2 - just change this figures to suit the panel size you set in the pattern file.

 

My pattern file also has a space between the panels which you may want to use or just set the spacing to zero.

And as mine was a roof accessory, it used the roof pitch, which I have set to zero in the above code.

You could remove 'ac_pitch' part of code completely as you won't need it for a flat ceiling.

 

Now you can apply that fill to the polygon you place in your object.

And if you use a POLY2_B[2} command, you can even add parameters to adjust the start position (origin) of the fill.

 

BarryKelly_0-1744265463925.png

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

4 REPLIES 4
runxel
Hero

That's a very complex task. I wonder why you want to do that tho?! Your new fill will be a global new attribute and pollute your file to eternity 😄

I personally would refrain from doing it honestly.

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»

I am working on a 3d hatch, which will represent suspended ceiling. Easiest way to make 2d Symbol from 3d Script is Project2. But is too slow for bigger areas. I know about global attribute problem, but I think this is a negligibe problem compared to speed.

Code for Symbol Fill is copied from Manual and return no errors. But it doesn't work. When I define Filla everythink is OK.

I use cutpoly command to cut everything outside of my polgon. Is there a way to use "some kind" of cutpoly in 2D?

Solution

That is funny. 🤣

I just finished creating a roof accessory for a fibre-cement ceiling panel, and ended up defining my own symbol fill as well (although I really didn't want to because of the forced attribute creation).

 

Here is my symbol fill definition ...

gamma=0
spacingx1 = (tile_length+space_x)*2
spacingx2 = 0
spacingy1 = 0
spacingy2 = (tile_depth+space_y)*2
ac_pitch = 0

file_dependence "brick pattern - stack bond"

DEFINE SYMBOL_FILL	"Stack bond"    8,  28,  42,  73, 255,  74,  44,  24,
	spacingx1,     spacingx2,     spacingy1, spacingy2,      gamma,
	tile_length/3.00, tile_depth*cos(ac_pitch)/1.2,
	"brick pattern - stack bond" PARAMETERS tile_length = tile_length, tile_depth = tile_depth, space_x = space_x, space_y = space_y

 

You need an object (macro) with a 'Fill Definition' sub-type which I have attached here - basically a pattern file.

Mine are quite large panels - 3000mm x 1200mm, so the default size in this file is for that size.

That is why in the  symbol fill definition, you will see the length /3.00 and depth/1.2 - just change this figures to suit the panel size you set in the pattern file.

 

My pattern file also has a space between the panels which you may want to use or just set the spacing to zero.

And as mine was a roof accessory, it used the roof pitch, which I have set to zero in the above code.

You could remove 'ac_pitch' part of code completely as you won't need it for a flat ceiling.

 

Now you can apply that fill to the polygon you place in your object.

And if you use a POLY2_B[2} command, you can even add parameters to adjust the start position (origin) of the fill.

 

BarryKelly_0-1744265463925.png

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Thanks Barry. The key is macro with Fill Definition subtype. In my case I must prepare two Library Parts: one for 3d model and other for 2d - and this one with coding. It is simple for me but not for other members in the office. But for now I accept this Solution

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!