We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-08-08 11:14 AM - last edited on 2023-07-04 02:17 PM by Doreena Deng
Hello, is there a way to reduce the circle2's resolution in 2D using gdl?
Cheers,
Juan
Solved! Go to Solution.
2022-08-08 12:22 PM
I could have sworn that works.
Mentions arcs and circles in the GDL reference guide.
Seems to only work with polygons.
RESOL 6
poly2_ 2,3,
0,0,903,
1,360,4007
Barry.
2022-09-20 03:32 PM - last edited on 2022-09-24 07:38 PM by Laszlo Nagy
Hi,
a workaround can be if you use stack for the circle's segment points, something like this:
rad = 0.1
nSegments = 16
angleSegment= 360 / nSegments
for i = 1 to nSegments
put rad * cos(i * angleSegment), rad * sin(i * angleSegment), 1
next i
poly2_b nsp/3, 7, 1, 1,
get(nsp)
2022-08-08 12:00 PM
Have you tried the RESOL command?
Barry.
2022-08-08 12:02 PM - edited 2022-08-08 12:11 PM
Yes, but no change.. not sure if today is one of those days 😏
BTW, I'm on AC24
Juan
2022-08-08 12:22 PM
I could have sworn that works.
Mentions arcs and circles in the GDL reference guide.
Seems to only work with polygons.
RESOL 6
poly2_ 2,3,
0,0,903,
1,360,4007
Barry.
2022-08-08 12:25 PM
That's exactly my confussion here since the reference guide states arcs and circles can use that function.
Would it be possible to reach the team to either fix the reference guide and/or report a bug?
Juan
2022-08-08 03:35 PM
@jc4d wrote:
That's exactly my confussion here since the reference guide states arcs and circles can use that function.
Would it be possible to reach the team to either fix the reference guide and/or report a bug?
After reading the manual again, it says circles are converted to regular polygons.
It does not specifically mention CIRCLE2 & ARC2.
At the beginning of that section on Attributes, it says ...
ATTRIBUTES
In the first part of this chapter, directives influencing the interpretation of GDL statements are presented. Directives may define the smoothness
used for cylindrical elements, representation mode in the 3D view or the assignment of an attribute (color, material, text style, etc.) for the
subsequent shapes.
So I think this is only for 3D elements.
However I also think that because it says ...
And it clearly works for POLY2_ commands - which is a 2D command - not a 3D POLY_ command.
I think it is a fair assumption that as it mentions circles and arcs are converted to polylines that it would convert CIRCLE2 and ARC2 to POLY2.
Maybe @Peter Baksa could please clarify?
Barry.
2022-08-26 11:35 AM
Hi,
The main statement here is "for cylindrical elements and arcs in polylines".
Mentioning circles after that intended to refer to 360° arcs in polylines.
It seems the 3d circle counts as a cylindrical element.
2022-09-20 03:32 PM - last edited on 2022-09-24 07:38 PM by Laszlo Nagy
Hi,
a workaround can be if you use stack for the circle's segment points, something like this:
rad = 0.1
nSegments = 16
angleSegment= 360 / nSegments
for i = 1 to nSegments
put rad * cos(i * angleSegment), rad * sin(i * angleSegment), 1
next i
poly2_b nsp/3, 7, 1, 1,
get(nsp)
2022-09-21 07:01 AM
Interesting approach, thank you 👍