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

GDL
About building parametric objects with GDL.

Boolean operations in 2D ?

MetalFingerz
Advocate

Hi,

 

I have an object that is using repeating patterns across a given vector. The geometry of the pattern is a bit complicated but of fixed length however the overall length of the vector can be whatever so I'm using groups in order to cut the last pattern clean. Everything works well in 3D but I do not know how to proceed in 2D.

 

I'm using macros to call the pattern so it's easy to have it displayed in 2D as well but subgroups don't seem to work there (unless there's something I'm doing wrong). I could be using PROJECT2 but I don't think it's that efficient overall so I'd like to avoid it for a proper 2D if possible.

 

I have looked in the Reference Guide but can't find anything related to this in 2D. Anybody has an idea ?

5 REPLIES 5
Barry Kelly
Moderator

If you want to script in 2D then you will have to script the repeating pattern.

Grouping doesn't work in 2D unfortunately.

 

If it is very complicated and you find it hard to script the pattern, then use PROJECT2.

There are advanced versions as well where you can determine a cutting plane height.

 

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
Peter Baksa
Graphisoft
Graphisoft

Hi,

 

there is also a way with PolyOperations.

clip a polygon with a polyline: ClipPolyline

cut a polygon with a line: PolyCut

 

But I agree that project2 will be easier to use. PROJECT2{3} can pass parameters, so you can have a totally different geometry than for the real 3D. However using it disables the background update of different views, in a large project that can be inconvenient.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Yeah I tried PROJECT2{4} here : https://community.graphisoft.com/t5/Developer-forum/Issue-or-limitation-of-PROJECT2-4/td-p/394224.

 

I managed to make it work with the issue above but when I only wanted a clean slice at cut height (without the projection below), I couldn't have it proper and that made the 2D too busy for a plan view.

I didn't know about this, I'll have a look, thanks. A pity there is no example library to go with the article, that would have make the learning/testing a bit easier !

 

Regarding the background update issue, will it be the same for PROJECT2{4} as well ?

Peter Baksa
Graphisoft
Graphisoft

Yes, the background update issue is the same with PROJECT2{4}.

The library developer toolkit's example library includes a Polygon Operations Example.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest