1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0027822: Exception access violation is raised in BRepOffsetAPI_MakePipeShell during of build

New public method IsDone() is added to abstract class BRepFill_SectionLaw.

Test case bugs/modlag_6/bug27822 has been added
This commit is contained in:
jgv 2016-09-19 13:35:27 +03:00 committed by bugmaster
parent aea33d0ab8
commit 5da005403b
6 changed files with 48 additions and 0 deletions

View File

@ -360,6 +360,7 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S,
} }
myParams = par; myParams = par;
Init(par,Build); Init(par,Build);
myDone = Standard_True;
} }
//======================================================================= //=======================================================================
@ -399,7 +400,10 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S,
VFirst = VF; VFirst = VF;
VLast = VL; VLast = VL;
Init(P,Build); Init(P,Build);
myDone = Standard_True;
} }
else
myDone = Standard_False;
} }
//======================================================================= //=======================================================================

View File

@ -1143,6 +1143,8 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
} }
myStatus = myLocation->GetStatus(); myStatus = myLocation->GetStatus();
if (!mySection->IsDone())
myStatus = GeomFill_PipeNotOk;
} }
//======================================================================= //=======================================================================

View File

@ -78,6 +78,15 @@ Standard_Integer BRepFill_SectionLaw::NbLaw() const
return vclosed; return vclosed;
} }
//=======================================================================
//function : IsDone
//purpose :
//=======================================================================
Standard_Boolean BRepFill_SectionLaw::IsDone() const
{
return myDone;
}
//======================================================================= //=======================================================================
//function : Init //function : Init
//purpose : Prepare the parsing of a wire //purpose : Prepare the parsing of a wire

View File

@ -54,6 +54,8 @@ public:
Standard_EXPORT Standard_Boolean IsVClosed() const; Standard_EXPORT Standard_Boolean IsVClosed() const;
Standard_EXPORT Standard_Boolean IsDone() const;
//! Say if the input sahpe is a vertex. //! Say if the input sahpe is a vertex.
Standard_EXPORT virtual Standard_Boolean IsVertex() const = 0; Standard_EXPORT virtual Standard_Boolean IsVertex() const = 0;
@ -82,6 +84,7 @@ protected:
Handle(GeomFill_HArray1OfSectionLaw) myLaws; Handle(GeomFill_HArray1OfSectionLaw) myLaws;
Standard_Boolean uclosed; Standard_Boolean uclosed;
Standard_Boolean vclosed; Standard_Boolean vclosed;
Standard_Boolean myDone;
private: private:

View File

@ -72,6 +72,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V,
myLaws->ChangeValue(1) = myLaws->ChangeValue(1) =
new (GeomFill_UniformSection)(TC); new (GeomFill_UniformSection)(TC);
} }
myDone = Standard_True;
} }
//======================================================================= //=======================================================================
@ -88,6 +89,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
{ {
TheLaw.Nullify(); TheLaw.Nullify();
Init(Build); Init(Build);
myDone = Standard_True;
} }
//======================================================================= //=======================================================================
@ -104,6 +106,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
{ {
TheLaw = L; TheLaw = L;
Init(Build); Init(Build);
myDone = Standard_True;
} }
//======================================================================= //=======================================================================

View File

@ -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."
}