LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Draw Circle by Radius bug with 1 degree arc

Hello,

 

I've run into a bug in the Draw Circle by Radius / 2D Picture Control (reproducible in LV2018 32-bit and LV2019 32-bit).

 

If the radius is set small (<30), the line width set to a larger value (5), and the circle arc set to 1 degree, a full 360 degree circle is drawn in the picture control.

0 degree arc0 degree arc  1 degree arc1 degree arc  2 degree arc2 degree arc  360 degree arc360 degree arc

1 degree arc bug.png

 

If the radius size is increased above 30, a 1 degree arc renders as expected. The bug will appear for different combinations of radius and line width, but in general a larger line width and smaller radius will cause the bug. I searched around and couldn't find any reports of this issue. Is it a known bug?

 

The workaround for now is an XY graph to plot a circle, or two concentric circles with one plot filled to the other to achieve thicker line widths.

Download All
0 Kudos
Message 1 of 4
(2,957 Views)

Not sure if it's a known bug or not. It's been there for years.

 

Note that the angle depends on the size...

 

I have code that detects this and draws a arc with clipped radius:

Picture Control Arc.png

 

You could or course draw something else (a line or pixel) if the angle isn't in range.

Message 2 of 4
(2,914 Views)

The 'by radius' version:

Picture Control Arc by radius.png

Message 3 of 4
(2,911 Views)

Thanks for the code snippets. I figured it was probably a long standing bug. Interestingly it's only a problem for positive arc values. Negative values render as expected, regardless of radius or line width.

0 Kudos
Message 4 of 4
(2,895 Views)