]> OCCT Git - occt-copy.git/commitdiff
0027822: Exception access violation is raised in BRepOffsetAPI_MakePipeShell during...
authorjgv <jgv@opencascade.com>
Mon, 19 Sep 2016 10:35:27 +0000 (13:35 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 22 Sep 2016 09:26:07 +0000 (12:26 +0300)
New public method IsDone() is added to abstract class BRepFill_SectionLaw.

Test case bugs/modlag_6/bug27822 has been added

src/BRepFill/BRepFill_NSections.cxx
src/BRepFill/BRepFill_PipeShell.cxx
src/BRepFill/BRepFill_SectionLaw.cxx
src/BRepFill/BRepFill_SectionLaw.hxx
src/BRepFill/BRepFill_ShapeLaw.cxx
tests/bugs/modalg_6/bug27822 [new file with mode: 0644]

index 2d637b603a0f7233649cd9e2023b7c9f034e3bcd..6696f8a8e107ab63c376b9d59d48bdf8f03cf59a 100644 (file)
@@ -360,6 +360,7 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S,
   }
   myParams = par;
   Init(par,Build);
+  myDone = Standard_True;
 }
 
 //=======================================================================
@@ -399,7 +400,10 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S,
     VFirst = VF;
     VLast = VL;
     Init(P,Build);
+    myDone = Standard_True;
   }
+  else
+    myDone = Standard_False;
 }
 
 //=======================================================================
index 553664d64d565dbc515cab914bd85598b00d2bbb..95ec9e59d8822ead74a9df1682c8b917864b6eed 100644 (file)
@@ -1143,6 +1143,8 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape&   theShape,
   }
 
   myStatus = myLocation->GetStatus();
+  if (!mySection->IsDone())
+    myStatus = GeomFill_PipeNotOk;
 }
 
 //=======================================================================
index 03ea21de07dcdb8966b62a69b680edd7ddbc54bd..516cf42ba95e6264a4f1ee86f80f5308108a1dad 100644 (file)
@@ -78,6 +78,15 @@ Standard_Integer BRepFill_SectionLaw::NbLaw() const
   return vclosed;
 }
 
+//=======================================================================
+//function : IsDone
+//purpose  : 
+//=======================================================================
+ Standard_Boolean BRepFill_SectionLaw::IsDone() const
+{
+  return myDone;
+}
+
 //=======================================================================
 //function : Init
 //purpose  : Prepare the parsing of a wire
index c16de9e0cf6d824dc4f507fd517f0c4313661887..ba26ed09e7faeec05fedc1a42d3e699101f3bcb6 100644 (file)
@@ -54,6 +54,8 @@ public:
   
   Standard_EXPORT Standard_Boolean IsVClosed() const;
   
+  Standard_EXPORT Standard_Boolean IsDone() const;
+  
   //! Say if the input sahpe is a  vertex.
   Standard_EXPORT virtual Standard_Boolean IsVertex() const = 0;
   
@@ -82,6 +84,7 @@ protected:
   Handle(GeomFill_HArray1OfSectionLaw) myLaws;
   Standard_Boolean uclosed;
   Standard_Boolean vclosed;
+  Standard_Boolean myDone;
 
 
 private:
index 5bdbf3766bf51204fe648176d160e1a2a58ebeba..b95baae1509b6fbc239001d9ccabef09c0cbe84f 100644 (file)
@@ -72,6 +72,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V,
     myLaws->ChangeValue(1) = 
       new (GeomFill_UniformSection)(TC);
   }
+  myDone = Standard_True;
 }
 
 //=======================================================================
@@ -88,6 +89,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
 {
   TheLaw.Nullify();
   Init(Build);
+  myDone = Standard_True;
 }
 
 //=======================================================================
@@ -104,6 +106,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
 {
   TheLaw = L;
   Init(Build);
+  myDone = Standard_True;
 }
 
 //=======================================================================
diff --git a/tests/bugs/modalg_6/bug27822 b/tests/bugs/modalg_6/bug27822
new file mode 100644 (file)
index 0000000..bf9ac5e
--- /dev/null
@@ -0,0 +1,27 @@
+puts "========"
+puts "OCC27822"
+puts "========"
+puts ""
+#######################################################################################
+# Exception access violation is raised in BRepOffsetAPI_MakePipeShell during of build
+#######################################################################################
+
+circle c1 0 100 80 30
+circle c2 0 30 130 30
+mkedge e1 c1
+mkedge e2 c2
+vertex v1 0 0 0
+vertex v2 0 1 0
+edge e3 v1 v2
+wire w1 e1
+wire w2 e2
+wire w3 e3
+mksweep w3
+addsweep w1
+addsweep w2
+
+if {[catch {buildsweep result}]} {
+  puts "OCC27822 is fixed."
+} else {
+  puts "ERROR: OCC27822 does not fixed correctly."
+}