]> OCCT Git - occt-copy.git/commitdiff
0029813: BRepFill_PipeShell algorithm produces invalid result
authorjgv <jgv@opencascade.com>
Mon, 28 May 2018 16:13:01 +0000 (19:13 +0300)
committernbv <nbv@opencascade.com>
Tue, 29 May 2018 09:14:09 +0000 (12:14 +0300)
Modified method: BRepFill_Sweep::BuildShell
case of global closedness of path containing several C0-connected parts is corrected.

(cherry picked from commit 02e4bacfb08113dcac54707b40a6499725ea00ee)

src/BRepFill/BRepFill_Sweep.cxx

index 5e014f12cacfd0a5feb7f22dec5c0300000a1303..c7e9550149f6fe5e5066a2574cdf6f612cfb8b8b 100644 (file)
@@ -2092,11 +2092,12 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
   BRep_Builder B;
   Standard_Integer NbPath = ILast - IFirst;
   Standard_Integer NbLaw =  mySec->NbLaw();
-  Standard_Boolean uclose, vclose,  constSection, hasdegen = Standard_False;
+  Standard_Boolean uclose, vclose, global_vclose, constSection, hasdegen = Standard_False;
   constSection = mySec->IsConstant();
   uclose = mySec->IsUClosed();
   vclose = (mySec->IsVClosed() && myLoc->IsClosed()) && 
            (NbPath == myLoc->NbLaw()) && (myLoc->IsG1(0, myTol3d)>= 0);
+  global_vclose = (myLoc->IsClosed()) && (myLoc->IsG1(0, myTol3d)>= 0);
   Error = 0.;
 
   // (1) Construction of all surfaces
@@ -2675,7 +2676,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
                                           myTol3d);
        else
         {
-          if (ipath != NbPath || vclose)
+          if (ipath != NbPath ||
+              vclose ||
+              (global_vclose && ILast == myLoc->NbLaw()+1))
+            
             UpdateEdge(TopoDS::Edge(VEdge(isec, ipath+1)), 
                        S, exuv, VLast);
           else //ipath == NbPath && !vclose => rebuild last edge