3D viewer: ensure 0 sized circles (that crash the viewer) are skipped.
This commit is contained in:
parent
6e9475694c
commit
830c5e7db7
|
@ -871,10 +871,11 @@ void CINFO3D_VISU::AddSolidAreasShapesToContainer( const ZONE_CONTAINER* aZoneCo
|
|||
|
||||
if( Is_segment_a_circle( start3DU, end3DU ) )
|
||||
{
|
||||
aDstContainer->Add( new CFILLEDCIRCLE2D( start3DU,
|
||||
(aZoneContainer->GetMinThickness() / 2) *
|
||||
m_biuTo3Dunits,
|
||||
*aZoneContainer ) );
|
||||
float radius = (aZoneContainer->GetMinThickness() / 2) * m_biuTo3Dunits;
|
||||
|
||||
if( radius > 0.0 ) // degenerated circles crash 3D viewer
|
||||
aDstContainer->Add( new CFILLEDCIRCLE2D( start3DU, radius ,
|
||||
*aZoneContainer ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -900,11 +901,12 @@ void CINFO3D_VISU::AddSolidAreasShapesToContainer( const ZONE_CONTAINER* aZoneCo
|
|||
|
||||
if( Is_segment_a_circle( start3DU, end3DU ) )
|
||||
{
|
||||
aDstContainer->Add(
|
||||
new CFILLEDCIRCLE2D( start3DU,
|
||||
(aZoneContainer->GetMinThickness() / 2) *
|
||||
m_biuTo3Dunits,
|
||||
*aZoneContainer ) );
|
||||
float radius = (aZoneContainer->GetMinThickness() / 2) * m_biuTo3Dunits;
|
||||
|
||||
if( radius > 0.0 ) // degenerated circles crash 3D viewer
|
||||
aDstContainer->Add(
|
||||
new CFILLEDCIRCLE2D( start3DU, radius,
|
||||
*aZoneContainer ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue