cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

GDL Polyline masking problems (again).

Anonymous
Not applicable
I'm having a minor problem getting the smoothing to work reliably on both the circular holes in this prism. It doesn't seem to like having different masking codes to the outer prism boundary. Even if the prism boundary is changed to 79, the problem still happens if you have another rectangular hole with a 15 mask.

Any ideas where I'm going wrong?
PEN 1
MATERIAL 2
RESOL 16

hei = 0.1		! Height
wid = 0.15		! Width
thik = 0.02		! Thickness

!----outline of prism

PUT		0 , 	 0 , 	15,
		wid,	 0 , 	15,
		wid, 	hei, 	15,
		0,		hei, 	15,
		0 , 	 0 , 	-1
	
!!---A rectangular hole

xx=0.1
yy=hei/2


!PUT 	xx,			yy,			15,
!		xx+0.015,	yy,			15,
!		xx+0.015,	yy+0.012,	15,
!		xx,			yy+0.012,	15,
!		xx,			yy,			-1

!!----Two circular holes

!The first circular hole in the sequence doesn't mask properly.

PUT		0.035, 	yy,  	900+79,
		0.015, 	360, 	4000+79	

PUT		0.065, 	yy,  	900+79,
		0.01, 	360, 	4000+79


!!-----Do the prism

PRISM_ nsp/3, thik,	GET (nsp)

polyline_mask1.jpg
15 REPLIES 15
Anonymous
Not applicable
!!! ----- 1st hole -----
put 0.035+0.015, yy, 79, ! 1st point
0.035 , yy, 900,
0, 360-360/16, 4000+79, ! 16 is the resolution
0.035+0.015, yy, -1 ! closing

But 360-360/16 is equal to 337,5... So its not a full circle, right?

I just can't understand why 360(Full circle) doesn't work.
Anonymous
Not applicable
Braza wrote:
But 360-360/16 is equal to 337,5... So its not a full circle, right?

I just can't understand why 360(Full circle) doesn't work.
Right, it is an angle, not a full circle.
In functiun of the resolution, it indicates the last point
before the closing (1st point).

Alternative solution. Place an additional point, just before the end of contour,
with status code 15+64 (invisible edge). Next hole will be smooth.
This is for 3D script.
EPS = 0.0001

!!! ---- outline of prism 
PUT 0 , 0  , 15, 
	wid, 0  , 15, 
	wid, hei, 15, 
	0  , hei, 15,
	0  , EPS, 15+64,   ! additional point
	0  , 0  , -1  

!!! ----- 1st hole -----
PUT 0.035, yy, 900, 
	0.015, 360, 4000+15+64 

!!! ----- 2nd hole -----
PUT 0.065, yy, 900, 
	0.010, 360, 4000+15+64



The weird thing is that in 2D script, for status code 4000, changes apply immediately.
In 3D script, the apply at the next iteration.
Anonymous
Not applicable
Olivier wrote:
Peter, in your attachment (line 3), this is not the same code as in my example.
Well spotted! I missed that. That's a nice little trick with the resolution on the hole.

Thank you all for investigating the problem. I will stick with the extra point on the boundary and use EPS instead of having two points in exactly the same place.
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Olivier wrote:
GDL ref guide is inconsistant on this point.
The fifteen years old example which explains the purpose ...
just shows that it doesn't work in the way it is intended for.
Sorry to be the eternal ranter. 😉
Which example do you mean by that? I can see problems in this field but all 3 examples around page 180 in the Manual work and produce the same results as shown in the figures. I'd like to make the description more correct; I just don't know what to change exactly.

I'm really thankful for all reports which help us make the documentation or GDL better!

Regards,
Zsolt
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
Hi Zsolt,

The confusion concerns status code 4000 with full circle 360°, according to 2D and 3D script.

In 2D script, changes apply immediately, when you switch status s from 1 to 0.
put 0, 0,  1, 
	A, 0,  1, 
	A, B,  1, 
	0, B,  1, 
	0, 0, -1 

put A/2, B/2 , 900,   ! 1st hole
	r, 360, 4000+s
In 3D script for a full circle, you need to place an additional point
with the desired status code BEFORE the full circle,
to get a smooth hole (64). Not intuitive.
put 0, 0  , 15, 
	A, 0  , 15, 
	A, B  , 15, 
	0, B  , 15,
	0, EPS, 15+64,   ! additional point
	0, 0  , -1

put A/2, B/2, 900,   ! 1st hole
	r, 360, 4000+15+64
Or you have to script an arc or two half circles.
to control the smoothness of hole.
put 0, 0  , 15, 
	A, 0  , 15, 
	A, B  , 15, 
	0, B  , 15,
	0, 0  , -1

put A/2+r, B/2, 15+64,    ! 1st point of the hole
	A/2, B/2, 900,      
	0, 360-360/res, 4000+15+64,
	A/2+r, B/2, -1        ! closing
Please, correct me if I am wrong.
Not a major issue, of course. Just a bit tricky.
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Oh, I see! This never occurred to me before. At first glance I consider this an ArchiCAD bug - not a bug of the documentation.

I'm going to check the background of this behavior!

Thanks!
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...