]> OCCT Git - occt-copy.git/commitdiff
0030591: Exception is raised by command "bopcheck" on the attached shape CR30591
authorgka <gka@opencascade.com>
Mon, 18 Mar 2019 13:06:19 +0000 (16:06 +0300)
committergka <gka@opencascade.com>
Mon, 18 Mar 2019 13:06:19 +0000 (16:06 +0300)
Protection to avoid exception if number of vertices is equal to 1 was added.

src/IntPatch/IntPatch_PrmPrmIntersection.cxx

index 8d07c7b2df76033b1ce0af1203f794c52b66e153..1ad7d4b07aac4f4d85d9d25e7f5a3605cb096842 100644 (file)
@@ -2492,6 +2492,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
 
                             Standard_Boolean removeNext = Standard_False;
                             Standard_Boolean removePrev = Standard_False;
+                            //gka
+                            if(cnbV > 1)
+                            {
                             if( ciV == 1)
                             {
                               Standard_Integer dPar = Abs( VPold.Value(ciV) - VPold.Value(ciV+1));
@@ -2539,6 +2542,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
                                     VPold.SetValue(iPo, VPold.Value(iPo) - 1 );
                               } 
                             }
+                            }
 
                             Standard_Integer pI = ciVpar;