cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Design forum

Circle2 resolution via gdl

jc4d
Advocate

Hello, is there a way to reduce the circle2's resolution in 2D using gdl?

 

Cheers,
Juan

2 ACCEPTED SOLUTIONS

Solution

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.


One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

View solution in original post

Solution
lszatmary
Contributor

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)
László Szatmáry
Content Developer at Walter AEC
Budapest, Hungary

View solution in original post

8 REPLIES 8

Barry Kelly
Moderator

Have you tried the RESOL command?

 

Barry.


One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Yes, but no change.. not sure if today is one of those days 😏

jc4d_0-1659952949347.png

BTW, I'm on AC24

 

Juan

Solution

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.


One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

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


@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 ...

BarryKelly_2-1659965250487.png

 

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.


One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

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.

 

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

Solution
lszatmary
Contributor

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)
László Szatmáry
Content Developer at Walter AEC
Budapest, Hungary

Interesting approach, thank you 👍

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!