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

@@ -90,6 +90,11 @@ is
returns Shape from TopoDS;
ErrorOnSurface (me)
---Level: Public
returns Real from Standard;
fields
myPipe : Pipe from BRepFill;

View File

@@ -22,6 +22,8 @@
#include <TopoDS_Vertex.hxx>
#include <TopoDS.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopExp.hxx>
//=======================================================================
//function : BRepOffsetAPI_MakePipe
@@ -76,7 +78,13 @@ const BRepFill_Pipe& BRepOffsetAPI_MakePipe::Pipe() const
void BRepOffsetAPI_MakePipe::Build()
{
myShape = myPipe.Shape();
Done();
//Check for emptiness of result
TopTools_IndexedMapOfShape theMap;
TopExp::MapShapes(myShape, theMap);
if (theMap.Extent() == 1)
NotDone();
else
Done();
}
@@ -122,3 +130,12 @@ TopoDS_Shape BRepOffsetAPI_MakePipe::Generated (const TopoDS_Shape& SSpine,
return bid;
}
//=======================================================================
//function : ErrorOnSurface
//purpose :
//=======================================================================
Standard_Real BRepOffsetAPI_MakePipe::ErrorOnSurface() const
{
return myPipe.ErrorOnSurface();
}

View File

@@ -349,6 +349,9 @@ is
returns ListOfShape from TopTools
is redefined;
ErrorOnSurface (me)
returns Real from Standard;
fields
myPipe : PipeShell from BRepFill;

View File

@@ -305,3 +305,12 @@ BRepOffsetAPI_MakePipeShell::Generated(const TopoDS_Shape& S)
return myGenerated;
}
//=======================================================================
//function : ErrorOnSurface
//purpose :
//=======================================================================
Standard_Real BRepOffsetAPI_MakePipeShell::ErrorOnSurface() const
{
return myPipe->ErrorOnSurface();
}