mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0030591: Exception is raised by command "bopcheck" on the attached shape
Protection to avoid exception if number of vertices is equal to 1 was added.
This commit is contained in:
@@ -2492,51 +2492,55 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
|
|||||||
|
|
||||||
Standard_Boolean removeNext = Standard_False;
|
Standard_Boolean removeNext = Standard_False;
|
||||||
Standard_Boolean removePrev = Standard_False;
|
Standard_Boolean removePrev = Standard_False;
|
||||||
if( ciV == 1)
|
|
||||||
{
|
|
||||||
Standard_Integer dPar = Abs( VPold.Value(ciV) - VPold.Value(ciV+1));
|
|
||||||
if(dPar > 10)
|
|
||||||
{
|
|
||||||
removeNext = Standard_True;
|
|
||||||
for( iPo = (ciV+1); iPo <= cnbV; iPo++ )
|
|
||||||
VPold.SetValue(iPo, VPold.Value(iPo) - 1 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( ciV == cnbV)
|
|
||||||
{
|
|
||||||
Standard_Integer dPar = Abs( VPold.Value(ciV) - VPold.Value(ciV-1));
|
|
||||||
if(dPar > 10)
|
|
||||||
{
|
|
||||||
removePrev = Standard_True;
|
|
||||||
VPold.SetValue(ciV, VPold.Value(ciV) - 1 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Standard_Integer dParMi = Abs( VPold.Value(ciV) - VPold.Value(ciV-1));
|
|
||||||
Standard_Integer dParMa = Abs( VPold.Value(ciV) - VPold.Value(ciV+1));
|
|
||||||
if(dParMi > 10)
|
|
||||||
{
|
|
||||||
removePrev = Standard_True;
|
|
||||||
VPold.SetValue(ciV, VPold.Value(ciV) - 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
if(dParMa > 10)
|
if(cnbV > 1)
|
||||||
|
{
|
||||||
|
if( ciV == 1)
|
||||||
{
|
{
|
||||||
removeNext = Standard_True;
|
Standard_Integer dPar = Abs( VPold.Value(ciV) - VPold.Value(ciV+1));
|
||||||
for( iPo = (ciV+1); iPo <= cnbV; iPo++ )
|
if(dPar > 10)
|
||||||
{
|
{
|
||||||
if(dParMi > 10)
|
removeNext = Standard_True;
|
||||||
VPold.SetValue(iPo, VPold.Value(iPo) - 2 );
|
for( iPo = (ciV+1); iPo <= cnbV; iPo++ )
|
||||||
else
|
|
||||||
VPold.SetValue(iPo, VPold.Value(iPo) - 1 );
|
VPold.SetValue(iPo, VPold.Value(iPo) - 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if( ciV == cnbV)
|
||||||
|
{
|
||||||
|
Standard_Integer dPar = Abs( VPold.Value(ciV) - VPold.Value(ciV-1));
|
||||||
|
if(dPar > 10)
|
||||||
|
{
|
||||||
|
removePrev = Standard_True;
|
||||||
|
VPold.SetValue(ciV, VPold.Value(ciV) - 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Standard_Integer dParMi = Abs( VPold.Value(ciV) - VPold.Value(ciV-1));
|
||||||
|
Standard_Integer dParMa = Abs( VPold.Value(ciV) - VPold.Value(ciV+1));
|
||||||
if(dParMi > 10)
|
if(dParMi > 10)
|
||||||
|
{
|
||||||
|
removePrev = Standard_True;
|
||||||
|
VPold.SetValue(ciV, VPold.Value(ciV) - 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if(dParMa > 10)
|
||||||
|
{
|
||||||
|
removeNext = Standard_True;
|
||||||
for( iPo = (ciV+1); iPo <= cnbV; iPo++ )
|
for( iPo = (ciV+1); iPo <= cnbV; iPo++ )
|
||||||
VPold.SetValue(iPo, VPold.Value(iPo) - 1 );
|
{
|
||||||
|
if(dParMi > 10)
|
||||||
|
VPold.SetValue(iPo, VPold.Value(iPo) - 2 );
|
||||||
|
else
|
||||||
|
VPold.SetValue(iPo, VPold.Value(iPo) - 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(dParMi > 10)
|
||||||
|
for( iPo = (ciV+1); iPo <= cnbV; iPo++ )
|
||||||
|
VPold.SetValue(iPo, VPold.Value(iPo) - 1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user