mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
OCC22139 Statuses of BRepMesh OCC22418 DRAW test command for showing a descretization points on edges
This commit is contained in:
@@ -44,14 +44,7 @@ is enumeration DegreeOfFreedom is
|
||||
Frontier,
|
||||
Deleted;
|
||||
|
||||
enumeration Status is
|
||||
---Purpose: Discribes the wires discretisation.
|
||||
NoError,
|
||||
OpenWire,
|
||||
SelfIntersectingWire,
|
||||
Failure,
|
||||
ReMesh
|
||||
end Status;
|
||||
imported Status from BRepMesh;
|
||||
|
||||
enumeration FactoryError is
|
||||
FE_NOERROR,
|
||||
|
@@ -74,7 +74,8 @@ is
|
||||
-- built.
|
||||
is static private;
|
||||
|
||||
EchoStatus(me)
|
||||
GetStatusFlags(me)
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
|
||||
@@ -87,6 +88,7 @@ fields
|
||||
myancestors : IndexedDataMapOfShapeListOfShape from TopTools is protected;
|
||||
mydtotale : Real from Standard is protected;
|
||||
myBox : Box from Bnd is protected;
|
||||
myStatus : Integer from Standard is protected;
|
||||
|
||||
end IncrementalMesh;
|
||||
|
||||
|
@@ -52,7 +52,8 @@
|
||||
//=======================================================================
|
||||
BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh()
|
||||
: myRelative(Standard_False),
|
||||
myModified(Standard_False)
|
||||
myModified(Standard_False),
|
||||
myStatus(0)
|
||||
{
|
||||
mymapedge.Clear();
|
||||
myancestors.Clear();
|
||||
@@ -69,7 +70,8 @@ BRepMesh_IncrementalMesh(const TopoDS_Shape& S,
|
||||
const Standard_Boolean Rel,
|
||||
const Standard_Real Ang) :
|
||||
myRelative(Rel),
|
||||
myModified(Standard_False)
|
||||
myModified(Standard_False),
|
||||
myStatus(0)
|
||||
{
|
||||
mymapedge.Clear();
|
||||
myancestors.Clear();
|
||||
@@ -155,37 +157,15 @@ void BRepMesh_IncrementalMesh::Perform()
|
||||
Standard_True);
|
||||
//
|
||||
Update(myShape);
|
||||
#ifdef DEB
|
||||
EchoStatus();
|
||||
#endif
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : EchoStatus
|
||||
//function : GetStatus
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepMesh_IncrementalMesh::EchoStatus() const
|
||||
Standard_Integer BRepMesh_IncrementalMesh::GetStatusFlags() 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;
|
||||
}
|
||||
return myStatus;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -454,6 +434,7 @@ void BRepMesh_IncrementalMesh::Update(const TopoDS_Face& F)
|
||||
B.UpdateFace(F, TNull);
|
||||
}
|
||||
myMesh->Add(F);
|
||||
myStatus |= (Standard_Integer)(myMesh->CurrentFaceStatus());
|
||||
if (myMesh->CurrentFaceStatus() == BRepMesh_ReMesh) {
|
||||
#ifdef DEB_MESH
|
||||
cout << " face remaillee + finement que prevu."<< endl;
|
||||
|
18
src/BRepMesh/BRepMesh_Status.hxx
Executable file
18
src/BRepMesh/BRepMesh_Status.hxx
Executable file
@@ -0,0 +1,18 @@
|
||||
// File: BRepMesh_Status.hxx
|
||||
// Created: May 17 11:59:53 2011
|
||||
// Author: Oleg AGASHIN
|
||||
// Copyright: Open CASCADE SAS 2011
|
||||
|
||||
#ifndef _BRepMesh_Status_HeaderFile
|
||||
#define _BRepMesh_Status_HeaderFile
|
||||
|
||||
//! Discribes the wires discretisation. <br>
|
||||
enum BRepMesh_Status {
|
||||
BRepMesh_NoError = 0x0,
|
||||
BRepMesh_OpenWire = 0x1,
|
||||
BRepMesh_SelfIntersectingWire = 0x2,
|
||||
BRepMesh_Failure = 0x4,
|
||||
BRepMesh_ReMesh = 0x8
|
||||
};
|
||||
|
||||
#endif
|
@@ -7,4 +7,5 @@ BRepMesh_MapOfInteger.hxx
|
||||
BRepMesh_ListOfInteger.hxx
|
||||
BRepMesh_BaseAllocator.hxx
|
||||
BRepMesh_PairOfIndex.hxx
|
||||
BRepMesh_Status.hxx
|
||||
EXTERNLIB
|
||||
|
Reference in New Issue
Block a user