1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0024949: Segmentation Violation during pipe creation

Test cases for issue 0024949

Correction of test case for issue CR24949
This commit is contained in:
jgv
2014-08-21 12:28:08 +04:00
committed by bugmaster
parent 95a2cf2f74
commit 73920cd481
10 changed files with 107 additions and 3 deletions

View File

@@ -72,6 +72,9 @@ is
---C++ : return const &
is static;
ErrorOnSurface (me)
returns Real from Standard;
FirstShape(me) returns Shape from TopoDS
---C++ : return const &
is static;
@@ -185,4 +188,6 @@ fields
myMode : Trihedron from GeomFill;
myForceApproxC1 : Boolean from Standard;
myErrorOnSurf : Real from Standard;
end Pipe;

View File

@@ -363,6 +363,16 @@ const TopoDS_Shape& BRepFill_Pipe::Shape() const
return myShape;
}
//=======================================================================
//function : ErrorOnSurface
//purpose :
//=======================================================================
Standard_Real BRepFill_Pipe::ErrorOnSurface() const
{
return myErrorOnSurf;
}
//=======================================================================
//function : FirstShape
@@ -521,6 +531,7 @@ TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point)
MkSw.Build( myReversedEdges, myTapes, myRails,
BRepFill_Modified, myContinuity, GeomFill_Location, myDegmax, mySegmax );
TopoDS_Shape aLocalShape = MkSw.Shape();
myErrorOnSurf = MkSw.ErrorOnSurface();
return TopoDS::Wire(aLocalShape);
// return TopoDS::Wire(MkSw.Shape());
}
@@ -648,6 +659,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
MkSw.Build( myReversedEdges, myTapes, myRails,
BRepFill_Modified, myContinuity, GeomFill_Location, myDegmax, mySegmax );
result = MkSw.Shape();
myErrorOnSurf = MkSw.ErrorOnSurface();
Handle(TopTools_HArray2OfShape) aSections = MkSw.Sections();
@@ -669,6 +681,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
MkSw.Build( myReversedEdges, myTapes, myRails,
BRepFill_Modified, myContinuity, GeomFill_Location, myDegmax, mySegmax );
result = MkSw.Shape();
myErrorOnSurf = MkSw.ErrorOnSurface();
//Correct <myFirst> and <myLast>
ReverseModifiedEdges(myFirst, myReversedEdges);
ReverseModifiedEdges(myLast, myReversedEdges);

View File

@@ -256,6 +256,9 @@ is
returns Shape from TopoDS
is static;
ErrorOnSurface (me)
returns Real from Standard;
FirstShape (me)
---Purpose: Returns the TopoDS Shape of the bottom of the sweep.
---C++: return const &
@@ -316,6 +319,8 @@ fields
myTrihedron : Trihedron from GeomFill;
myTransition : TransitionStyle from BRepFill;
myStatus : PipeError from GeomFill;
myErrorOnSurf : Real from Standard;
end PipeShell;

View File

@@ -773,6 +773,7 @@ void BRepFill_PipeShell::SetForceApproxC1(const Standard_Boolean ForceApproxC1)
if (Ok) {
myShape = MkSw.Shape();
myErrorOnSurf = MkSw.ErrorOnSurface();
TopoDS_Shape aBottomWire = myFirst;
TopoDS_Shape aTopWire = myLast;
@@ -879,6 +880,16 @@ const TopoDS_Shape& BRepFill_PipeShell::Shape() const
return myShape;
}
//=======================================================================
//function : ErrorOnSurface
//purpose :
//=======================================================================
Standard_Real BRepFill_PipeShell::ErrorOnSurface() const
{
return myErrorOnSurf;
}
//=======================================================================
//function : FirstShape
//purpose : Return the start section

View File

@@ -2456,8 +2456,13 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Vertex(1,ipath+1),
myTol3d);
}
else UpdateEdge(TopoDS::Edge(UEdge(isec, ipath)),
S, !exuv, UFirst);
else
{
if (UEdge(isec, ipath).IsNull()) //sweep failed
return Standard_False;
UpdateEdge(TopoDS::Edge(UEdge(isec, ipath)),
S, !exuv, UFirst);
}
if (uclose && (isec==NbLaw)) {
UpdateEdge(TopoDS::Edge(UEdge(1, ipath)),