"Warning: Removal of internal boundaries among Faces has failed\n"
"\n"
".BOPAlgo_AlertRemovalOfIBForEdgesFailed\n"
- "Warning: Removal of internal boundaries among Edges has failed\n";
+ "Warning: Removal of internal boundaries among Edges has failed\n"
+ "\n"
+ ".BOPAlgo_AlertSolidBuilderUnusedFaces\n"
+ "Warning: Some of the faces passed to the Solid Builder algorithm have not been classified and not used for solids creation\n";
#include <BRepMesh_Vertex.hxx>
#include <BRepMesh_Triangle.hxx>
+#include <Message_ProgressSentry.hxx>
#include <NCollection_Vector.hxx>
#include <algorithm>
//=======================================================================
void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIndex,
BRepMesh::MapOfIntegerInteger& thePoly)
+{
+ createTriangles (theVertexIndex, thePoly, NULL);
+}
+
+//=======================================================================
+//function : createTriangles
+//purpose : Creates the triangles beetween the node and the polyline.
+//=======================================================================
+void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIndex,
+ BRepMesh::MapOfIntegerInteger& thePoly,
+ Message_ProgressSentry* theProgressEntry)
{
BRepMesh::ListOfInteger aLoopEdges, anExternalEdges;
const gp_XY& aVertexCoord = myMeshData->GetNode( theVertexIndex ).Coord();
BRepMesh::MapOfIntegerInteger::Iterator anEdges( thePoly );
for ( ; anEdges.More(); anEdges.Next() )
{
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
Standard_Integer anEdgeId = anEdges.Key();
const BRepMesh_Edge& anEdge = GetEdge( anEdgeId );
while ( !aLoopEdges.IsEmpty() )
{
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
const BRepMesh_Edge& anEdge = GetEdge( Abs( aLoopEdges.First() ) );
if ( anEdge.Movability() != BRepMesh_Deleted )
{
//=======================================================================
void BRepMesh_Delaun::createTrianglesOnNewVertices(
BRepMesh::Array1OfInteger& theVertexIndexes)
+{
+ createTrianglesOnNewVertices (theVertexIndexes, NULL);
+}
+
+//=======================================================================
+//function : createTrianglesOnNewVertices
+//purpose : Creation of triangles from the new nodes
+//=======================================================================
+void BRepMesh_Delaun::createTrianglesOnNewVertices(
+ BRepMesh::Array1OfInteger& theVertexIndexes,
+ Message_ProgressSentry* theProgressEntry)
{
Handle(NCollection_IncAllocator) aAllocator =
new NCollection_IncAllocator(BRepMesh::MEMORY_BLOCK_SIZE_HUGE);
Standard_Integer anUpper = theVertexIndexes.Upper();
for( ; anIndex <= anUpper; ++anIndex )
{
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
+
aAllocator->Reset(Standard_False);
BRepMesh::MapOfIntegerInteger aLoopEdges(10, aAllocator);
isModify = Standard_True;
while ( isModify && !aCirclesList.IsEmpty() )
{
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
+
isModify = Standard_False;
BRepMesh::ListOfInteger::Iterator aCircleIt1( aCirclesList );
for ( ; aCircleIt1.More(); aCircleIt1.Next() )
}
}
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
// Creation of triangles with the current node and free edges
// and removal of these edges from the list of free edges
- createTriangles( aVertexIdx, aLoopEdges );
+ createTriangles( aVertexIdx, aLoopEdges, theProgressEntry );
}
}
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
- insertInternalEdges();
+ insertInternalEdges (theProgressEntry);
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
// Adjustment of meshes to boundary edges
frontierAdjust();
//purpose :
//=======================================================================
void BRepMesh_Delaun::insertInternalEdges()
+{
+ insertInternalEdges (NULL);
+}
+
+//=======================================================================
+//function : insertInternalEdges
+//purpose :
+//=======================================================================
+void BRepMesh_Delaun::insertInternalEdges (Message_ProgressSentry* theProgressEntry)
{
BRepMesh::HMapOfInteger anInternalEdges = InternalEdges();
BRepMesh::MapOfInteger::Iterator anInernalEdgesIt( *anInternalEdges );
for ( ; anInernalEdgesIt.More(); anInernalEdgesIt.Next() )
{
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
+
const Standard_Integer aLinkIndex = anInernalEdgesIt.Key();
const BRepMesh_PairOfIndex& aPair = myMeshData->ElementsConnectedTo(aLinkIndex);
}
}
-
//=======================================================================
//function : AddVertices
//purpose : Adds some vertices in the triangulation.
//=======================================================================
void BRepMesh_Delaun::AddVertices(BRepMesh::Array1OfVertexOfDelaun& theVertices)
+{
+ AddVertices (theVertices, NULL);
+}
+
+//=======================================================================
+//function : AddVertices
+//purpose : Adds some vertices in the triangulation.
+//=======================================================================
+void BRepMesh_Delaun::AddVertices(BRepMesh::Array1OfVertexOfDelaun& theVertices,
+ Message_ProgressSentry* theProgressEntry)
{
std::make_heap(theVertices.begin(), theVertices.end(), ComparatorOfVertexOfDelaun());
std::sort_heap(theVertices.begin(), theVertices.end(), ComparatorOfVertexOfDelaun());
for ( Standard_Integer i = aLower; i <= anUpper; ++i )
aVertexIndexes(i) = myMeshData->AddNode( theVertices(i) );
- createTrianglesOnNewVertices( aVertexIndexes );
+ createTrianglesOnNewVertices( aVertexIndexes, theProgressEntry );
}
//=======================================================================
class Bnd_B2d;
class Bnd_Box2d;
class BRepMesh_Vertex;
+class Message_ProgressSentry;
//! Compute the Delaunay's triangulation with the algorithm of Watson.
class BRepMesh_Delaun
//! Adds some vertices into the triangulation.
Standard_EXPORT void AddVertices (BRepMesh::Array1OfVertexOfDelaun& theVertices);
+ //! Adds some vertices into the triangulation.
+ Standard_EXPORT void AddVertices (BRepMesh::Array1OfVertexOfDelaun& theVertices,
+ Message_ProgressSentry* theProgressEntry);
+
//! Modify mesh to use the edge.
//! @return True if done
Standard_EXPORT Standard_Boolean UseEdge (const Standard_Integer theEdge);
void createTriangles (const Standard_Integer theVertexIndex,
BRepMesh::MapOfIntegerInteger& thePoly);
+ void createTriangles (const Standard_Integer theVertexIndex,
+ BRepMesh::MapOfIntegerInteger& thePoly,
+ Message_ProgressSentry* theProgressEntry);
+
//! Add a triangle based on the given oriented edges into mesh
void addTriangle (const Standard_Integer (&theEdgesId)[3],
const Standard_Boolean (&theEdgesOri)[3],
BRepMesh::SequenceOfInteger& thePolygon,
BRepMesh::SequenceOfBndB2d& thePolyBoxes);
+ //! Creates the triangles on new nodes.
+ void createTrianglesOnNewVertices (BRepMesh::Array1OfInteger& theVertexIndices,
+ Message_ProgressSentry* theProgressEntry);
+
//! Creates the triangles on new nodes.
void createTrianglesOnNewVertices (BRepMesh::Array1OfInteger& theVertexIndices);
//! Performs insertion of internal edges into mesh.
void insertInternalEdges();
+ //! Performs insertion of internal edges into mesh.
+ void insertInternalEdges (Message_ProgressSentry* theProgressEntry);
+
private:
Handle(BRepMesh_DataStructureOfDelaun) myMeshData;
#include <Standard_Failure.hxx>
#include <NCollection_IncAllocator.hxx>
+#include <Message_ProgressSentry.hxx>
#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
#include <BRep_PointRepresentation.hxx>
OSD_Parallel::ForEach(aFaces.begin(), aFaces.end(), *this, !myParameters.InParallel);
}
-
//=======================================================================
//function : Process
//purpose :
//=======================================================================
void BRepMesh_FastDiscret::Process(const TopoDS_Face& theFace) const
+{
+ Process (theFace, NULL);
+}
+
+//=======================================================================
+//function : Process
+//purpose :
+//=======================================================================
+void BRepMesh_FastDiscret::Process (const TopoDS_Face& theFace,
+ Message_ProgressSentry* theProgrEntry) const
{
Handle(BRepMesh_FaceAttribute) anAttribute;
- if (GetFaceAttribute(theFace, anAttribute))
+ if (GetFaceAttribute(theFace, anAttribute)
+ && (theProgrEntry == NULL || theProgrEntry->More()))
{
try
{
BRepMesh_FastDiscretFace aTool(myParameters.Angle, myParameters.MinSize,
myParameters.InternalVerticesMode, myParameters.ControlSurfaceDeflection);
- aTool.Perform(anAttribute);
+ aTool.Perform (anAttribute, theProgrEntry);
}
catch (Standard_Failure)
{
class BRepMesh_Vertex;
class gp_Pnt;
class BRepMesh_FaceAttribute;
+class Message_ProgressSentry;
//! Algorithm to mesh a shape with respect of the <br>
//! frontier the deflection and by option the shared <br>
//! parallel threads.
Standard_EXPORT void Process(const TopoDS_Face& face) const;
+ //! Triangulate a face previously recorded for
+ //! processing by call to Add(). Can be executed in
+ //! parallel threads.
+ Standard_EXPORT void Process (const TopoDS_Face& theFace,
+ Message_ProgressSentry* theProgrEntry) const;
+
void operator () (const TopoDS_Face& face) const
{
Process(face);
#include <TopoDS_Vertex.hxx>
#include <TopExp.hxx>
+#include <Message_ProgressSentry.hxx>
#include <NCollection_Map.hxx>
#include <Bnd_Box2d.hxx>
//=======================================================================
void BRepMesh_FastDiscretFace::Perform(const Handle(BRepMesh_FaceAttribute)& theAttribute)
{
- add(theAttribute);
+ Perform (theAttribute, NULL);
+}
+
+//=======================================================================
+//function : Perform
+//purpose :
+//=======================================================================
+void BRepMesh_FastDiscretFace::Perform (const Handle(BRepMesh_FaceAttribute)& theAttribute,
+ Message_ProgressSentry* theProgressEntry)
+{
+ add(theAttribute, theProgressEntry);
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
commitSurfaceTriangulation();
}
//function : Add
//purpose :
//=======================================================================
-void BRepMesh_FastDiscretFace::add(const Handle(BRepMesh_FaceAttribute)& theAttribute)
+void BRepMesh_FastDiscretFace::add (const Handle(BRepMesh_FaceAttribute)& theAttribute,
+ Message_ProgressSentry* theProgressEntry)
{
if (!theAttribute->IsValid() || theAttribute->ChangeMeshNodes()->IsEmpty())
return;
(vmax - vmin) < Precision::PConfusion());
Standard_Real aDef = -1;
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
+
if ( !isaline && myStructure->ElementsOfDomain().Extent() > 0 )
{
if (!rajout)
{
// compute maximal deflection
- aDef = control(trigu, Standard_True);
+ aDef = control(trigu, Standard_True, theProgressEntry);
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
+
rajout = (aDef > myAttribute->GetDefFace() || aDef < 0.);
}
if (thetype != GeomAbs_Plane)
if (rajout)
{
- insertInternalVertices(trigu);
+ insertInternalVertices(trigu, theProgressEntry);
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
//control internal points
if (myIsControlSurfaceDeflection)
- aDef = control(trigu, Standard_False);
+ {
+ aDef = control(trigu, Standard_False, theProgressEntry);
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return;
+ }
+ }
}
}
}
//=======================================================================
Standard_Boolean BRepMesh_FastDiscretFace::addVerticesToMesh(
const BRepMesh::ListOfVertex& theVertices,
- BRepMesh_Delaun& theMeshBuilder)
+ BRepMesh_Delaun& theMeshBuilder,
+ Message_ProgressSentry* theProgressEntry)
{
if (theVertices.IsEmpty())
return Standard_False;
for (Standard_Integer aVertexId = 0; aVertexIt.More(); aVertexIt.Next())
aArrayOfNewVertices(++aVertexId) = aVertexIt.Value();
- theMeshBuilder.AddVertices(aArrayOfNewVertices);
- return Standard_True;
+ theMeshBuilder.AddVertices(aArrayOfNewVertices, theProgressEntry);
+ return theProgressEntry == NULL || theProgressEntry->More();
}
//=======================================================================
//function : insertInternalVertices
//purpose :
//=======================================================================
-void BRepMesh_FastDiscretFace::insertInternalVertices(BRepMesh_Delaun& theMeshBuilder)
+void BRepMesh_FastDiscretFace::insertInternalVertices (BRepMesh_Delaun& theMeshBuilder,
+ Message_ProgressSentry* theProgressEntry)
{
Handle(NCollection_IncAllocator) anAlloc = new NCollection_IncAllocator;
BRepMesh::ListOfVertex aNewVertices(anAlloc);
break;
}
- addVerticesToMesh(aNewVertices, theMeshBuilder);
+ addVerticesToMesh(aNewVertices, theMeshBuilder, theProgressEntry);
}
//=======================================================================
//=======================================================================
Standard_Real BRepMesh_FastDiscretFace::control(
BRepMesh_Delaun& theTrigu,
- const Standard_Boolean theIsFirst)
+ const Standard_Boolean theIsFirst,
+ Message_ProgressSentry* theProgressEntry)
{
Standard_Integer aTrianglesNb = myStructure->ElementsOfDomain().Extent();
if (aTrianglesNb < 1)
new NCollection_IncAllocator(BRepMesh::MEMORY_BLOCK_SIZE_HUGE);
for (; aPass <= aPassesNb && aInsertedNb && !isAllDegenerated; ++aPass)
{
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return 0;
+ }
+
aTempAlloc->Reset(Standard_False);
BRepMesh::ListOfVertex aNewVertices(aTempAlloc);
BRepMesh::MapOfInteger::Iterator aTriangleIt(aTriangles);
for (; aTriangleIt.More(); aTriangleIt.Next())
{
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return 0;
+ }
+
const Standard_Integer aTriangleId = aTriangleIt.Key();
const BRepMesh_Triangle& aCurrentTriangle = myStructure->GetElement(aTriangleId);
<< aP.X() << " " << aP.Y() << " " << aP.Z() << endl;
}
#endif
+ if (theProgressEntry != NULL && !theProgressEntry->More())
+ {
+ return 0;
+ }
- if (addVerticesToMesh(aNewVertices, theTrigu))
+ if (addVerticesToMesh(aNewVertices, theTrigu, theProgressEntry))
++aInsertedNb;
}
class BRepMesh_Edge;
class BRepMesh_Vertex;
class gp_Pnt;
+class Message_ProgressSentry;
//! Algorithm to mesh a face with respect of the frontier
//! the deflection and by option the shared components.
Standard_EXPORT void Perform(const Handle(BRepMesh_FaceAttribute)& theAttribute);
+ Standard_EXPORT void Perform (const Handle(BRepMesh_FaceAttribute)& theAttribute,
+ Message_ProgressSentry* theProgressEntry);
+
DEFINE_STANDARD_RTTIEXT(BRepMesh_FastDiscretFace,Standard_Transient)
private:
- void add(const Handle(BRepMesh_FaceAttribute)& theAttribute);
+ void add(const Handle(BRepMesh_FaceAttribute)& theAttribute, Message_ProgressSentry* theProgressEntry);
void add(const TopoDS_Vertex& theVertex);
Standard_Real control(BRepMesh_Delaun& theMeshBuilder,
- const Standard_Boolean theIsFirst);
+ const Standard_Boolean theIsFirst,
+ Message_ProgressSentry* theProgressEntry);
//! Registers the given nodes in mesh data structure and
//! performs refinement of existing mesh.
//! @return TRUE if vertices were been inserted, FALSE elewhere.
Standard_Boolean addVerticesToMesh(
const BRepMesh::ListOfVertex& theVertices,
- BRepMesh_Delaun& theMeshBuilder);
+ BRepMesh_Delaun& theMeshBuilder,
+ Message_ProgressSentry* theProgressEntry);
//! Calculates nodes lying on face's surface and inserts them to a mesh.
//! @param theMeshBuilder initialized tool refining mesh
//! in respect to inserting nodes.
- void insertInternalVertices(BRepMesh_Delaun& theMeshBuilder);
+ void insertInternalVertices(BRepMesh_Delaun& theMeshBuilder,
+ Message_ProgressSentry* theProgressEntry);
//! Calculates nodes lying on spherical surface.
//! @param theNewVertices list of vertices to be extended and added to mesh.
#include <GCPnts_TangentialDeflection.hxx>
+#include <Message_ProgressSentry.hxx>
+
IMPLEMENT_STANDARD_RTTIEXT(BRepMesh_IncrementalMesh,BRepMesh_DiscretRoot)
namespace
static Standard_Boolean IS_IN_PARALLEL = Standard_False;
}
+class BRepMesh_IncrementalMesh::FaceListFunctor
+{
+public:
+ FaceListFunctor (BRepMesh_IncrementalMesh* theAlgo,
+ const Handle(Message_ProgressIndicator)& theProgress,
+ Standard_Boolean theParallel)
+ : myAlgo (theAlgo),
+ mySentry (theProgress, "Mesh faces", 0, theAlgo->myFaces.Size(), 1),
+ myThreadId (OSD_Thread::Current()),
+ myIsParallel (theParallel),
+ myHasProgress (!theProgress.IsNull())
+ {
+ }
+
+ void operator() (const Standard_Integer theFaceIndex) const
+ {
+ if (!mySentry.More())
+ {
+ return;
+ }
+
+ TopoDS_Face& aFace = myAlgo->myFaces.ChangeValue (theFaceIndex);
+ myAlgo->myMesh->Process (aFace, &mySentry);
+
+ if (myIsParallel)
+ {
+ // use a trick to avoid mutex locks - increment the progress only within main thread
+ if (myHasProgress && myThreadId == OSD_Thread::Current())
+ {
+ mySentry.Next (OSD_Parallel::NbLogicalProcessors());
+ }
+ }
+ else
+ {
+ mySentry.Next();
+ }
+ }
+
+private:
+ mutable BRepMesh_IncrementalMesh* myAlgo;
+ mutable Message_ProgressSentry mySentry;
+ Standard_ThreadId myThreadId;
+ Standard_Boolean myIsParallel;
+ Standard_Boolean myHasProgress;
+};
//=======================================================================
//function : Default constructor
//purpose :
//=======================================================================
void BRepMesh_IncrementalMesh::Perform()
+{
+ Perform (Handle(Message_ProgressIndicator)());
+}
+
+//=======================================================================
+//function : Perform
+//purpose :
+//=======================================================================
+void BRepMesh_IncrementalMesh::Perform (const Handle(Message_ProgressIndicator)& theProgress)
{
init();
if (myMesh.IsNull())
return;
- update();
+ update (theProgress);
}
//=======================================================================
//function : update()
//purpose :
//=======================================================================
-void BRepMesh_IncrementalMesh::update()
+void BRepMesh_IncrementalMesh::update (const Handle(Message_ProgressIndicator)& theProgress)
{
+ Message_ProgressSentry anOuterSentry (theProgress, "Updating", 0, 100, 1);
+
// Update edges data
- TopExp_Explorer aExplorer(myShape, TopAbs_EDGE);
- for (; aExplorer.More(); aExplorer.Next())
+ anOuterSentry.Next(9);
{
- const TopoDS_Edge& aEdge = TopoDS::Edge(aExplorer.Current());
- if(!BRep_Tool::IsGeometric(aEdge))
- continue;
+ int aNbEdges = 0;
+ for (TopExp_Explorer aExplorer (myShape, TopAbs_EDGE); aExplorer.More(); aExplorer.Next())
+ {
+ ++aNbEdges;
+ }
+
+ Message_ProgressSentry anEdgeSentry (theProgress, "Update edges data", 0, aNbEdges, 1);
+ for (TopExp_Explorer aExplorer (myShape, TopAbs_EDGE);
+ aExplorer.More() && anEdgeSentry.More(); aExplorer.Next(), anEdgeSentry.Next())
+ {
+ const TopoDS_Edge& aEdge = TopoDS::Edge(aExplorer.Current());
+ if(!BRep_Tool::IsGeometric(aEdge))
+ continue;
- update(aEdge);
+ update(aEdge);
+ }
}
+ if (!anOuterSentry.More())
+ {
+ myStatus = BRepMesh_UserBreak;
+ return;
+ }
+ anOuterSentry.Next(5);
+
// Update faces data
NCollection_Vector<TopoDS_Face>::Iterator aFaceIt(myFaces);
- for (; aFaceIt.More(); aFaceIt.Next())
+ for (Message_ProgressSentry aFacesSentry (theProgress, "Update faces data", 0, myFaces.Size(), 1);
+ aFaceIt.More() && aFacesSentry.More(); aFaceIt.Next(), aFacesSentry.Next())
+ {
update(aFaceIt.Value());
+ }
+
+ if (!anOuterSentry.More())
+ {
+ myStatus = BRepMesh_UserBreak;
+ return;
+ }
+
+ anOuterSentry.Next(80);
+
+ {
+ // Mesh faces
+ FaceListFunctor aFacesFunctor (this, theProgress, myParameters.InParallel);
+ OSD_Parallel::For (0, myFaces.Size(), aFacesFunctor, !myParameters.InParallel);
+ }
- // Mesh faces
- OSD_Parallel::ForEach(myFaces.begin(), myFaces.end(), *myMesh, !myParameters.InParallel);
+ if (!anOuterSentry.More())
+ {
+ myStatus = BRepMesh_UserBreak;
+ return;
+ }
- commit();
+ anOuterSentry.Next(5);
+ {
+ Message_ProgressSentry aSentry (theProgress, "Commit", 0, myFaces.Size(), 1);
+ commit (aSentry);
+ }
+ anOuterSentry.Next();
clear();
}
//function : commit
//purpose :
//=======================================================================
-void BRepMesh_IncrementalMesh::commit()
+void BRepMesh_IncrementalMesh::commit (Message_ProgressSentry& theSentry)
{
NCollection_Vector<TopoDS_Face>::Iterator aFaceIt(myFaces);
- for (; aFaceIt.More(); aFaceIt.Next())
+ for (; aFaceIt.More() && theSentry.More(); aFaceIt.Next(), theSentry.Next())
commitEdges(aFaceIt.Value());
discretizeFreeEdges();
#include <vector>
+class Message_ProgressIndicator;
class Poly_Triangulation;
class TopoDS_Shape;
class TopoDS_Edge;
//! Performs meshing ot the shape.
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
-
+
+ //! Performs meshing ot the shape.
+ Standard_EXPORT void Perform(const Handle(Message_ProgressIndicator)& theProgress);
+
public: //! @name accessing to parameters.
//! Returns meshing parameters
private:
//! Builds the incremental mesh for the shape.
- void update();
+ void update(const Handle(Message_ProgressIndicator)& theProgress);
//! Checks triangulation of the given face for consistency
//! with the chosen tolerance. If some edge of face has no
const Standard_Boolean isWithCheck);
//! Stores mesh to the shape.
- void commit();
+ void commit(Message_ProgressSentry& theSentry);
//! Stores mesh of internal edges to the face.
void commitEdges(const TopoDS_Face& theFace);
//! Clears internal data structures.
void clear();
+private:
+ class FaceListFunctor;
+
protected:
BRepMesh::DMapOfEdgeListOfTriangulationBool myEdges;
BRepMesh_OpenWire = 0x1,
BRepMesh_SelfIntersectingWire = 0x2,
BRepMesh_Failure = 0x4,
- BRepMesh_ReMesh = 0x8
+ BRepMesh_ReMesh = 0x8,
+ BRepMesh_UserBreak = 0x16
};
#endif
#include <TopoDS_Wire.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <Draw_ProgressIndicator.hxx>
#include <stdio.h>
//epa Memory leaks test
aMeshParams.ControlSurfaceDeflection = isControlSurDef;
aMeshParams.AdaptiveMin = isAdaptiveMin;
- BRepMesh_IncrementalMesh aMesher (aShape, aMeshParams);
+ Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1);
+ BRepMesh_IncrementalMesh aMesher;
+ aMesher.SetShape (aShape);
+ aMesher.ChangeParameters() = aMeshParams;
+ aMesher.Perform (aProgress);
di << "Meshing statuses: ";
Standard_Integer statusFlags = aMesher.GetStatusFlags();
else
{
Standard_Integer i;
- for( i = 0; i < 4; i++ )
+ for( i = 0; i < 5; i++ )
{
if( (statusFlags >> i) & (Standard_Integer)1 )
{
case 4:
di << "ReMesh ";
break;
+ case 5:
+ di << "UserBreak";
+ break;
}
}
}