3d-viewer: Check for at least 3 segments in circle
Fixes: lp:1792173 * https://bugs.launchpad.net/kicad/+bug/1792173
This commit is contained in:
parent
a46133d64b
commit
c1c89d13ff
|
@ -256,7 +256,8 @@ unsigned int CINFO3D_VISU::GetNrSegmentsCircle( int aDiameterBIU ) const
|
|||
{
|
||||
wxASSERT( aDiameterBIU > 0 );
|
||||
|
||||
return GetArcToSegmentCount( aDiameterBIU / 2, ARC_HIGH_DEF, 360.0 );
|
||||
// Require at least 3 segments for a circle
|
||||
return std::max( GetArcToSegmentCount( aDiameterBIU / 2, ARC_HIGH_DEF, 360.0 ), 3 );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue