]> OCCT Git - occt.git/commitdiff
0030256: ACIS Import - crash while importing SAT file on constructing a pipe
authorika <irina.kochetkova@opencascade.com>
Thu, 6 Oct 2022 09:39:03 +0000 (12:39 +0300)
committerVadim Glukhikh <vadim.glukhikh@opencascade.com>
Mon, 21 Nov 2022 17:11:13 +0000 (20:11 +0300)
Fix for thin section with both first and last parameters located in one segment.

src/GeomFill/GeomFill_SectionPlacement.cxx

index a2616b4b1d12ae54b79f1888c152d8e6ce586999..8d39b1c3cd011fa5d985948318f89882a17d1682 100644 (file)
@@ -276,6 +276,8 @@ GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L,
              
              Standard_Integer NbLocalPnts = 10;
              Standard_Integer NbPnts = (NbKnots-1) * NbLocalPnts;
+             if (NbPnts < 0)
+               NbPnts = 0;
              if (I1 != I2)
                NbPnts += NbLocalPnts;
              if (I3 != I4 && first < BC->Knot(I3))