1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

OCC22139 Statuses of BRepMesh

This commit is contained in:
OAN 2011-04-28 15:14:45 +00:00 committed by bugmaster
parent 3086e0850d
commit 8e3006e453
2 changed files with 48 additions and 17 deletions

View File

@ -21,7 +21,8 @@ uses
MapOfShape from TopTools, MapOfShape from TopTools,
IndexedDataMapOfShapeListOfShape from TopTools, IndexedDataMapOfShapeListOfShape from TopTools,
DataMapOfShapeReal from TopTools, DataMapOfShapeReal from TopTools,
FastDiscret from BRepMesh FastDiscret from BRepMesh,
Status from BRepMesh
is is
Create Create
@ -72,6 +73,9 @@ is
-- correctly, the triangulation of this face is -- correctly, the triangulation of this face is
-- built. -- built.
is static private; is static private;
EchoStatus(me)
is static;
fields fields

View File

@ -140,26 +140,53 @@ void BRepMesh_IncrementalMesh::Perform()
Init(); Init();
// //
BRepBndLib::Add(myShape, aBox); BRepBndLib::Add(myShape, aBox);
if (aBox.IsVoid() == Standard_False) myBox = aBox;
{
myBox = aBox;
// //
if (!myMesh.IsNull()) { if (!myMesh.IsNull()) {
myMesh.Nullify(); myMesh.Nullify();
}
//
myMesh = new BRepMesh_FastDiscret(myDeflection,
myAngle,
aBox,
Standard_True,
Standard_True,
myRelative,
Standard_True);
//
Update(myShape);
} }
//
myMesh = new BRepMesh_FastDiscret(myDeflection,
myAngle,
aBox,
Standard_True,
Standard_True,
myRelative,
Standard_True);
//
Update(myShape);
#ifdef DEB
EchoStatus();
#endif
} }
//=======================================================================
//function : EchoStatus
//purpose :
//=======================================================================
void BRepMesh_IncrementalMesh::EchoStatus() const
{
cout << "BRepMesh_FastDiscret::Meshing status: ";
switch(myMesh->CurrentFaceStatus())
{
case BRepMesh_NoError:
cout << "NoError" << endl;
break;
case BRepMesh_OpenWire:
cout << "OpenWire" << endl;
break;
case BRepMesh_SelfIntersectingWire:
cout << "SelfIntersectingWire" << endl;
break;
case BRepMesh_Failure:
cout << "Failure" << endl;
break;
case BRepMesh_ReMesh:
cout << "ReMesh" << endl;
break;
default: cout << "UnsupportedStatus" << endl;
}
}
//======================================================================= //=======================================================================
//function : Update(shape) //function : Update(shape)