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

Can someone clearly explain this code?

Anonymous
Not applicable
Straight from the GDL Reference Guide in the ArchiCAD help files:

CUTPOLYA 6, 1, 0,
1, 0.15, 5,
0.15, 0.15, 900,
0, 90, 4007,
0, 0.85, 5,
0.85, 0.85, 900,
0, 90, 4007

Can anyone clearly explain what is happening here? How many ACTUAL points are being defined, why is it 4007 instead of 4008 and is there a difference? Is the 0,90,4007 defining the curve from one point to another? I just don't get it.

I've been studying this all morning and can't get it to do what I want it to. Someone please step me through this so that I can understand what the heck is going on. Thank you.
4 REPLIES 4

 CUTPOLYA 6, 1, 0,
                  1, 0.15, 5,          ! #1 a point
                  0.15, 0.15, 900,  ! #2 a centerpoint, for the arc that's next
                  0, 90, 4007,       ! #3 a 90º arc around the CP above
                  0, 0.85, 5,          ! #4 a point
                  0.85, 0.85, 900,  ! #5 another center
                  0, 90, 4007         ! #6 another 90º arc
why is it 4007 instead of 4008 and is there a difference?
Status for CUTPOLYA has a max of 7 instead of 15. 8, which represents the side of a polygon if you're talking about a PRISM_, doesn't apply. The status is 1+2+4, draw all three lines. EDIT: Forgot about 64. Point is, 8 isn't used, although it doesn't cause an error.
Is the 0,90,4007 defining the curve from one point to another?
4000+s is arc around center point. The first term is 0 unless you're doing a circle, then it's the radius. Second term is the included angle, for a circle it's 360.

It needs a 900 on the line before, which has the x,y of the CP. You need not give the endpoint, it knows, and will draw from the end of the arc to the next point. If you use 4000 without 900, you get 'Inconsistent status values in the polyline'.

At the end, it happens to close, but I like to make sure it closes by adding the first line at the end,
1, 0.15, -1      ! back to start    
...which would change the 6 to a 7 of course.

HTH,

PS, I drew the shape by dropping the code in and changing it to a PRISM_, then used PROJECT2. Since CUTting things are invisible, it's often helpful to build PRISM_s first and then switch them when they're figured out.
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info
Anonymous
Not applicable
ok - I appreciate that information. Everything I learn helps. Thanks.

One more question then - is there no way to define a '3 point' arc? Beginning, center (on arc), and end point? Instead, I have to define that center point somewhere out in space?

I want to be able to define an arc with a radius and start and stop points. Anyway I can do that?
Frank Beister
Moderator
No. There's no statement for this.

But try Arc of 3 points. German, but the GDL should be readable.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
sirduncan wrote:
Instead, I have to define that center point somewhere out in space?
Sometimes it's easier to define a tangent rather than a centerpoint. Check the manual for the 1000 and 2000 statuses.
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info