p BRepIntCurveSurface
p BRepLib
p BRepMAT2d
-p BRepMesh
+n BRepMesh
p BRepOffset
p BRepOffsetAPI
p BRepPrim
+++ /dev/null
--- Created on: 1993-09-22
--- Created by: Didier PIFFAULT
--- Copyright (c) 1993-1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-package BRepMesh
-
- ---Purpose: Instantiated package for the class of packages
-
- ---Level : Advanced.
- -- All methods of all classes will be advanced.
-
-
-uses Standard,
- gp,
- Bnd,
- TColStd,
- TColgp,
- GCPnts,
- BRepAdaptor,
- BRepTopAdaptor,
- TCollection,
- MMgt,
- TopoDS,
- TopAbs,
- TopExp,
- TopTools,
- Poly,
- Geom2d,
- GeomAbs,
- GeomAdaptor,
- TopLoc,
- SortTools,
- Plugin
-
-is
- imported DegreeOfFreedom from BRepMesh;
- imported Status from BRepMesh;
- imported FactoryError from BRepMesh;
- imported Vertex from BRepMesh;
- imported Edge from BRepMesh;
- imported Triangle from BRepMesh;
- imported Circle from BRepMesh;
- imported DiscretRoot from BRepMesh;
- imported DiscretFactory from BRepMesh;
-
- imported ShapeTool from BRepMesh;
- imported Collections from BRepMesh;
- imported Delaun from BRepMesh;
- imported PairOfIndex from BRepMesh;
- imported CircleInspector from BRepMesh;
- imported VertexInspector from BRepMesh;
- imported WireInterferenceChecker from BRepMesh;
- imported EdgeChecker from BRepMesh;
- imported FaceChecker from BRepMesh;
- imported EdgeParameterProvider from BRepMesh;
- imported IEdgeTool from BRepMesh;
- imported EdgeTessellationExtractor from BRepMesh;
- imported EdgeTessellator from BRepMesh;
-
- primitive PluginEntryType;
-
- imported SelectorOfDataStructureOfDelaun from BRepMesh;
- imported DataStructureOfDelaun from BRepMesh;
- imported CircleTool from BRepMesh;
- imported VertexTool from BRepMesh;
- imported BiPoint from BRepMesh;
- imported FastDiscretFace from BRepMesh;
- imported FastDiscret from BRepMesh;
- imported FaceAttribute from BRepMesh;
- imported Classifier from BRepMesh;
- imported WireChecker from BRepMesh;
- imported IncrementalMesh from BRepMesh;
- imported GeomTool from BRepMesh;
- imported PairOfPolygon from BRepMesh;
-
-end BRepMesh;
--- /dev/null
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _BRepMesh_HeaderFile
+#define _BRepMesh_HeaderFile
+
+#include <gp_Pnt.hxx>
+#include <gp_XYZ.hxx>
+#include <gp_XY.hxx>
+#include <Bnd_B2d.hxx>
+#include <Bnd_Box2d.hxx>
+#include <Standard.hxx>
+#include <NCollection_List.hxx>
+#include <NCollection_Map.hxx>
+#include <NCollection_Vector.hxx>
+#include <NCollection_Handle.hxx>
+#include <NCollection_DataMap.hxx>
+#include <NCollection_IndexedMap.hxx>
+#include <NCollection_IndexedDataMap.hxx>
+#include <NCollection_Array1.hxx>
+#include <NCollection_Sequence.hxx>
+#include <NCollection_CellFilter.hxx>
+#include <NCollection_IncAllocator.hxx>
+#include <NCollection_EBTree.hxx>
+#include <NCollection_UBTreeFiller.hxx>
+#include <BRepMesh_Edge.hxx>
+#include <BRepMesh_Triangle.hxx>
+#include <BRepMesh_PairOfPolygon.hxx>
+#include <BRepMesh_PairOfIndex.hxx>
+#include <BRepMesh_Circle.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#include <Handle_Poly_Triangulation.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Shape.hxx>
+
+#include <vector>
+
+class BRepMesh_Vertex;
+class TopoDS_Edge;
+class TopoDS_Vertex;
+class Handle_BRepMesh_FaceAttribute;
+class BRepMesh_VertexInspector;
+class BRepMesh_CircleInspector;
+class BRepMesh_Classifier;
+class Poly_Triangulation;
+
+namespace BRepMesh
+{
+ //! Structure keeping parameters of segment.
+ struct Segment
+ {
+ gp_XY StartPnt;
+ gp_XY EndPnt;
+ };
+
+ //! Sequences
+ typedef NCollection_Sequence<Bnd_B2d> SequenceOfBndB2d;
+ typedef NCollection_Sequence<Standard_Integer> SequenceOfInteger;
+ typedef NCollection_Sequence<Standard_Real> SequenceOfReal;
+
+ //! Vectors
+ typedef NCollection_Vector<BRepMesh_Vertex> VectorOfVertex;
+ typedef NCollection_Vector<Standard_Integer> VectorOfInteger;
+ typedef NCollection_Vector<BRepMesh_Circle> VectorOfCircle;
+
+ //! Trees
+ typedef NCollection_EBTree<Standard_Integer, Bnd_Box2d> BndBox2dTree;
+ typedef NCollection_UBTreeFiller<Standard_Integer, Bnd_Box2d> BndBox2dTreeFiller;
+
+ //! Arrays
+ typedef NCollection_Array1<BRepMesh_Vertex> Array1OfVertexOfDelaun;
+ typedef NCollection_Array1<Standard_Integer> Array1OfInteger;
+ typedef NCollection_Array1<Standard_Real> Array1OfReal;
+ typedef NCollection_Array1<Segment> Array1OfSegments;
+
+ //! Lists
+ typedef NCollection_List<gp_XY> ListOfXY;
+ typedef NCollection_List<BRepMesh_Vertex> ListOfVertex;
+ typedef NCollection_List<Standard_Integer> ListOfInteger;
+
+ //! Maps
+ typedef NCollection_Map<Standard_Integer> MapOfInteger;
+ typedef NCollection_Map<Handle(Poly_Triangulation)> MapOfTriangulation;
+ typedef NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher> MapOfShape;
+
+ typedef NCollection_DataMap<Standard_Integer, Standard_Integer> MapOfIntegerInteger;
+ typedef NCollection_DataMap<TopoDS_Vertex, Standard_Integer, TopTools_ShapeMapHasher> DMapOfVertexInteger;
+ typedef NCollection_DataMap<TopoDS_Face, Handle_BRepMesh_FaceAttribute, TopTools_ShapeMapHasher> DMapOfFaceAttribute;
+ typedef NCollection_DataMap<TopoDS_Shape, BRepMesh_PairOfPolygon, TopTools_ShapeMapHasher> DMapOfShapePairOfPolygon;
+ typedef NCollection_DataMap<Standard_Integer, gp_Pnt> DMapOfIntegerPnt;
+ typedef NCollection_DataMap<Standard_Integer, ListOfXY> DMapOfIntegerListOfXY;
+ typedef NCollection_DataMap<Standard_Integer, ListOfInteger> DMapOfIntegerListOfInteger;
+ typedef NCollection_DataMap<TopoDS_Edge, MapOfTriangulation, TopTools_ShapeMapHasher> DMapOfEdgeListOfTriangulation;
+
+ typedef NCollection_IndexedMap<Standard_Integer> IMapOfInteger;
+ typedef NCollection_IndexedMap<Standard_Real> IMapOfReal;
+ typedef NCollection_IndexedMap<BRepMesh_Triangle> IMapOfElement;
+ typedef NCollection_IndexedDataMap<BRepMesh_Edge, BRepMesh_PairOfIndex> IDMapOfLink;
+
+ //! CellFilters
+ typedef NCollection_CellFilter<BRepMesh_CircleInspector> CircleCellFilter;
+ typedef NCollection_CellFilter<BRepMesh_VertexInspector> VertexCellFilter;
+
+ //! Handles
+ typedef NCollection_Handle<MapOfInteger> HMapOfInteger;
+ typedef NCollection_Handle<IMapOfInteger> HIMapOfInteger;
+ typedef NCollection_Handle<DMapOfShapePairOfPolygon> HDMapOfShapePairOfPolygon;
+ typedef NCollection_Handle<DMapOfIntegerPnt> HDMapOfIntegerPnt;
+ typedef NCollection_Handle<BRepMesh_Classifier> HClassifier;
+ typedef NCollection_Handle<BndBox2dTree> HBndBox2dTree;
+ typedef NCollection_Handle<Array1OfSegments> HArray1OfSegments;
+ typedef NCollection_Handle<DMapOfVertexInteger> HDMapOfVertexInteger;
+
+ //! Other data structures
+ typedef std::pair<HArray1OfSegments, HBndBox2dTree> SegmentsTree;
+ typedef NCollection_Array1<SegmentsTree> Array1OfSegmentsTree;
+};
+
+#endif
}
//! Constructor.
- //! \param theLocation location of a circle.
- //! \param theRadius radius of a circle.
+ //! @param theLocation location of a circle.
+ //! @param theRadius radius of a circle.
Standard_EXPORT BRepMesh_Circle(const gp_XY& theLocation,
const Standard_Real theRadius)
: myLocation(theLocation),
}
//! Sets location of a circle.
- //! \param theLocation location of a circle.
+ //! @param theLocation location of a circle.
inline void SetLocation(const gp_XY& theLocation)
{
myLocation = theLocation;
}
//! Sets radius of a circle.
- //! \param theRadius radius of a circle.
+ //! @param theRadius radius of a circle.
inline void SetRadius(const Standard_Real theRadius)
{
myRadius = theRadius;
#ifndef BRepMesh_CircleInspector_Header
#define BRepMesh_CircleInspector_Header
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <BRepMesh_Circle.hxx>
#include <Precision.hxx>
#include <gp_XY.hxx>
typedef Standard_Integer Target;
//! Constructor.
- //! \param theTolerance tolerance to be used for identification of shot circles.
- //! \param theReservedSize size to be reserved for vector of circles.
- //! \param theAllocator memory allocator to be used by internal collections.
+ //! @param theTolerance tolerance to be used for identification of shot circles.
+ //! @param theReservedSize size to be reserved for vector of circles.
+ //! @param theAllocator memory allocator to be used by internal collections.
Standard_EXPORT BRepMesh_CircleInspector(
- const Standard_Real theTolerance,
- const Standard_Integer theReservedSize,
- const BRepMeshCol::Allocator& theAllocator)
+ const Standard_Real theTolerance,
+ const Standard_Integer theReservedSize,
+ const Handle(NCollection_IncAllocator)& theAllocator)
: myTolerance(theTolerance*theTolerance),
myResIndices(theAllocator),
myCircles(theReservedSize)
}
//! Adds the circle to vector of circles at the given position.
- //! \param theIndex position of circle in the vector.
- //! \param theCircle circle to be added.
+ //! @param theIndex position of circle in the vector.
+ //! @param theCircle circle to be added.
inline void Bind(const Standard_Integer theIndex,
const BRepMesh_Circle& theCircle)
{
}
//! Resutns vector of registered circles.
- inline BRepMeshCol::VectorOfCircle& Circles()
+ inline const BRepMesh::VectorOfCircle& Circles() const
{
return myCircles;
}
//! Returns circle with the given index.
- //! \param theIndex index of circle.
- //! \return circle with the given index.
+ //! @param theIndex index of circle.
+ //! @return circle with the given index.
inline BRepMesh_Circle& Circle(const Standard_Integer theIndex)
{
return myCircles(theIndex);
}
//! Set reference point to be checked.
- //! \param thePoint bullet point.
+ //! @param thePoint bullet point.
inline void SetPoint(const gp_XY& thePoint)
{
myResIndices.Clear();
}
//! Returns list of circles shot by the reference point.
- inline BRepMeshCol::ListOfInteger& GetShotCircles()
+ inline BRepMesh::ListOfInteger& GetShotCircles()
{
return myResIndices;
}
//! Performs inspection of a circle with the given index.
- //! \param theTargetIndex index of a circle to be checked.
- //! \return status of the check.
+ //! @param theTargetIndex index of a circle to be checked.
+ //! @return status of the check.
Standard_EXPORT NCollection_CellFilter_Action Inspect(
const Standard_Integer theTargetIndex);
}
private:
- Standard_Real myTolerance;
- BRepMeshCol::ListOfInteger myResIndices;
- BRepMeshCol::VectorOfCircle myCircles;
- gp_XY myPoint;
+ Standard_Real myTolerance;
+ BRepMesh::ListOfInteger myResIndices;
+ BRepMesh::VectorOfCircle myCircles;
+ gp_XY myPoint;
};
#endif
//purpose :
//=======================================================================
BRepMesh_CircleTool::BRepMesh_CircleTool(
- const BRepMeshCol::Allocator& theAllocator)
+ const Handle(NCollection_IncAllocator)& theAllocator)
: myTolerance (Precision::PConfusion() * Precision::PConfusion()),
myAllocator (theAllocator),
myCellFilter(10, theAllocator),
//purpose :
//=======================================================================
BRepMesh_CircleTool::BRepMesh_CircleTool(
- const Standard_Integer theReservedSize,
- const BRepMeshCol::Allocator& theAllocator)
+ const Standard_Integer theReservedSize,
+ const Handle(NCollection_IncAllocator)& theAllocator)
: myTolerance (Precision::PConfusion() * Precision::PConfusion()),
myAllocator (theAllocator),
myCellFilter(10, theAllocator),
//function : Select
//purpose :
//=======================================================================
-BRepMeshCol::ListOfInteger& BRepMesh_CircleTool::Select(const gp_XY& thePoint)
+BRepMesh::ListOfInteger& BRepMesh_CircleTool::Select(const gp_XY& thePoint)
{
mySelector.SetPoint(thePoint);
myCellFilter.Inspect(thePoint, mySelector);
#include <gp_XYZ.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
class gp_Circ2d;
DEFINE_STANDARD_ALLOC
//! Constructor.
- //! \param theAllocator memory allocator to be used by internal structures.
- Standard_EXPORT BRepMesh_CircleTool(const BRepMeshCol::Allocator& theAllocator);
+ //! @param theAllocator memory allocator to be used by internal structures.
+ Standard_EXPORT BRepMesh_CircleTool(
+ const Handle(NCollection_IncAllocator)& theAllocator);
//! Constructor.
- //! \param theReservedSize size to be reserved for vector of circles.
- //! \param theAllocator memory allocator to be used by internal structures.
- Standard_EXPORT BRepMesh_CircleTool(const Standard_Integer theReservedSize,
- const BRepMeshCol::Allocator& theAllocator);
+ //! @param theReservedSize size to be reserved for vector of circles.
+ //! @param theAllocator memory allocator to be used by internal structures.
+ Standard_EXPORT BRepMesh_CircleTool(
+ const Standard_Integer theReservedSize,
+ const Handle(NCollection_IncAllocator)& theAllocator);
//! Initializes the tool.
- //! \param theReservedSize size to be reserved for vector of circles.
+ //! @param theReservedSize size to be reserved for vector of circles.
inline void Init(const Standard_Integer /*theReservedSize*/)
{
myTolerance = Precision::PConfusion() * Precision::PConfusion();
}
//! Sets new size for cell filter.
- //! \param theSize cell size to be set for X and Y dimensions.
+ //! @param theSize cell size to be set for X and Y dimensions.
inline void SetCellSize(const Standard_Real theSize)
{
myCellFilter.Reset(theSize, myAllocator);
}
//! Sets new size for cell filter.
- //! \param theSizeX cell size to be set for X dimension.
- //! \param theSizeY cell size to be set for Y dimension.
+ //! @param theSizeX cell size to be set for X dimension.
+ //! @param theSizeY cell size to be set for Y dimension.
inline void SetCellSize(const Standard_Real theSizeX,
const Standard_Real theSizeY)
{
}
//! Sets limits of inspection area.
- //! \param theMin bottom left corner of inspection area.
- //! \param theMax top right corner of inspection area.
+ //! @param theMin bottom left corner of inspection area.
+ //! @param theMax top right corner of inspection area.
inline void SetMinMaxSize(const gp_XY& theMin,
const gp_XY& theMax)
{
}
//! Binds the circle to the tool.
- //! \param theIndex index a circle should be bound with.
- //! \param theCircle circle to be bound.
+ //! @param theIndex index a circle should be bound with.
+ //! @param theCircle circle to be bound.
Standard_EXPORT void Bind(const Standard_Integer theIndex,
const gp_Circ2d& theCircle);
//! Computes circle on three points and bind it to the tool.
- //! \param theIndex index a circle should be bound with.
- //! \param thePoint1 first point.
- //! \param thePoint2 second point.
- //! \param thePoint3 third point.
- //! \return FALSE in case of impossibility to build a circle
+ //! @param theIndex index a circle should be bound with.
+ //! @param thePoint1 first point.
+ //! @param thePoint2 second point.
+ //! @param thePoint3 third point.
+ //! @return FALSE in case of impossibility to build a circle
//! on the given points, TRUE elsewhere.
Standard_EXPORT Standard_Boolean Bind(const Standard_Integer theIndex,
const gp_XY& thePoint1,
const gp_XY& thePoint3);
//! Binds implicit zero circle.
- //! \param theIndex index a zero circle should be bound with.
+ //! @param theIndex index a zero circle should be bound with.
Standard_EXPORT void MocBind(const Standard_Integer theIndex);
//! Deletes a circle from the tool.
- //! \param theIndex index of a circle to be removed.
+ //! @param theIndex index of a circle to be removed.
Standard_EXPORT void Delete(const Standard_Integer theIndex);
//! Select the circles shot by the given point.
- //! \param thePoint bullet point.
- Standard_EXPORT BRepMeshCol::ListOfInteger& Select(const gp_XY& thePoint);
+ //! @param thePoint bullet point.
+ Standard_EXPORT BRepMesh::ListOfInteger& Select(const gp_XY& thePoint);
private:
//! Creates circle with the given parameters and binds it to the tool.
- //! \param theIndex index a circle should be bound with.
- //! \param theLocation location of a circle.
- //! \param theRadius radius of a circle.
+ //! @param theIndex index a circle should be bound with.
+ //! @param theLocation location of a circle.
+ //! @param theRadius radius of a circle.
void bind(const Standard_Integer theIndex,
const gp_XY& theLocation,
const Standard_Real theRadius);
private:
- Standard_Real myTolerance;
- BRepMeshCol::Allocator myAllocator;
- BRepMeshCol::CircleCellFilter myCellFilter;
- BRepMesh_CircleInspector mySelector;
- gp_XY myFaceMax;
- gp_XY myFaceMin;
+ Standard_Real myTolerance;
+ Handle(NCollection_IncAllocator) myAllocator;
+ BRepMesh::CircleCellFilter myCellFilter;
+ BRepMesh_CircleInspector mySelector;
+ gp_XY myFaceMax;
+ gp_XY myFaceMin;
};
#endif
#include <TColStd_SequenceOfBoolean.hxx>
#include <TopAbs_State.hxx>
#include <NCollection_Sequence.hxx>
-
-class gp_Pnt2d;
-class TColgp_SequenceOfPnt2d;
+#include <gp_Pnt2d.hxx>
//! Auxilary class contains information about correctness of discretized
//! face and used for classification of points regarding face internals.
Standard_EXPORT BRepMesh_Classifier();
//! Destructor.
- ~BRepMesh_Classifier()
+ Standard_EXPORT virtual ~BRepMesh_Classifier()
{
Destroy();
}
Standard_EXPORT void Destroy();
//! Performs classification of the given point regarding to face internals.
- //! \param thePoint Point in parametric space to be classified.
- //! \return
+ //! @param thePoint Point in parametric space to be classified.
+ //! @return
Standard_EXPORT TopAbs_State Perform(const gp_Pnt2d& thePoint) const;
//! Registers wire specified by sequence of points for
//! further classification of points.
- //! \param theWire Wire to be registered. Specified by sequence of points.
- //! \param theTolUV Tolerance to be used for calculations in parametric space.
- //! \param theUmin Lower U boundary of the face in parametric space.
- //! \param theUmax Upper U boundary of the face in parametric space.
- //! \param theVmin Lower V boundary of the face in parametric space.
- //! \param theVmax Upper V boundary of the face in parametric space.
- void RegisterWire(
+ //! @param theWire Wire to be registered. Specified by sequence of points.
+ //! @param theTolUV Tolerance to be used for calculations in parametric space.
+ //! @param theUmin Lower U boundary of the face in parametric space.
+ //! @param theUmax Upper U boundary of the face in parametric space.
+ //! @param theVmin Lower V boundary of the face in parametric space.
+ //! @param theVmax Upper V boundary of the face in parametric space.
+ Standard_EXPORT void RegisterWire(
const NCollection_Sequence<gp_Pnt2d>& theWire,
const Standard_Real theTolUV,
const Standard_Real theUmin,
+++ /dev/null
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BRepMesh_Collections_HeaderFile
-#define _BRepMesh_Collections_HeaderFile
-
-#include <gp_Pnt.hxx>
-#include <gp_XYZ.hxx>
-#include <gp_XY.hxx>
-#include <Bnd_B2d.hxx>
-#include <Bnd_Box2d.hxx>
-#include <Standard.hxx>
-#include <NCollection_List.hxx>
-#include <NCollection_Map.hxx>
-#include <NCollection_Vector.hxx>
-#include <NCollection_Handle.hxx>
-#include <NCollection_DataMap.hxx>
-#include <NCollection_IndexedMap.hxx>
-#include <NCollection_IndexedDataMap.hxx>
-#include <NCollection_Array1.hxx>
-#include <NCollection_Sequence.hxx>
-#include <NCollection_CellFilter.hxx>
-#include <NCollection_IncAllocator.hxx>
-#include <NCollection_EBTree.hxx>
-#include <NCollection_UBTreeFiller.hxx>
-#include <BRepMesh_Edge.hxx>
-#include <BRepMesh_Triangle.hxx>
-#include <BRepMesh_PairOfPolygon.hxx>
-#include <BRepMesh_PairOfIndex.hxx>
-#include <BRepMesh_Circle.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <Handle_Poly_Triangulation.hxx>
-#include <TopoDS_Face.hxx>
-
-#include <vector>
-
-class BRepMesh_Vertex;
-class TopoDS_Shape;
-class TopoDS_Face;
-class TopoDS_Edge;
-class TopoDS_Vertex;
-class Handle_BRepMesh_FaceAttribute;
-class BRepMesh_VertexInspector;
-class BRepMesh_CircleInspector;
-class BRepMesh_Classifier;
-class Poly_Triangulation;
-
-//! Short names for collections
-#define N_SEQUENCE NCollection_Sequence
-#define N_VECTOR NCollection_Vector
-#define N_ARRAY1 NCollection_Array1
-#define N_LIST NCollection_List
-#define N_MAP NCollection_Map
-#define N_HANDLE NCollection_Handle
-#define N_DATAMAP NCollection_DataMap
-#define N_IMAP NCollection_IndexedMap
-#define N_IDMAP NCollection_IndexedDataMap
-#define N_CELLFILTER NCollection_CellFilter
-
-namespace BRepMeshCol
-{
- //! Structure keeping parameters of segment.
- struct Segment
- {
- gp_XY StartPnt;
- gp_XY EndPnt;
- };
-
- //! Memory allocators
- typedef Handle(NCollection_IncAllocator) Allocator;
-
- //! Short names for hashers
- typedef TopTools_ShapeMapHasher ShapeMapHasher;
-
- //! Sequences
- typedef N_SEQUENCE<Bnd_B2d> SequenceOfBndB2d;
- typedef N_SEQUENCE<Standard_Integer> SequenceOfInteger;
- typedef N_SEQUENCE<Standard_Real> SequenceOfReal;
-
- //! Vectors
- typedef N_VECTOR<BRepMesh_Vertex> VectorOfVertex;
- typedef N_VECTOR<Standard_Integer> VectorOfInteger;
- typedef N_VECTOR<BRepMesh_Circle> VectorOfCircle;
-
- //! Trees
- typedef NCollection_EBTree<Standard_Integer, Bnd_Box2d> BndBox2dTree;
- typedef NCollection_UBTreeFiller<Standard_Integer, Bnd_Box2d> BndBox2dTreeFiller;
-
- //! Arrays
- typedef N_ARRAY1<BRepMesh_Vertex> Array1OfVertexOfDelaun;
- typedef N_ARRAY1<Standard_Integer> Array1OfInteger;
- typedef N_ARRAY1<Standard_Real> Array1OfReal;
- typedef std::vector<Segment> Array1OfSegments;
-
- //! Lists
- typedef N_LIST<gp_XY> ListOfXY;
- typedef N_LIST<BRepMesh_Vertex> ListOfVertex;
- typedef N_LIST<Standard_Integer> ListOfInteger;
-
- //! Maps
- typedef N_MAP<Standard_Integer> MapOfInteger;
- typedef N_MAP<Handle(Poly_Triangulation)> MapOfTriangulation;
- typedef N_MAP<TopoDS_Shape, ShapeMapHasher> MapOfShape;
-
- typedef N_DATAMAP<Standard_Integer, Standard_Integer> MapOfIntegerInteger;
- typedef N_DATAMAP<TopoDS_Vertex, Standard_Integer, ShapeMapHasher> DMapOfVertexInteger;
- typedef N_DATAMAP<TopoDS_Face, Handle_BRepMesh_FaceAttribute, ShapeMapHasher> DMapOfFaceAttribute;
- typedef N_DATAMAP<TopoDS_Shape, BRepMesh_PairOfPolygon, ShapeMapHasher> DMapOfShapePairOfPolygon;
- typedef N_DATAMAP<Standard_Integer, gp_Pnt> DMapOfIntegerPnt;
- typedef N_DATAMAP<Standard_Integer, ListOfXY> DMapOfIntegerListOfXY;
- typedef N_DATAMAP<Standard_Integer, ListOfInteger> DMapOfIntegerListOfInteger;
- typedef N_DATAMAP<TopoDS_Edge, MapOfTriangulation, ShapeMapHasher> DMapOfEdgeListOfTriangulation;
-
- typedef N_IMAP<Standard_Integer> IMapOfInteger;
- typedef N_IMAP<Standard_Real> IMapOfReal;
- typedef N_IMAP<BRepMesh_Triangle> IMapOfElement;
- typedef N_IDMAP<BRepMesh_Edge, BRepMesh_PairOfIndex> IDMapOfLink;
-
- //! CellFilters
- typedef N_CELLFILTER<BRepMesh_CircleInspector> CircleCellFilter;
- typedef N_CELLFILTER<BRepMesh_VertexInspector> VertexCellFilter;
-
- //! Handles
- typedef N_HANDLE<MapOfInteger> HMapOfInteger;
- typedef N_HANDLE<IMapOfInteger> HIMapOfInteger;
- typedef N_HANDLE<DMapOfShapePairOfPolygon> HDMapOfShapePairOfPolygon;
- typedef N_HANDLE<DMapOfIntegerPnt> HDMapOfIntegerPnt;
- typedef N_HANDLE<BRepMesh_Classifier> HClassifier;
- typedef N_HANDLE<BndBox2dTree> HBndBox2dTree;
- typedef N_HANDLE<Array1OfSegments> HArray1OfSegments;
-
- //! Other data structures
- typedef std::pair<HArray1OfSegments, HBndBox2dTree> SegmentsTree;
- typedef std::vector<SegmentsTree> Array1OfSegmentsTree;
-};
-
-#endif
//purpose :
//=======================================================================
BRepMesh_DataStructureOfDelaun::BRepMesh_DataStructureOfDelaun(
- const BRepMeshCol::Allocator& theAllocator,
- const Standard_Integer theReservedNodeSize)
+ const Handle(NCollection_IncAllocator)& theAllocator,
+ const Standard_Integer theReservedNodeSize)
: myNodes (theReservedNodeSize, theAllocator),
myLinks (theReservedNodeSize * 3),
myDelLinks (theAllocator),
if (myNodes.FindIndex(theNewNode) != 0)
return Standard_False;
- const BRepMeshCol::ListOfInteger& aLinks = myNodes(theIndex);
+ const BRepMesh::ListOfInteger& aLinks = myNodes(theIndex);
myNodes.Substitute(theIndex, theNewNode, aLinks);
return Standard_True;
}
const Standard_Integer aNodeId = (i == 0) ?
theLink.FirstNode() : theLink.LastNode();
- BRepMeshCol::ListOfInteger& aLinkList = myNodes(aNodeId);
- BRepMeshCol::ListOfInteger::Iterator aLinkIt(aLinkList);
+ BRepMesh::ListOfInteger& aLinkList = myNodes(aNodeId);
+ BRepMesh::ListOfInteger::Iterator aLinkIt(aLinkList);
for(; aLinkIt.More(); aLinkIt.Next())
{
if (aLinkIt.Value() == theIndex)
//=======================================================================
void BRepMesh_DataStructureOfDelaun::ClearDomain()
{
- BRepMeshCol::MapOfInteger aFreeEdges;
- BRepMeshCol::MapOfInteger::Iterator aElementIt(myElementsOfDomain);
+ BRepMesh::MapOfInteger aFreeEdges;
+ BRepMesh::MapOfInteger::Iterator aElementIt(myElementsOfDomain);
for (; aElementIt.More(); aElementIt.Next())
{
const Standard_Integer aElementId = aElementIt.Key();
}
myElementsOfDomain.Clear();
- BRepMeshCol::MapOfInteger::Iterator aEdgeIt(aFreeEdges);
+ BRepMesh::MapOfInteger::Iterator aEdgeIt(aFreeEdges);
for (; aEdgeIt.More(); aEdgeIt.Next())
RemoveLink(aEdgeIt.Key());
}
--aLastLiveItem;
const Standard_Integer aLastLiveItemId = aLastLiveItem + 1;
- BRepMeshCol::ListOfInteger::Iterator aLinkIt;
+ BRepMesh::ListOfInteger::Iterator aLinkIt;
// update link references
for (Standard_Integer i = 0; i < 2; ++i)
{
//=======================================================================
void BRepMesh_DataStructureOfDelaun::clearDeletedNodes()
{
- BRepMeshCol::ListOfInteger& aDelNodes =
- (BRepMeshCol::ListOfInteger&)myNodes.GetListOfDelNodes();
+ BRepMesh::ListOfInteger& aDelNodes =
+ (BRepMesh::ListOfInteger&)myNodes.GetListOfDelNodes();
Standard_Integer aLastLiveItem = NbNodes();
while (!aDelNodes.IsEmpty())
continue;
BRepMesh_Vertex aNode = GetNode(aLastLiveItem);
- BRepMeshCol::ListOfInteger& aLinkList = myNodes(aLastLiveItem);
+ BRepMesh::ListOfInteger& aLinkList = myNodes(aLastLiveItem);
myNodes.RemoveLast();
--aLastLiveItem;
myNodes.Substitute(aDelItem, aNode, aLinkList);
const Standard_Integer aLastLiveItemId = aLastLiveItem + 1;
- BRepMeshCol::ListOfInteger::Iterator aLinkIt(aLinkList);
+ BRepMesh::ListOfInteger::Iterator aLinkIt(aLinkList);
for (; aLinkIt.More(); aLinkIt.Next())
{
const Standard_Integer aLinkId = aLinkIt.Value();
{
OCC_CATCH_SIGNALS
- BRepMeshCol::MapOfInteger::Iterator aLinksIt(aMeshData->LinksOfDomain());
+ BRepMesh::MapOfInteger::Iterator aLinksIt(aMeshData->LinksOfDomain());
for (; aLinksIt.More(); aLinksIt.Next())
{
const BRepMesh_Edge& aLink = aMeshData->GetLink(aLinksIt.Value());
#include <BRepMesh_Triangle.hxx>
#include <BRepMesh_PairOfIndex.hxx>
#include <Standard_OStream.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
class BRepMesh_Vertex;
class BRepMesh_VertexTool;
public:
//! Constructor.
- //! \param theAllocator memory allocator to be used by internal structures.
- //! \param theReservedNodeSize presumed number of nodes in this mesh.
+ //! @param theAllocator memory allocator to be used by internal structures.
+ //! @param theReservedNodeSize presumed number of nodes in this mesh.
Standard_EXPORT BRepMesh_DataStructureOfDelaun(
- const BRepMeshCol::Allocator& theAllocator,
- const Standard_Integer theReservedNodeSize = 100);
+ const Handle(NCollection_IncAllocator)& theAllocator,
+ const Standard_Integer theReservedNodeSize = 100);
-public: //! \name API for accessing mesh nodes.
+public: //! @name API for accessing mesh nodes.
//! Returns number of nodes.
inline Standard_Integer NbNodes() const
//! Adds node to the mesh if it is not already in the mesh.
- //! \param theNode node to be added to the mesh.
- //! \return index of the node in the structure.
+ //! @param theNode node to be added to the mesh.
+ //! @return index of the node in the structure.
inline Standard_Integer AddNode(const BRepMesh_Vertex& theNode)
{
return myNodes.Add(theNode);
}
//! Finds the index of the given node.
- //! \param theNode node to find.
- //! \return index of the given element of zero if node is not in the mesh.
+ //! @param theNode node to find.
+ //! @return index of the given element of zero if node is not in the mesh.
Standard_EXPORT Standard_Integer IndexOf(const BRepMesh_Vertex& theNode)
{
return myNodes.FindIndex(theNode);
}
//! Get node by the index.
- //! \param theIndex index of a node.
- //! \return node with the given index.
+ //! @param theIndex index of a node.
+ //! @return node with the given index.
inline const BRepMesh_Vertex& GetNode(const Standard_Integer theIndex)
{
return myNodes.FindKey(theIndex);
}
//! Replaces nodes of mesh by the given ones.
- //! \param theNewNodes nodes to be set instead of existing ones.
+ //! @param theNewNodes nodes to be set instead of existing ones.
Standard_EXPORT void ReplaceNodes(const BRepMesh_VertexTool& theNewNodes)
{
if (theNewNodes.IsEmpty())
}
//! Substitutes the node with the given index by new one.
- //! \param theIndex index of node to be substituted.
- //! \param theNewNode substituting node.
- //! \return FALSE in case if new node is already in the structure, TRUE elsewhere.
+ //! @param theIndex index of node to be substituted.
+ //! @param theNewNode substituting node.
+ //! @return FALSE in case if new node is already in the structure, TRUE elsewhere.
Standard_EXPORT Standard_Boolean SubstituteNode(
const Standard_Integer theIndex,
const BRepMesh_Vertex& theNewNode);
//! Removes node from the mesh in case if it has no connected links
//! and its type is Free.
- //! \param theIndex index of node to be removed.
- //! \param isForce if TRUE node will be removed even if movability
+ //! @param theIndex index of node to be removed.
+ //! @param isForce if TRUE node will be removed even if movability
//! is not Free.
Standard_EXPORT void RemoveNode(const Standard_Integer theIndex,
const Standard_Boolean isForce = Standard_False)
}
//! Get list of links attached to the node with the given index.
- //! \param theIndex index of node whose links should be retrieved.
- //! \return list of links attached to the node.
- inline const BRepMeshCol::ListOfInteger& LinksConnectedTo(
+ //! @param theIndex index of node whose links should be retrieved.
+ //! @return list of links attached to the node.
+ inline const BRepMesh::ListOfInteger& LinksConnectedTo(
const Standard_Integer theIndex) const
{
return myNodes.FindFromIndex(theIndex);
-public: //! \name API for accessing mesh links.
+public: //! @name API for accessing mesh links.
//! Returns number of links.
inline Standard_Integer NbLinks() const
}
//! Adds link to the mesh if it is not already in the mesh.
- //! \param theLink link to be added to the mesh.
- //! \return index of the link in the structure.
+ //! @param theLink link to be added to the mesh.
+ //! @return index of the link in the structure.
Standard_EXPORT Standard_Integer AddLink(const BRepMesh_Edge& theLink);
//! Finds the index of the given link.
- //! \param theLink link to find.
- //! \return index of the given element of zero if link is not in the mesh.
+ //! @param theLink link to find.
+ //! @return index of the given element of zero if link is not in the mesh.
Standard_EXPORT Standard_Integer IndexOf(const BRepMesh_Edge& theLink) const
{
return myLinks.FindIndex(theLink);
}
//! Get link by the index.
- //! \param theIndex index of a link.
- //! \return link with the given index.
+ //! @param theIndex index of a link.
+ //! @return link with the given index.
Standard_EXPORT const BRepMesh_Edge& GetLink(const Standard_Integer theIndex)
{
return myLinks.FindKey(theIndex);
}
//! Returns map of indices of links registered in mesh.
- inline const BRepMeshCol::MapOfInteger& LinksOfDomain() const
+ inline const BRepMesh::MapOfInteger& LinksOfDomain() const
{
return myLinksOfDomain;
}
//! Substitutes the link with the given index by new one.
- //! \param theIndex index of link to be substituted.
- //! \param theNewLink substituting link.
- //! \return FALSE in case if new link is already in the structure, TRUE elsewhere.
+ //! @param theIndex index of link to be substituted.
+ //! @param theNewLink substituting link.
+ //! @return FALSE in case if new link is already in the structure, TRUE elsewhere.
Standard_EXPORT Standard_Boolean SubstituteLink(const Standard_Integer theIndex,
const BRepMesh_Edge& theNewLink);
//! Removes link from the mesh in case if it has no connected elements
//! and its type is Free.
- //! \param theIndex index of link to be removed.
- //! \param isForce if TRUE link will be removed even if movability
+ //! @param theIndex index of link to be removed.
+ //! @param isForce if TRUE link will be removed even if movability
//! is not Free.
Standard_EXPORT void RemoveLink(const Standard_Integer theIndex,
const Standard_Boolean isForce = Standard_False);
//! Returns indices of elements conected to the link with the given index.
- //! \param theLinkIndex index of link whose data should be retrieved.
- //! \return indices of elements conected to the link.
+ //! @param theLinkIndex index of link whose data should be retrieved.
+ //! @return indices of elements conected to the link.
Standard_EXPORT const BRepMesh_PairOfIndex& ElementsConnectedTo(
const Standard_Integer theLinkIndex) const
{
-public: //! \name API for accessing mesh elements.
+public: //! @name API for accessing mesh elements.
//! Returns number of links.
inline Standard_Integer NbElements() const
}
//! Adds element to the mesh if it is not already in the mesh.
- //! \param theElement element to be added to the mesh.
- //! \return index of the element in the structure.
+ //! @param theElement element to be added to the mesh.
+ //! @return index of the element in the structure.
Standard_EXPORT Standard_Integer AddElement(const BRepMesh_Triangle& theElement);
//! Finds the index of the given element.
- //! \param theElement element to find.
- //! \return index of the given element of zero if element is not in the mesh.
+ //! @param theElement element to find.
+ //! @return index of the given element of zero if element is not in the mesh.
Standard_EXPORT Standard_Integer IndexOf(const BRepMesh_Triangle& theElement) const
{
return myElements.FindIndex(theElement);
}
//! Get element by the index.
- //! \param theIndex index of an element.
- //! \return element with the given index.
+ //! @param theIndex index of an element.
+ //! @return element with the given index.
Standard_EXPORT const BRepMesh_Triangle& GetElement(const Standard_Integer theIndex)
{
return myElements.FindKey(theIndex);
}
//! Returns map of indices of elements registered in mesh.
- inline const BRepMeshCol::MapOfInteger& ElementsOfDomain() const
+ inline const BRepMesh::MapOfInteger& ElementsOfDomain() const
{
return myElementsOfDomain;
}
//! Substitutes the element with the given index by new one.
- //! \param theIndex index of element to be substituted.
- //! \param theNewLink substituting element.
- //! \return FALSE in case if new element is already in the structure, TRUE elsewhere.
+ //! @param theIndex index of element to be substituted.
+ //! @param theNewLink substituting element.
+ //! @return FALSE in case if new element is already in the structure, TRUE elsewhere.
Standard_EXPORT Standard_Boolean SubstituteElement(const Standard_Integer theIndex,
const BRepMesh_Triangle& theNewElement);
//! Removes element from the mesh.
- //! \param theIndex index of element to be removed.
+ //! @param theIndex index of element to be removed.
Standard_EXPORT void RemoveElement(const Standard_Integer theIndex);
//! Returns indices of nodes forming the given element.
- //! \param theElement element which nodes should be retrieved.
- //! \param[out] theNodes nodes of the given element.
+ //! @param theElement element which nodes should be retrieved.
+ //! @param[out] theNodes nodes of the given element.
Standard_EXPORT void ElementNodes(
const BRepMesh_Triangle& theElement,
Standard_Integer (&theNodes)[3]);
-public: //! \name Auxilary API
+public: //! @name Auxilary API
//! Dumps information about this structure.
- //! \param theStream stream to be used for dump.
+ //! @param theStream stream to be used for dump.
Standard_EXPORT void Statistics(Standard_OStream& theStream) const;
//! Returns memory allocator used by the structure.
- inline const BRepMeshCol::Allocator& Allocator() const
+ inline const Handle(NCollection_IncAllocator)& Allocator() const
{
return myAllocator;
}
Standard_EXPORT void clearDeletedNodes();
//! Cleans dependent structures from the given link.
- //! \param theIndex index of link in the data structure.
- //! \param theLink reference to the link to avoid double accessing
+ //! @param theIndex index of link in the data structure.
+ //! @param theLink reference to the link to avoid double accessing
//! to map of links.
void cleanLink(const Standard_Integer theIndex,
const BRepMesh_Edge& theLink);
//! Cleans dependent structures from the given element.
- //! \param theIndex index of element in the data structure.
- //! \param theElement reference to the element to avoid double accessing
+ //! @param theIndex index of element in the data structure.
+ //! @param theElement reference to the element to avoid double accessing
//! to map of elements.
void cleanElement(const Standard_Integer theIndex,
const BRepMesh_Triangle& theElement);
//! Removes element index from the given pair. Used by cleanElement.
- //! \param theIndex index of element to be removed.
- //! \param thePair pair of elements to be cleaned.
+ //! @param theIndex index of element to be removed.
+ //! @param thePair pair of elements to be cleaned.
void removeElementIndex(const Standard_Integer theIndex,
BRepMesh_PairOfIndex& thePair);
private:
- BRepMesh_VertexTool myNodes;
- BRepMeshCol::IDMapOfLink myLinks;
- BRepMeshCol::ListOfInteger myDelLinks;
- BRepMeshCol::IMapOfElement myElements;
- BRepMeshCol::MapOfInteger myElementsOfDomain;
- BRepMeshCol::MapOfInteger myLinksOfDomain;
- BRepMeshCol::Allocator myAllocator;
+ BRepMesh_VertexTool myNodes;
+ BRepMesh::IDMapOfLink myLinks;
+ BRepMesh::ListOfInteger myDelLinks;
+ BRepMesh::IMapOfElement myElements;
+ BRepMesh::MapOfInteger myElementsOfDomain;
+ BRepMesh::MapOfInteger myLinksOfDomain;
+ Handle(NCollection_IncAllocator) myAllocator;
};
DEFINE_STANDARD_HANDLE(BRepMesh_DataStructureOfDelaun,Standard_Transient)
//purpose : Creates the triangulation with an empty Mesh data structure
//=======================================================================
BRepMesh_Delaun::BRepMesh_Delaun(
- BRepMeshCol::Array1OfVertexOfDelaun& theVertices)
+ BRepMesh::Array1OfVertexOfDelaun& theVertices)
: myCircles( theVertices.Length(), new NCollection_IncAllocator() )
{
if ( theVertices.Length() > 2 )
//=======================================================================
BRepMesh_Delaun::BRepMesh_Delaun(
const Handle( BRepMesh_DataStructureOfDelaun )& theOldMesh,
- BRepMeshCol::Array1OfVertexOfDelaun& theVertices)
+ BRepMesh::Array1OfVertexOfDelaun& theVertices)
: myCircles( theVertices.Length(), theOldMesh->Allocator() )
{
myMeshData = theOldMesh;
//=======================================================================
BRepMesh_Delaun::BRepMesh_Delaun(
const Handle( BRepMesh_DataStructureOfDelaun )& theOldMesh,
- BRepMeshCol::Array1OfInteger& theVertexIndices)
+ BRepMesh::Array1OfInteger& theVertexIndices)
: myCircles( theVertexIndices.Length(), theOldMesh->Allocator() )
{
myMeshData = theOldMesh;
//function : Init
//purpose : Initializes the triangulation with an Array of Vertex
//=======================================================================
-void BRepMesh_Delaun::Init( BRepMeshCol::Array1OfVertexOfDelaun& theVertices )
+void BRepMesh_Delaun::Init(BRepMesh::Array1OfVertexOfDelaun& theVertices)
{
Bnd_Box2d aBox;
Standard_Integer aLowerIdx = theVertices.Lower();
Standard_Integer anUpperIdx = theVertices.Upper();
- BRepMeshCol::Array1OfInteger aVertexIndexes( aLowerIdx, anUpperIdx );
+ BRepMesh::Array1OfInteger aVertexIndexes( aLowerIdx, anUpperIdx );
Standard_Integer anIndex = aLowerIdx;
for ( ; anIndex <= anUpperIdx; ++anIndex )
//function : perform
//purpose : Create super mesh and run triangulation procedure
//=======================================================================
-void BRepMesh_Delaun::perform( Bnd_Box2d& theBndBox,
- BRepMeshCol::Array1OfInteger& theVertexIndexes )
+void BRepMesh_Delaun::perform(Bnd_Box2d& theBndBox,
+ BRepMesh::Array1OfInteger& theVertexIndexes)
{
theBndBox.Enlarge( Precision );
superMesh( theBndBox );
// edges into the map.
// When an edge is suppressed more than one time it is destroyed.
//=======================================================================
-void BRepMesh_Delaun::deleteTriangle( const Standard_Integer theIndex,
- BRepMeshCol::MapOfIntegerInteger& theLoopEdges )
+void BRepMesh_Delaun::deleteTriangle(const Standard_Integer theIndex,
+ BRepMesh::MapOfIntegerInteger& theLoopEdges )
{
myCircles.Delete( theIndex );
//purpose : Computes the triangulation and add the vertices edges and
// triangles to the Mesh data structure
//=======================================================================
-void BRepMesh_Delaun::compute( BRepMeshCol::Array1OfInteger& theVertexIndexes )
+void BRepMesh_Delaun::compute(BRepMesh::Array1OfInteger& theVertexIndexes)
{
// Insertion of edges of super triangles in the list of free edges:
- BRepMeshCol::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+ BRepMesh::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
Standard_Integer e[3];
Standard_Boolean o[3];
mySupTrian.Edges( e, o );
aSelector.NeighboursOfNode( mySupVert[aSupVertId] );
aLoopEdges.Clear();
- BRepMeshCol::MapOfInteger::Iterator aFreeTriangles( aSelector.Elements() );
+ BRepMesh::MapOfInteger::Iterator aFreeTriangles( aSelector.Elements() );
for ( ; aFreeTriangles.More(); aFreeTriangles.Next() )
deleteTriangle( aFreeTriangles.Key(), aLoopEdges );
// All edges that remain free are removed from aLoopEdges;
// only the boundary edges of the triangulation remain there
- BRepMeshCol::MapOfIntegerInteger::Iterator aFreeEdges( aLoopEdges );
+ BRepMesh::MapOfIntegerInteger::Iterator aFreeEdges( aLoopEdges );
for ( ; aFreeEdges.More(); aFreeEdges.Next() )
{
if ( myMeshData->ElementsConnectedTo( aFreeEdges.Key() ).IsEmpty() )
//function : createTriangles
//purpose : Creates the triangles beetween the node and the polyline.
//=======================================================================
-void BRepMesh_Delaun::createTriangles ( const Standard_Integer theVertexIndex,
- BRepMeshCol::MapOfIntegerInteger& thePoly )
+void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIndex,
+ BRepMesh::MapOfIntegerInteger& thePoly)
{
- BRepMeshCol::ListOfInteger aLoopEdges, anExternalEdges;
+ BRepMesh::ListOfInteger aLoopEdges, anExternalEdges;
const gp_XY& aVertexCoord = myMeshData->GetNode( theVertexIndex ).Coord();
- BRepMeshCol::MapOfIntegerInteger::Iterator anEdges( thePoly );
+ BRepMesh::MapOfIntegerInteger::Iterator anEdges( thePoly );
for ( ; anEdges.More(); anEdges.Next() )
{
Standard_Integer anEdgeId = anEdges.Key();
//function : createTrianglesOnNewVertices
//purpose : Creation of triangles from the new nodes
//=======================================================================
-void BRepMesh_Delaun::createTrianglesOnNewVertices( BRepMeshCol::Array1OfInteger& theVertexIndexes )
+void BRepMesh_Delaun::createTrianglesOnNewVertices(
+ BRepMesh::Array1OfInteger& theVertexIndexes)
{
- BRepMeshCol::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+ BRepMesh::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
// Insertion of nodes :
Standard_Boolean isModify = Standard_True;
const BRepMesh_Vertex& aVertex = GetVertex( aVertexIdx );
// Iterator in the list of indexes of circles containing the node
- BRepMeshCol::ListOfInteger& aCirclesList = myCircles.Select( aVertex.Coord() );
+ BRepMesh::ListOfInteger& aCirclesList = myCircles.Select( aVertex.Coord() );
Standard_Integer onEgdeId = 0, aTriangleId = 0;
- BRepMeshCol::ListOfInteger::Iterator aCircleIt( aCirclesList );
+ BRepMesh::ListOfInteger::Iterator aCircleIt( aCirclesList );
for ( ; aCircleIt.More(); aCircleIt.Next() )
{
// To add a node in the mesh it is necessary to check conditions:
while ( isModify && !aCirclesList.IsEmpty() )
{
isModify = Standard_False;
- BRepMeshCol::ListOfInteger::Iterator aCircleIt1( aCirclesList );
+ BRepMesh::ListOfInteger::Iterator aCircleIt1( aCirclesList );
for ( ; aCircleIt1.More(); aCircleIt1.Next() )
{
Standard_Integer e[3];
}
}
// Check that internal edges are not crossed by triangles
- BRepMeshCol::HMapOfInteger anInternalEdges = InternalEdges();
+ BRepMesh::HMapOfInteger anInternalEdges = InternalEdges();
// Destruction of triancles intersecting internal edges
// and their replacement by makeshift triangles
- BRepMeshCol::MapOfInteger::Iterator anInernalEdgesIt( *anInternalEdges );
+ BRepMesh::MapOfInteger::Iterator anInernalEdgesIt( *anInternalEdges );
for ( ; anInernalEdgesIt.More(); anInernalEdgesIt.Next() )
{
Standard_Integer aNbC;
{
for(;;)
{
- BRepMeshCol::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
- BRepMeshCol::MapOfInteger aDelTriangles;
+ BRepMesh::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+ BRepMesh::MapOfInteger aDelTriangles;
- BRepMeshCol::HMapOfInteger aFreeEdges = FreeEdges();
- BRepMeshCol::MapOfInteger::Iterator aFreeEdgesIt( *aFreeEdges );
+ BRepMesh::HMapOfInteger aFreeEdges = FreeEdges();
+ BRepMesh::MapOfInteger::Iterator aFreeEdgesIt( *aFreeEdges );
for ( ; aFreeEdgesIt.More(); aFreeEdgesIt.Next() )
{
const Standard_Integer& aFreeEdgeId = aFreeEdgesIt.Key();
// Destruction of triangles :
Standard_Integer aDeletedTrianglesNb = 0;
- BRepMeshCol::MapOfInteger::Iterator aDelTrianglesIt( aDelTriangles );
+ BRepMesh::MapOfInteger::Iterator aDelTrianglesIt( aDelTriangles );
for ( ; aDelTrianglesIt.More(); aDelTrianglesIt.Next() )
{
deleteTriangle( aDelTrianglesIt.Key(), aLoopEdges );
}
// Destruction of remaining hanging edges
- BRepMeshCol::MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
+ BRepMesh::MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
for ( ; aLoopEdgesIt.More(); aLoopEdgesIt.Next() )
{
if ( myMeshData->ElementsConnectedTo( aLoopEdgesIt.Key() ).IsEmpty() )
//=======================================================================
void BRepMesh_Delaun::frontierAdjust()
{
- BRepMeshCol::HMapOfInteger aFrontier = Frontier();
- BRepMeshCol::VectorOfInteger aFailedFrontiers;
- BRepMeshCol::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
- BRepMeshCol::HMapOfInteger aIntFrontierEdges = new BRepMeshCol::MapOfInteger;
+ BRepMesh::HMapOfInteger aFrontier = Frontier();
+ BRepMesh::VectorOfInteger aFailedFrontiers;
+ BRepMesh::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+ BRepMesh::HMapOfInteger aIntFrontierEdges = new BRepMesh::MapOfInteger;
for ( Standard_Integer aPass = 1; aPass <= 2; ++aPass )
{
// 1 pass): find external triangles on boundary edges;
// 2 pass): find external triangles on boundary edges appeared
// during triangles replacement.
- BRepMeshCol::MapOfInteger::Iterator aFrontierIt( *aFrontier );
+ BRepMesh::MapOfInteger::Iterator aFrontierIt( *aFrontier );
for ( ; aFrontierIt.More(); aFrontierIt.Next() )
{
Standard_Integer aFrontierId = aFrontierIt.Key();
}
// destrucrion of remaining hanging edges :
- BRepMeshCol::MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
+ BRepMesh::MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
for ( ; aLoopEdgesIt.More(); aLoopEdgesIt.Next() )
{
Standard_Integer aLoopEdgeId = aLoopEdgesIt.Key();
// situation when frontier edge has a triangle at a right side, but its free
// links cross another frontieres and meshLeftPolygonOf itself can't collect
// a closed polygon.
- BRepMeshCol::VectorOfInteger::Iterator aFailedFrontiersIt( aFailedFrontiers );
+ BRepMesh::VectorOfInteger::Iterator aFailedFrontiersIt( aFailedFrontiers );
for ( ; aFailedFrontiersIt.More(); aFailedFrontiersIt.Next() )
{
Standard_Integer aFrontierId = aFailedFrontiersIt.Value();
//purpose : Add boundig box for edge defined by start & end point to
// the given vector of bounding boxes for triangulation edges
//=======================================================================
-void BRepMesh_Delaun::fillBndBox( BRepMeshCol::SequenceOfBndB2d& theBoxes,
- const BRepMesh_Vertex& theV1,
- const BRepMesh_Vertex& theV2 )
+void BRepMesh_Delaun::fillBndBox(BRepMesh::SequenceOfBndB2d& theBoxes,
+ const BRepMesh_Vertex& theV1,
+ const BRepMesh_Vertex& theV2)
{
Bnd_B2d aBox;
aBox.Add( theV1.Coord() );
//purpose : Collect the polygon at the left of the given edge (material side)
//=======================================================================
Standard_Boolean BRepMesh_Delaun::meshLeftPolygonOf(
- const Standard_Integer theStartEdgeId,
- const Standard_Boolean isForward,
- BRepMeshCol::HMapOfInteger theSkipped )
+ const Standard_Integer theStartEdgeId,
+ const Standard_Boolean isForward,
+ BRepMesh::HMapOfInteger theSkipped )
{
if ( !theSkipped.IsNull() && theSkipped->Contains( theStartEdgeId ) )
return Standard_True;
const BRepMesh_Edge& aRefEdge = GetEdge( theStartEdgeId );
- BRepMeshCol::SequenceOfInteger aPolygon;
+ BRepMesh::SequenceOfInteger aPolygon;
Standard_Integer aStartNode, aPivotNode;
if ( isForward )
{
// Auxilary structures.
// Bounding boxes of polygon links to be used for preliminary
// analysis of intersections
- BRepMeshCol::SequenceOfBndB2d aBoxes;
+ BRepMesh::SequenceOfBndB2d aBoxes;
fillBndBox( aBoxes, aStartEdgeVertexS, aPivotVertex );
// Hanging ends
- BRepMeshCol::MapOfInteger aDeadLinks;
+ BRepMesh::MapOfInteger aDeadLinks;
// Links are temporarily excluded from consideration
- BRepMeshCol::MapOfInteger aLeprousLinks;
+ BRepMesh::MapOfInteger aLeprousLinks;
aLeprousLinks.Add( theStartEdgeId );
Standard_Boolean isSkipLeprous = Standard_True;
// consideration next time until a hanging end is occured.
//=======================================================================
Standard_Integer BRepMesh_Delaun::findNextPolygonLink(
- const Standard_Integer& theFirstNode,
- const Standard_Integer& thePivotNode,
- const BRepMesh_Vertex& thePivotVertex,
- const gp_Vec2d& theRefLinkDir,
- const BRepMeshCol::SequenceOfBndB2d& theBoxes,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::HMapOfInteger theSkipped,
- const Standard_Boolean& isSkipLeprous,
- BRepMeshCol::MapOfInteger& theLeprousLinks,
- BRepMeshCol::MapOfInteger& theDeadLinks,
- Standard_Integer& theNextPivotNode,
- gp_Vec2d& theNextLinkDir,
- Bnd_B2d& theNextLinkBndBox )
+ const Standard_Integer& theFirstNode,
+ const Standard_Integer& thePivotNode,
+ const BRepMesh_Vertex& thePivotVertex,
+ const gp_Vec2d& theRefLinkDir,
+ const BRepMesh::SequenceOfBndB2d& theBoxes,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::HMapOfInteger theSkipped,
+ const Standard_Boolean& isSkipLeprous,
+ BRepMesh::MapOfInteger& theLeprousLinks,
+ BRepMesh::MapOfInteger& theDeadLinks,
+ Standard_Integer& theNextPivotNode,
+ gp_Vec2d& theNextLinkDir,
+ Bnd_B2d& theNextLinkBndBox )
{
// Find the next link having the greatest angle
// respect to a direction of a reference one
Standard_Real aMaxAngle = RealFirst();
Standard_Integer aNextLinkId = 0;
- BRepMeshCol::ListOfInteger::Iterator aLinkIt( myMeshData->LinksConnectedTo( thePivotNode ) );
+ BRepMesh::ListOfInteger::Iterator aLinkIt( myMeshData->LinksConnectedTo( thePivotNode ) );
for ( ; aLinkIt.More(); aLinkIt.Next() )
{
const Standard_Integer& aNeighbourLinkInfo = aLinkIt.Value();
// <theLinkBndBox> parameter.
//=======================================================================
Standard_Boolean BRepMesh_Delaun::checkIntersection(
- const BRepMesh_Edge& theLink,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes,
- const Standard_Boolean isConsiderEndPointTouch,
- const Standard_Boolean isConsiderPointOnEdge,
- const Standard_Boolean isSkipLastEdge,
- Bnd_B2d& theLinkBndBox ) const
+ const BRepMesh_Edge& theLink,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes,
+ const Standard_Boolean isConsiderEndPointTouch,
+ const Standard_Boolean isConsiderPointOnEdge,
+ const Standard_Boolean isSkipLastEdge,
+ Bnd_B2d& theLinkBndBox ) const
{
theLinkBndBox.Add( GetVertex( theLink.FirstNode() ).Coord() );
theLinkBndBox.Add( GetVertex( theLink.LastNode() ).Coord() );
//function : cleanupPolygon
//purpose : Remove internal triangles from the given polygon
//=======================================================================
-void BRepMesh_Delaun::cleanupPolygon( const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes )
+void BRepMesh_Delaun::cleanupPolygon(const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes )
{
Standard_Integer aPolyLen = thePolygon.Length();
if ( aPolyLen < 3 )
return;
- BRepMeshCol::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
- BRepMeshCol::MapOfInteger anIgnoredEdges;
- BRepMeshCol::MapOfInteger aPolyVerticesFindMap;
- BRepMeshCol::VectorOfInteger aPolyVertices;
+ BRepMesh::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+ BRepMesh::MapOfInteger anIgnoredEdges;
+ BRepMesh::MapOfInteger aPolyVerticesFindMap;
+ BRepMesh::VectorOfInteger aPolyVertices;
// Collect boundary vertices of the polygon
for ( Standard_Integer aPolyIt = 1; aPolyIt <= aPolyLen; ++aPolyIt )
{
if ( aPolyVertices.First() != aPolyVertices.Last() )
aPolyVertices.Append( aPolyVertices.First() );
- BRepMeshCol::MapOfInteger aSurvivedLinks( anIgnoredEdges );
+ BRepMesh::MapOfInteger aSurvivedLinks( anIgnoredEdges );
Standard_Integer aPolyVertIt = 0;
Standard_Integer anUniqueVerticesNum = aPolyVertices.Length() - 1;
thePolyBoxes, aSurvivedLinks, aLoopEdges );
}
- BRepMeshCol::MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
+ BRepMesh::MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
for ( ; aLoopEdgesIt.More(); aLoopEdgesIt.Next() )
{
const Standard_Integer& aLoopEdgeId = aLoopEdgesIt.Key();
// inside the polygon or crossed it.
//=======================================================================
void BRepMesh_Delaun::killTrianglesAroundVertex(
- const Standard_Integer theZombieNodeId,
- const BRepMeshCol::VectorOfInteger& thePolyVertices,
- const BRepMeshCol::MapOfInteger& thePolyVerticesFindMap,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes,
- BRepMeshCol::MapOfInteger& theSurvivedLinks,
- BRepMeshCol::MapOfIntegerInteger& theLoopEdges )
+ const Standard_Integer theZombieNodeId,
+ const BRepMesh::VectorOfInteger& thePolyVertices,
+ const BRepMesh::MapOfInteger& thePolyVerticesFindMap,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes,
+ BRepMesh::MapOfInteger& theSurvivedLinks,
+ BRepMesh::MapOfIntegerInteger& theLoopEdges )
{
- BRepMeshCol::ListOfInteger::Iterator aNeighborsIt =
+ BRepMesh::ListOfInteger::Iterator aNeighborsIt =
myMeshData->LinksConnectedTo( theZombieNodeId );
// Try to infect neighbor nodes
- BRepMeshCol::VectorOfInteger aVictimNodes;
+ BRepMesh::VectorOfInteger aVictimNodes;
for ( ; aNeighborsIt.More(); aNeighborsIt.Next() )
{
const Standard_Integer& aNeighborLinkId = aNeighborsIt.Value();
}
// Go and do your job!
- BRepMeshCol::VectorOfInteger::Iterator aVictimIt( aVictimNodes );
+ BRepMesh::VectorOfInteger::Iterator aVictimIt( aVictimNodes );
for ( ; aVictimIt.More(); aVictimIt.Next() )
{
killTrianglesAroundVertex( aVictimIt.Value(), thePolyVertices,
//purpose : Checks is the given vertex lies inside the polygon
//=======================================================================
Standard_Boolean BRepMesh_Delaun::isVertexInsidePolygon(
- const Standard_Integer& theVertexId,
- const BRepMeshCol::VectorOfInteger& thePolygonVertices ) const
+ const Standard_Integer& theVertexId,
+ const BRepMesh::VectorOfInteger& thePolygonVertices ) const
{
Standard_Integer aPolyLen = thePolygonVertices.Length();
if ( aPolyLen < 3 )
// boundary intersection. Does nothing elsewhere.
//=======================================================================
void BRepMesh_Delaun::killTrianglesOnIntersectingLinks(
- const Standard_Integer& theLinkToCheckId,
- const BRepMesh_Edge& theLinkToCheck,
- const Standard_Integer& theEndPoint,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes,
- BRepMeshCol::MapOfInteger& theSurvivedLinks,
- BRepMeshCol::MapOfIntegerInteger& theLoopEdges )
+ const Standard_Integer& theLinkToCheckId,
+ const BRepMesh_Edge& theLinkToCheck,
+ const Standard_Integer& theEndPoint,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes,
+ BRepMesh::MapOfInteger& theSurvivedLinks,
+ BRepMesh::MapOfIntegerInteger& theLoopEdges )
{
if ( theSurvivedLinks.Contains( theLinkToCheckId ) )
return;
killLinkTriangles( theLinkToCheckId, theLoopEdges );
- BRepMeshCol::ListOfInteger::Iterator aNeighborsIt =
+ BRepMesh::ListOfInteger::Iterator aNeighborsIt =
myMeshData->LinksConnectedTo( theEndPoint );
for ( ; aNeighborsIt.More(); aNeighborsIt.Next() )
//purpose : Kill triangles bound to the given link.
//=======================================================================
void BRepMesh_Delaun::killLinkTriangles(
- const Standard_Integer& theLinkId,
- BRepMeshCol::MapOfIntegerInteger& theLoopEdges )
+ const Standard_Integer& theLinkId,
+ BRepMesh::MapOfIntegerInteger& theLoopEdges )
{
const BRepMesh_PairOfIndex& aPair =
myMeshData->ElementsConnectedTo( theLinkId );
//purpose : Processes loop within the given polygon formed by range of
// its links specified by start and end link indices.
//=======================================================================
-void BRepMesh_Delaun::processLoop(const Standard_Integer theLinkFrom,
- const Standard_Integer theLinkTo,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes)
+void BRepMesh_Delaun::processLoop(const Standard_Integer theLinkFrom,
+ const Standard_Integer theLinkTo,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes)
{
Standard_Integer aNbOfLinksInLoop = theLinkTo - theLinkFrom - 1;
if ( aNbOfLinksInLoop < 3 )
return;
- BRepMeshCol::SequenceOfInteger aPolygon;
- BRepMeshCol::SequenceOfBndB2d aPolyBoxes;
+ BRepMesh::SequenceOfInteger aPolygon;
+ BRepMesh::SequenceOfBndB2d aPolyBoxes;
for ( ; aNbOfLinksInLoop > 0; --aNbOfLinksInLoop )
{
Standard_Integer aLoopLinkIndex = theLinkFrom + aNbOfLinksInLoop;
// given polygon.
//=======================================================================
Standard_Integer BRepMesh_Delaun::createAndReplacePolygonLink(
- const Standard_Integer *theNodes,
- const gp_Pnt2d *thePnts,
- const Standard_Integer theRootIndex,
- const ReplaceFlag theReplaceFlag,
- BRepMeshCol::SequenceOfInteger& thePolygon,
- BRepMeshCol::SequenceOfBndB2d& thePolyBoxes )
+ const Standard_Integer *theNodes,
+ const gp_Pnt2d *thePnts,
+ const Standard_Integer theRootIndex,
+ const ReplaceFlag theReplaceFlag,
+ BRepMesh::SequenceOfInteger& thePolygon,
+ BRepMesh::SequenceOfBndB2d& thePolyBoxes )
{
Standard_Integer aNewEdgeId =
myMeshData->AddLink( BRepMesh_Edge(
//function : meshPolygon
//purpose :
//=======================================================================
-void BRepMesh_Delaun::meshPolygon( BRepMeshCol::SequenceOfInteger& thePolygon,
- BRepMeshCol::SequenceOfBndB2d& thePolyBoxes,
- BRepMeshCol::HMapOfInteger theSkipped )
+void BRepMesh_Delaun::meshPolygon(BRepMesh::SequenceOfInteger& thePolygon,
+ BRepMesh::SequenceOfBndB2d& thePolyBoxes,
+ BRepMesh::HMapOfInteger theSkipped )
{
// Check is the source polygon elementary
if ( meshElementaryPolygon( thePolygon ) )
//purpose : Triangulation of closed polygon containing only three edges.
//=======================================================================
inline Standard_Boolean BRepMesh_Delaun::meshElementaryPolygon(
- const BRepMeshCol::SequenceOfInteger& thePolygon )
+ const BRepMesh::SequenceOfInteger& thePolygon)
{
Standard_Integer aPolyLen = thePolygon.Length();
if ( aPolyLen < 3 )
// its edges in the structure.
// (negative index means reversed edge)
//=======================================================================
-void BRepMesh_Delaun::meshSimplePolygon( BRepMeshCol::SequenceOfInteger& thePolygon,
- BRepMeshCol::SequenceOfBndB2d& thePolyBoxes )
+void BRepMesh_Delaun::meshSimplePolygon(BRepMesh::SequenceOfInteger& thePolygon,
+ BRepMesh::SequenceOfBndB2d& thePolyBoxes )
{
// Check is the given polygon elementary
if ( meshElementaryPolygon( thePolygon ) )
// polygon.
if ( aUsedLinkId < aPolyLen )
{
- BRepMeshCol::SequenceOfInteger aRightPolygon;
+ BRepMesh::SequenceOfInteger aRightPolygon;
thePolygon.Split( aUsedLinkId, aRightPolygon );
aRightPolygon.Prepend( -aNewEdgesInfo[2] );
- BRepMeshCol::SequenceOfBndB2d aRightPolyBoxes;
+ BRepMesh::SequenceOfBndB2d aRightPolyBoxes;
thePolyBoxes.Split( aUsedLinkId, aRightPolyBoxes );
Bnd_B2d aBox;
BRepMesh_SelectorOfDataStructureOfDelaun aSelector( myMeshData );
aSelector.NeighboursOf( theVertex );
- BRepMeshCol::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+ BRepMesh::MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
// Loop on triangles to be destroyed :
- BRepMeshCol::MapOfInteger::Iterator aTriangleIt( aSelector.Elements() );
+ BRepMesh::MapOfInteger::Iterator aTriangleIt( aSelector.Elements() );
for ( ; aTriangleIt.More(); aTriangleIt.Next() )
deleteTriangle( aTriangleIt.Key(), aLoopEdges );
- BRepMeshCol::SequenceOfBndB2d aBoxes;
- BRepMeshCol::SequenceOfInteger aPolygon;
+ BRepMesh::SequenceOfBndB2d aBoxes;
+ BRepMesh::SequenceOfInteger aPolygon;
Standard_Integer aLoopEdgesCount = aLoopEdges.Extent();
- BRepMeshCol::MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
+ BRepMesh::MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
if ( aLoopEdgesIt.More() )
{
aLastNode = aFirstNode;
while ( aPivotNode != aLastNode )
{
- BRepMeshCol::ListOfInteger::Iterator aLinkIt( myMeshData->LinksConnectedTo( aPivotNode ) );
+ BRepMesh::ListOfInteger::Iterator aLinkIt( myMeshData->LinksConnectedTo( aPivotNode ) );
for ( ; aLinkIt.More(); aLinkIt.Next() )
{
if ( aLinkIt.Value() != anEdgeId &&
//function : AddVertices
//purpose : Adds some vertices in the triangulation.
//=======================================================================
-void BRepMesh_Delaun::AddVertices( BRepMeshCol::Array1OfVertexOfDelaun& theVertices )
+void BRepMesh_Delaun::AddVertices(BRepMesh::Array1OfVertexOfDelaun& theVertices)
{
std::make_heap(theVertices.begin(), theVertices.end(), ComparatorOfVertexOfDelaun());
std::sort_heap(theVertices.begin(), theVertices.end(), ComparatorOfVertexOfDelaun());
Standard_Integer aLower = theVertices.Lower();
Standard_Integer anUpper = theVertices.Upper();
- BRepMeshCol::Array1OfInteger aVertexIndexes( aLower, anUpper );
+ BRepMesh::Array1OfInteger aVertexIndexes( aLower, anUpper );
for ( Standard_Integer i = aLower; i <= anUpper; ++i )
aVertexIndexes(i) = myMeshData->AddNode( theVertices(i) );
//function : getEdgesByType
//purpose : Gives the list of edges with type defined by input parameter
//=======================================================================
-BRepMeshCol::HMapOfInteger BRepMesh_Delaun::getEdgesByType(
+BRepMesh::HMapOfInteger BRepMesh_Delaun::getEdgesByType(
const BRepMesh_DegreeOfFreedom theEdgeType ) const
{
- BRepMeshCol::HMapOfInteger aResult = new BRepMeshCol::MapOfInteger;
- BRepMeshCol::MapOfInteger::Iterator anEdgeIt( myMeshData->LinksOfDomain() );
+ BRepMesh::HMapOfInteger aResult = new BRepMesh::MapOfInteger;
+ BRepMesh::MapOfInteger::Iterator anEdgeIt( myMeshData->LinksOfDomain() );
for ( ; anEdgeIt.More(); anEdgeIt.Next() )
{
//purpose : Returns area of the loop of the given polygon defined by indices
// of its start and end links.
//=============================================================================
-Standard_Real BRepMesh_Delaun::polyArea( const BRepMeshCol::SequenceOfInteger& thePolygon,
- const Standard_Integer theStartIndex,
- const Standard_Integer theEndIndex ) const
+Standard_Real BRepMesh_Delaun::polyArea(const BRepMesh::SequenceOfInteger& thePolygon,
+ const Standard_Integer theStartIndex,
+ const Standard_Integer theEndIndex) const
{
Standard_Real aArea = 0.0;
Standard_Integer aPolyLen = thePolygon.Length();
#include <BRepMesh_CircleTool.hxx>
#include <BRepMesh_Triangle.hxx>
#include <BRepMesh_Edge.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <BRepMesh_DataStructureOfDelaun.hxx>
#include <BRepMesh_GeomTool.hxx>
DEFINE_STANDARD_ALLOC
//! Creates the triangulation with an empty Mesh data structure.
- Standard_EXPORT BRepMesh_Delaun (BRepMeshCol::Array1OfVertexOfDelaun& theVertices);
+ Standard_EXPORT BRepMesh_Delaun (BRepMesh::Array1OfVertexOfDelaun& theVertices);
//! Creates the triangulation with an existent Mesh data structure.
Standard_EXPORT BRepMesh_Delaun (const Handle(BRepMesh_DataStructureOfDelaun)& theOldMesh,
- BRepMeshCol::Array1OfVertexOfDelaun& theVertices);
+ BRepMesh::Array1OfVertexOfDelaun& theVertices);
//! Creates the triangulation with an existant Mesh data structure.
Standard_EXPORT BRepMesh_Delaun (const Handle(BRepMesh_DataStructureOfDelaun)& theOldMesh,
- BRepMeshCol::Array1OfInteger& theVertexIndices);
+ BRepMesh::Array1OfInteger& theVertexIndices);
//! Initializes the triangulation with an array of vertices.
- Standard_EXPORT void Init (BRepMeshCol::Array1OfVertexOfDelaun& theVertices);
+ Standard_EXPORT void Init (BRepMesh::Array1OfVertexOfDelaun& theVertices);
//! Removes a vertex from the triangulation.
Standard_EXPORT void RemoveVertex (const BRepMesh_Vertex& theVertex);
//! Adds some vertices into the triangulation.
- Standard_EXPORT void AddVertices (BRepMeshCol::Array1OfVertexOfDelaun& theVertices);
+ Standard_EXPORT void AddVertices (BRepMesh::Array1OfVertexOfDelaun& theVertices);
//! Modify mesh to use the edge.
//! @return True if done
}
//! Gives the list of frontier edges.
- inline BRepMeshCol::HMapOfInteger Frontier() const
+ inline BRepMesh::HMapOfInteger Frontier() const
{
return getEdgesByType (BRepMesh_Frontier);
}
//! Gives the list of internal edges.
- inline BRepMeshCol::HMapOfInteger InternalEdges() const
+ inline BRepMesh::HMapOfInteger InternalEdges() const
{
return getEdgesByType (BRepMesh_Fixed);
}
//! Gives the list of free edges used only one time
- inline BRepMeshCol::HMapOfInteger FreeEdges() const
+ inline BRepMesh::HMapOfInteger FreeEdges() const
{
return getEdgesByType (BRepMesh_Free);
}
InsertBefore
};
- typedef NCollection_DataMap<Standard_Integer, BRepMeshCol::MapOfInteger> DataMapOfMap;
+ typedef NCollection_DataMap<Standard_Integer, BRepMesh::MapOfInteger> DataMapOfMap;
//! Add boundig box for edge defined by start & end point to
//! the given vector of bounding boxes for triangulation edges.
- void fillBndBox (BRepMeshCol::SequenceOfBndB2d& theBoxes,
- const BRepMesh_Vertex& theV1,
- const BRepMesh_Vertex& theV2);
+ void fillBndBox (BRepMesh::SequenceOfBndB2d& theBoxes,
+ const BRepMesh_Vertex& theV1,
+ const BRepMesh_Vertex& theV2);
//! Gives the list of edges with type defined by the input parameter.
//! If the given type is BRepMesh_Free returns list of edges
//! that have number of connected elements less or equal 1.
- BRepMeshCol::HMapOfInteger getEdgesByType (const BRepMesh_DegreeOfFreedom theEdgeType) const;
+ BRepMesh::HMapOfInteger getEdgesByType (const BRepMesh_DegreeOfFreedom theEdgeType) const;
//! Create super mesh and run triangulation procedure.
- void perform (Bnd_Box2d& theBndBox,
- BRepMeshCol::Array1OfInteger& theVertexIndices);
+ void perform (Bnd_Box2d& theBndBox,
+ BRepMesh::Array1OfInteger& theVertexIndices);
//! Build the super mesh.
void superMesh (const Bnd_Box2d& theBox);
//! Computes the triangulation and adds the vertices,
//! edges and triangles to the Mesh data structure.
- void compute (BRepMeshCol::Array1OfInteger& theVertexIndices);
+ void compute (BRepMesh::Array1OfInteger& theVertexIndices);
//! Adjust the mesh on the frontier.
void frontierAdjust();
//! Find left polygon of the given edge and call meshPolygon.
- Standard_Boolean meshLeftPolygonOf (const Standard_Integer theEdgeIndex,
- const Standard_Boolean isForward,
- BRepMeshCol::HMapOfInteger theSkipped = NULL);
+ Standard_Boolean meshLeftPolygonOf (const Standard_Integer theEdgeIndex,
+ const Standard_Boolean isForward,
+ BRepMesh::HMapOfInteger theSkipped = NULL);
//! Find next link starting from the given node and has maximum
//! angle respect the given reference link.
//! Each time the next link is found other neighbor links at the pivot
//! node are marked as leprous and will be excluded from consideration
//! next time until a hanging end is occured.
- Standard_Integer findNextPolygonLink (const Standard_Integer& theFirstNode,
- const Standard_Integer& thePivotNode,
- const BRepMesh_Vertex& thePivotVertex,
- const gp_Vec2d& theRefLinkDir,
- const BRepMeshCol::SequenceOfBndB2d& theBoxes,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::HMapOfInteger theSkipped,
- const Standard_Boolean& isSkipLeprous,
- BRepMeshCol::MapOfInteger& theLeprousLinks,
- BRepMeshCol::MapOfInteger& theDeadLinks,
- Standard_Integer& theNextPivotNode,
- gp_Vec2d& theNextLinkDir,
- Bnd_B2d& theNextLinkBndBox);
+ Standard_Integer findNextPolygonLink (const Standard_Integer& theFirstNode,
+ const Standard_Integer& thePivotNode,
+ const BRepMesh_Vertex& thePivotVertex,
+ const gp_Vec2d& theRefLinkDir,
+ const BRepMesh::SequenceOfBndB2d& theBoxes,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::HMapOfInteger theSkipped,
+ const Standard_Boolean& isSkipLeprous,
+ BRepMesh::MapOfInteger& theLeprousLinks,
+ BRepMesh::MapOfInteger& theDeadLinks,
+ Standard_Integer& theNextPivotNode,
+ gp_Vec2d& theNextLinkDir,
+ Bnd_B2d& theNextLinkBndBox);
//! Check is the given link intersects the polygon boundaries.
//! Returns bounding box for the given link trough the theLinkBndBox parameter.
- Standard_Boolean checkIntersection (const BRepMesh_Edge& theLink,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes,
- const Standard_Boolean isConsiderEndPointTouch,
- const Standard_Boolean isConsiderPointOnEdge,
- const Standard_Boolean isSkipLastEdge,
- Bnd_B2d& theLinkBndBox) const;
+ Standard_Boolean checkIntersection (const BRepMesh_Edge& theLink,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes,
+ const Standard_Boolean isConsiderEndPointTouch,
+ const Standard_Boolean isConsiderPointOnEdge,
+ const Standard_Boolean isSkipLastEdge,
+ Bnd_B2d& theLinkBndBox) const;
//! Triangulatiion of a closed polygon described by the list
//! of indexes of its edges in the structure.
//! (negative index means reversed edge)
- void meshPolygon (BRepMeshCol::SequenceOfInteger& thePolygon,
- BRepMeshCol::SequenceOfBndB2d& thePolyBoxes,
- BRepMeshCol::HMapOfInteger theSkipped = NULL);
+ void meshPolygon (BRepMesh::SequenceOfInteger& thePolygon,
+ BRepMesh::SequenceOfBndB2d& thePolyBoxes,
+ BRepMesh::HMapOfInteger theSkipped = NULL);
//! Triangulatiion of a closed simple polygon (polygon without glued edges and loops)
//! described by the list of indexes of its edges in the structure.
//! (negative index means reversed edge)
- void meshSimplePolygon (BRepMeshCol::SequenceOfInteger& thePolygon,
- BRepMeshCol::SequenceOfBndB2d& thePolyBoxes);
+ void meshSimplePolygon (BRepMesh::SequenceOfInteger& thePolygon,
+ BRepMesh::SequenceOfBndB2d& thePolyBoxes);
//! Triangulation of closed polygon containing only three edges.
- inline Standard_Boolean meshElementaryPolygon (const BRepMeshCol::SequenceOfInteger& thePolygon);
+ inline Standard_Boolean meshElementaryPolygon (const BRepMesh::SequenceOfInteger& thePolygon);
//! Creates the triangles beetween the given node and the given polyline.
- void createTriangles (const Standard_Integer theVertexIndex,
- BRepMeshCol::MapOfIntegerInteger& thePoly);
+ void createTriangles (const Standard_Integer theVertexIndex,
+ BRepMesh::MapOfIntegerInteger& thePoly);
//! Add a triangle based on the given oriented edges into mesh
inline void addTriangle (const Standard_Integer (&theEdgesId)[3],
//! Deletes the triangle with the given index and adds the free edges into the map.
//! When an edge is suppressed more than one time it is destroyed.
- void deleteTriangle (const Standard_Integer theIndex,
- BRepMeshCol::MapOfIntegerInteger& theLoopEdges);
+ void deleteTriangle (const Standard_Integer theIndex,
+ BRepMesh::MapOfIntegerInteger& theLoopEdges);
//! Returns start and end nodes of the given edge in respect to its orientation.
void getOrientedNodes (const BRepMesh_Edge& theEdge,
//! Processes loop within the given polygon formed by range of its
//! links specified by start and end link indices.
- void processLoop (const Standard_Integer theLinkFrom,
- const Standard_Integer theLinkTo,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes);
+ void processLoop (const Standard_Integer theLinkFrom,
+ const Standard_Integer theLinkTo,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes);
//! Creates new link based on the given nodes and updates the given polygon.
- Standard_Integer createAndReplacePolygonLink (const Standard_Integer theNodes[],
- const gp_Pnt2d thePnts [],
- const Standard_Integer theRootIndex,
- const ReplaceFlag theReplaceFlag,
- BRepMeshCol::SequenceOfInteger& thePolygon,
- BRepMeshCol::SequenceOfBndB2d& thePolyBoxes);
+ Standard_Integer createAndReplacePolygonLink (const Standard_Integer theNodes[],
+ const gp_Pnt2d thePnts [],
+ const Standard_Integer theRootIndex,
+ const ReplaceFlag theReplaceFlag,
+ BRepMesh::SequenceOfInteger& thePolygon,
+ BRepMesh::SequenceOfBndB2d& thePolyBoxes);
//! Creates the triangles on new nodes.
- void createTrianglesOnNewVertices (BRepMeshCol::Array1OfInteger& theVertexIndices);
+ void createTrianglesOnNewVertices (BRepMesh::Array1OfInteger& theVertexIndices);
//! Cleanup mesh from the free triangles.
void cleanupMesh();
const Standard_Integer thePrevElementId);
//! Remove internal triangles from the given polygon.
- void cleanupPolygon (const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes);
+ void cleanupPolygon (const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes);
//! Checks is the given vertex lies inside the polygon.
- Standard_Boolean isVertexInsidePolygon (const Standard_Integer& theVertexId,
- const BRepMeshCol::VectorOfInteger& thePolygonVertices) const;
+ Standard_Boolean isVertexInsidePolygon (const Standard_Integer& theVertexId,
+ const BRepMesh::VectorOfInteger& thePolygonVertices) const;
//! Remove all triangles and edges that are placed inside the polygon or crossed it.
- void killTrianglesAroundVertex (const Standard_Integer theZombieNodeId,
- const BRepMeshCol::VectorOfInteger& thePolyVertices,
- const BRepMeshCol::MapOfInteger& thePolyVerticesFindMap,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes,
- BRepMeshCol::MapOfInteger& theSurvivedLinks,
- BRepMeshCol::MapOfIntegerInteger& theLoopEdges);
+ void killTrianglesAroundVertex (const Standard_Integer theZombieNodeId,
+ const BRepMesh::VectorOfInteger& thePolyVertices,
+ const BRepMesh::MapOfInteger& thePolyVerticesFindMap,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes,
+ BRepMesh::MapOfInteger& theSurvivedLinks,
+ BRepMesh::MapOfIntegerInteger& theLoopEdges);
//! Checks is the given link crosses the polygon boundary.
//! If yes, kills its triangles and checks neighbor links on boundary intersection. Does nothing elsewhere.
- void killTrianglesOnIntersectingLinks (const Standard_Integer& theLinkToCheckId,
- const BRepMesh_Edge& theLinkToCheck,
- const Standard_Integer& theEndPoint,
- const BRepMeshCol::SequenceOfInteger& thePolygon,
- const BRepMeshCol::SequenceOfBndB2d& thePolyBoxes,
- BRepMeshCol::MapOfInteger& theSurvivedLinks,
- BRepMeshCol::MapOfIntegerInteger& theLoopEdges);
+ void killTrianglesOnIntersectingLinks (const Standard_Integer& theLinkToCheckId,
+ const BRepMesh_Edge& theLinkToCheck,
+ const Standard_Integer& theEndPoint,
+ const BRepMesh::SequenceOfInteger& thePolygon,
+ const BRepMesh::SequenceOfBndB2d& thePolyBoxes,
+ BRepMesh::MapOfInteger& theSurvivedLinks,
+ BRepMesh::MapOfIntegerInteger& theLoopEdges);
//! Kill triangles bound to the given link.
- void killLinkTriangles (const Standard_Integer& theLinkId,
- BRepMeshCol::MapOfIntegerInteger& theLoopEdges);
+ void killLinkTriangles (const Standard_Integer& theLinkId,
+ BRepMesh::MapOfIntegerInteger& theLoopEdges);
//! Calculates distances between the given point and edges of triangle.
Standard_Real calculateDist (const gp_XY theVEdges[3],
gp_Pnt2d& theIntPnt) const;
//! Returns area of the loop of the given polygon defined by indices of its start and end links.
- Standard_Real polyArea (const BRepMeshCol::SequenceOfInteger& thePolygon,
- const Standard_Integer theStartIndex,
- const Standard_Integer theEndIndex) const;
+ Standard_Real polyArea (const BRepMesh::SequenceOfInteger& thePolygon,
+ const Standard_Integer theStartIndex,
+ const Standard_Integer theEndIndex) const;
private:
const TCollection_AsciiString& theFuncName = "DISCRETALGO");
//! Returns triangulation algorithm instance.
- //! \param theShape shape to be meshed.
- //! \param theLinDeflection linear deflection to be used for meshing.
- //! \param theAngDeflection angular deflection to be used for meshing.
+ //! @param theShape shape to be meshed.
+ //! @param theLinDeflection linear deflection to be used for meshing.
+ //! @param theAngDeflection angular deflection to be used for meshing.
Standard_EXPORT Handle(BRepMesh_DiscretRoot) Discret(const TopoDS_Shape& theShape,
const Standard_Real theLinDeflection,
const Standard_Real theAngDeflection);
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>
#include <BRepMesh_DegreeOfFreedom.hxx>
-
-//! Light weighted structure representing simple link.
-class BRepMesh_OrientedEdge
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
- //! Default constructor.
- Standard_EXPORT BRepMesh_OrientedEdge()
- : myFirstNode(-1),
- myLastNode(-1)
- {
- }
-
- //! Constructs a link between two vertices.
- Standard_EXPORT BRepMesh_OrientedEdge(
- const Standard_Integer theFirstNode,
- const Standard_Integer theLastNode)
- : myFirstNode(theFirstNode),
- myLastNode(theLastNode)
- {
- }
-
- //! Returns index of first node of the Link.
- inline Standard_Integer FirstNode() const
- {
- return myFirstNode;
- }
-
- //! Returns index of last node of the Link.
- inline Standard_Integer LastNode() const
- {
- return myLastNode;
- }
-
- //! Returns hash code for this edge.
- //! @param theUpper upper index in the container.
- //! @return hash code.
- Standard_EXPORT Standard_Integer HashCode(const Standard_Integer theUpper) const
- {
- return ::HashCode(myFirstNode + myLastNode, theUpper);
- }
-
- //! Checks this and other edge for equality.
- //! @param theOther edge to be checked against this one.
- //! @retrun TRUE if edges have the same orientation, FALSE if not.
- inline Standard_Boolean IsEqual(const BRepMesh_OrientedEdge& theOther) const
- {
- return (myFirstNode == theOther.myFirstNode && myLastNode == theOther.myLastNode);
- }
-
- //! Alias for IsEqual.
- Standard_Boolean operator ==(const BRepMesh_OrientedEdge& Other) const
- {
- return IsEqual(Other);
- }
-
-private:
-
- Standard_Integer myFirstNode;
- Standard_Integer myLastNode;
-};
+#include <BRepMesh_OrientedEdge.hxx>
//! Light weighted structure representing link of the mesh.
class BRepMesh_Edge : public BRepMesh_OrientedEdge
}
//! Sets movability flag of the Link.
- //! \param theMovability flag to be set.
+ //! @param theMovability flag to be set.
inline void SetMovability(const BRepMesh_DegreeOfFreedom theMovability)
{
myMovability = theMovability;
}
//! Checks if the given edge and this one have the same orientation.
- //! \param theOther edge to be checked against this one.
+ //! @param theOther edge to be checked against this one.
//! \retrun TRUE if edges have the same orientation, FALSE if not.
inline Standard_Boolean IsSameOrientation(const BRepMesh_Edge& theOther) const
{
}
//! Checks for equality with another edge.
- //! \param theOther edge to be checked against this one.
- //! \return TRUE if equal, FALSE if not.
+ //! @param theOther edge to be checked against this one.
+ //! @return TRUE if equal, FALSE if not.
inline Standard_Boolean IsEqual(const BRepMesh_Edge& theOther) const
{
if (myMovability == BRepMesh_Deleted || theOther.myMovability == BRepMesh_Deleted)
BRepMesh_DegreeOfFreedom myMovability;
};
-inline Standard_Integer HashCode(const BRepMesh_OrientedEdge& theEdge,
- const Standard_Integer theUpper)
-{
- return theEdge.HashCode(theUpper);
-}
-
inline Standard_Integer HashCode(const BRepMesh_Edge& theEdge,
const Standard_Integer theUpper)
{
public:
//! Constructor
- //! \param theFaceTri Poly triangulation of face the edges relie to.
- //! \param theFaceLoc Face location to be used to extract polygon on triangulation.
- //! \param theMutex Upper level shared mutex to protect isFailed flag from concurrent write access.
- //! \param isFailed Upper level shared flag indicating that polygon on triangulation of checked
+ //! @param theFaceTri Poly triangulation of face the edges relie to.
+ //! @param theFaceLoc Face location to be used to extract polygon on triangulation.
+ //! @param theMutex Upper level shared mutex to protect isFailed flag from concurrent write access.
+ //! @param isFailed Upper level shared flag indicating that polygon on triangulation of checked
//! edge is not consistent. If this flag is set to TRUE, other tasks will not check details of their data.
BRepMesh_EdgeChecker( Handle(Poly_Triangulation)& theFaceTri,
TopLoc_Location& theFaceLoc,
}
//! Checker's body.
- //! \param theEdge edge to be checked.
+ //! @param theEdge edge to be checked.
void operator ()(const TopoDS_Edge& theEdge) const
{
if (theEdge.IsNull() || myIsFailed)
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <BRepMesh_IEdgeTool.hxx>
#include <BRepMesh_GeomTool.hxx>
#include <BRepMesh_FaceAttribute.hxx>
const Standard_Integer theNbIter);
private:
- N_HANDLE<BRepMesh_GeomTool> myTool;
- Handle(BRepAdaptor_HSurface) mySurface;
- BRepAdaptor_Curve myCOnS;
- Standard_Real mySquareEdgeDef;
+ NCollection_Handle<BRepMesh_GeomTool> myTool;
+ Handle(BRepAdaptor_HSurface) mySurface;
+ BRepAdaptor_Curve myCOnS;
+ Standard_Real mySquareEdgeDef;
};
DEFINE_STANDARD_HANDLE(BRepMesh_EdgeTessellator, BRepMesh_IEdgeTool)
IMPLEMENT_STANDARD_HANDLE (BRepMesh_FaceAttribute, Standard_Transient)
IMPLEMENT_STANDARD_RTTIEXT(BRepMesh_FaceAttribute, Standard_Transient)
+//=======================================================================
+//function : Constructor
+//purpose :
+//=======================================================================
+BRepMesh_FaceAttribute::BRepMesh_FaceAttribute()
+ : myDefFace (0.),
+ myUMin (0.),
+ myUMax (0.),
+ myVMin (0.),
+ myVMax (0.),
+ myDeltaX (1.),
+ myDeltaY (1.),
+ myStatus (BRepMesh_NoError),
+ myAllocator (new NCollection_IncAllocator(64000))
+{
+ init();
+}
+
//=======================================================================
//function : Constructor
//purpose :
//=======================================================================
BRepMesh_FaceAttribute::BRepMesh_FaceAttribute(
- const TopoDS_Face& theFace,
- BRepMeshCol::DMapOfVertexInteger& theBoundaryVertices,
- BRepMeshCol::DMapOfIntegerPnt& theBoundaryPoints)
+ const TopoDS_Face& theFace,
+ const BRepMesh::HDMapOfVertexInteger& theBoundaryVertices,
+ const BRepMesh::HDMapOfIntegerPnt& theBoundaryPoints)
: myDefFace (0.),
myUMin (0.),
myUMax (0.),
myStatus (BRepMesh_NoError),
myBoundaryVertices(theBoundaryVertices),
myBoundaryPoints (theBoundaryPoints),
+ myFace (theFace),
myAllocator (new NCollection_IncAllocator(64000))
{
- myVertexEdgeMap = new BRepMeshCol::IMapOfInteger;
- myInternalEdges = new BRepMeshCol::DMapOfShapePairOfPolygon;
- mySurfacePoints = new BRepMeshCol::DMapOfIntegerPnt;
- myClassifier = new BRepMesh_Classifier;
-
- myFace = theFace;
- BRepTools::Update(myFace);
- myFace.Orientation(TopAbs_FORWARD);
-
- BRepAdaptor_Surface aSurfAdaptor(myFace, Standard_False);
- mySurface = new BRepAdaptor_HSurface(aSurfAdaptor);
-
- ResetStructure();
+ init();
}
//=======================================================================
myAllocator.Nullify();
}
+//=======================================================================
+//function : init
+//purpose :
+//=======================================================================
+void BRepMesh_FaceAttribute::init()
+{
+ myVertexEdgeMap = new BRepMesh::IMapOfInteger;
+ myInternalEdges = new BRepMesh::DMapOfShapePairOfPolygon;
+ mySurfacePoints = new BRepMesh::DMapOfIntegerPnt;
+ myClassifier = new BRepMesh_Classifier;
+
+ if (!myFace.IsNull())
+ {
+ BRepTools::Update(myFace);
+ myFace.Orientation(TopAbs_FORWARD);
+
+ BRepAdaptor_Surface aSurfAdaptor(myFace, Standard_False);
+ mySurface = new BRepAdaptor_HSurface(aSurfAdaptor);
+ }
+
+ ResetStructure();
+}
+
//=======================================================================
//function : clearLocal
//purpose :
clearLocal();
myStructure = new BRepMesh_DataStructureOfDelaun(myAllocator);
- BRepTools::UVBounds(myFace, myUMin, myUMax, myVMin, myVMax);
+ if (!myFace.IsNull())
+ BRepTools::UVBounds(myFace, myUMin, myUMax, myVMin, myVMax);
+
Standard_Real aTolU = ToleranceU();
Standard_Real aTolV = ToleranceV();
const TopoDS_Vertex& theVertex,
Standard_Integer& theVertexIndex) const
{
- if (myBoundaryVertices.IsBound(theVertex))
- theVertexIndex = myBoundaryVertices.Find(theVertex);
+ if (!myBoundaryVertices.IsNull() && myBoundaryVertices->IsBound(theVertex))
+ theVertexIndex = myBoundaryVertices->Find(theVertex);
else if (mySurfaceVertices.IsBound(theVertex))
theVertexIndex = mySurfaceVertices.Find(theVertex);
else
gp_XY((thePoint2d.X() - myUMin) / myDeltaX, (thePoint2d.Y() - myVMin) / myDeltaY) :
gp_XY(thePoint2d.X() * myDeltaX + myUMin, thePoint2d.Y() * myDeltaY + myVMin);
}
+
+//=======================================================================
+//function : ToleranceU
+//purpose :
+//=======================================================================
+Standard_Real BRepMesh_FaceAttribute::ToleranceU() const
+{
+ return computeParametricTolerance(myUMin, myUMax);
+}
+
+//=======================================================================
+//function : ToleranceV
+//purpose :
+//=======================================================================
+Standard_Real BRepMesh_FaceAttribute::ToleranceV() const
+{
+ return computeParametricTolerance(myVMin, myVMax);
+}
#include <Standard_DefineHandle.hxx>
#include <BRepMesh_Status.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <BRepMesh_DataStructureOfDelaun.hxx>
#include <Handle_BRepAdaptor_HSurface.hxx>
{
public:
+ //! Default constructor.
+ Standard_EXPORT BRepMesh_FaceAttribute();
+
//! Constructor.
//! @param theFace face the attribute is created for.
//! Used for default initialization. Attribute keeps reference
//! @param theBoundaryVertices shared map of shape vertices.
//! @param theBoundaryPoints shared discretization points of shape boundaries.
Standard_EXPORT BRepMesh_FaceAttribute(
- const TopoDS_Face& theFace,
- BRepMeshCol::DMapOfVertexInteger& theBoundaryVertices,
- BRepMeshCol::DMapOfIntegerPnt& theBoundaryPoints);
+ const TopoDS_Face& theFace,
+ const BRepMesh::HDMapOfVertexInteger& theBoundaryVertices,
+ const BRepMesh::HDMapOfIntegerPnt& theBoundaryPoints);
//! Destructor.
- virtual ~BRepMesh_FaceAttribute();
+ Standard_EXPORT virtual ~BRepMesh_FaceAttribute();
public: //! @name main geometrical properties.
return mySurface;
}
+ //! Sets reference face.
+ inline void SetFace(const TopoDS_Face& theFace)
+ {
+ myFace = theFace;
+ }
+
//! Returns forward oriented face to be used for calculations.
inline const TopoDS_Face& Face() const
{
return myFace;
}
- //! Returns U tolerance of face calculated regarding its parameters.
- inline Standard_Real ToleranceU() const
+ //! Sets boundary vertices map.
+ inline void SetBoundaryVertices(const BRepMesh::HDMapOfVertexInteger& theVertices)
{
- return computeParametricTolerance(myUMin, myUMax);
+ myBoundaryVertices = theVertices;
}
- //! Returns V tolerance of face calculated regarding its parameters.
- inline Standard_Real ToleranceV() const
+ //! Sets boundary points map.
+ inline void SetBoundaryPoints(const BRepMesh::HDMapOfIntegerPnt& theBoundaryPoints)
{
- return computeParametricTolerance(myVMin, myVMax);
+ myBoundaryPoints = theBoundaryPoints;
}
+ //! Returns U tolerance of face calculated regarding its parameters.
+ Standard_EXPORT Standard_Real ToleranceU() const;
+
+ //! Returns V tolerance of face calculated regarding its parameters.
+ Standard_EXPORT Standard_Real ToleranceV() const;
+
//! Gives face deflection parameter.
inline Standard_Real GetDefFace() const
{
public: //! @name auxiliary structures
- //! Clear all face attribute.
- Standard_EXPORT void Clear();
-
//! Resets mesh data structure.
//! @returns reset data structure.
Standard_EXPORT Handle(BRepMesh_DataStructureOfDelaun)& ResetStructure();
//! Gives reference to map of internal edges of face.
- inline BRepMeshCol::HDMapOfShapePairOfPolygon& ChangeInternalEdges()
+ inline BRepMesh::HDMapOfShapePairOfPolygon& ChangeInternalEdges()
{
return myInternalEdges;
}
//! Gives reference to map of 2D points of discretization.
- inline BRepMeshCol::DMapOfIntegerListOfXY& ChangeLocation2D()
+ inline BRepMesh::DMapOfIntegerListOfXY& ChangeLocation2D()
{
return myLocation2D;
}
//! Gives reference to map of 3D points of discretization.
- inline BRepMeshCol::HDMapOfIntegerPnt& ChangeSurfacePoints()
+ inline BRepMesh::HDMapOfIntegerPnt& ChangeSurfacePoints()
{
return mySurfacePoints;
}
//! Gives reference on map of (vertex, edge) pairs of face.
- inline BRepMeshCol::HIMapOfInteger& ChangeVertexEdgeMap()
+ inline BRepMesh::HIMapOfInteger& ChangeVertexEdgeMap()
{
return myVertexEdgeMap;
}
}
//! Returns classifier.
- inline BRepMeshCol::HClassifier& ChangeClassifier()
+ inline BRepMesh::HClassifier& ChangeClassifier()
{
return myClassifier;
}
//! Gives the number of different locations in 3D space.
inline Standard_Integer LastPointId() const
{
- return myBoundaryPoints.Extent() + mySurfacePoints->Extent();
+ return (myBoundaryPoints.IsNull() ? 0 : myBoundaryPoints->Extent())
+ + mySurfacePoints->Extent();
}
//! Gives the 3D location of the vertex.
//! Gives the 3D location of the vertex.
inline const gp_Pnt& GetPoint(const Standard_Integer theIndex) const
{
- if (theIndex > myBoundaryPoints.Extent())
+ if (myBoundaryPoints.IsNull() || theIndex > myBoundaryPoints->Extent())
return mySurfacePoints->Find(theIndex);
- return myBoundaryPoints(theIndex);
+ return myBoundaryPoints->Find(theIndex);
}
//! Returns index of the given vertex if it exists in cache,
{
aNewVertexIndex = LastPointId() + 1;
- BRepMeshCol::DMapOfIntegerPnt& aPointsMap = isFillEdgeVertices ?
- myBoundaryPoints : *mySurfacePoints;
+ BRepMesh::DMapOfIntegerPnt& aPointsMap = isFillEdgeVertices ?
+ *myBoundaryPoints : *mySurfacePoints;
aPointsMap.Bind(aNewVertexIndex, theVertexExplorer->Point());
}
- BRepMeshCol::DMapOfVertexInteger& aVertexMap = isFillEdgeVertices ?
- myBoundaryVertices : mySurfaceVertices;
+ BRepMesh::DMapOfVertexInteger& aVertexMap = isFillEdgeVertices ?
+ *myBoundaryVertices : mySurfaceVertices;
aVertexMap.Bind(aVertex, aNewVertexIndex);
{
}
+ //! Initializes internal data structures.
+ void init();
+
//! Computes parametric tolerance of a face regarding the given limits.
Standard_Real computeParametricTolerance(
const Standard_Real theFirstParam,
Standard_Real myDeltaY;
Standard_Integer myStatus;
- BRepMeshCol::DMapOfVertexInteger& myBoundaryVertices;
- BRepMeshCol::DMapOfIntegerPnt& myBoundaryPoints;
+ BRepMesh::HDMapOfVertexInteger myBoundaryVertices;
+ BRepMesh::HDMapOfIntegerPnt myBoundaryPoints;
TopoDS_Face myFace;
Handle(BRepAdaptor_HSurface) mySurface;
- BRepMeshCol::DMapOfVertexInteger mySurfaceVertices;
- BRepMeshCol::HDMapOfIntegerPnt mySurfacePoints;
+ BRepMesh::DMapOfVertexInteger mySurfaceVertices;
+ BRepMesh::HDMapOfIntegerPnt mySurfacePoints;
- BRepMeshCol::DMapOfIntegerListOfXY myLocation2D;
- BRepMeshCol::HIMapOfInteger myVertexEdgeMap;
- BRepMeshCol::HDMapOfShapePairOfPolygon myInternalEdges;
+ BRepMesh::DMapOfIntegerListOfXY myLocation2D;
+ BRepMesh::HIMapOfInteger myVertexEdgeMap;
+ BRepMesh::HDMapOfShapePairOfPolygon myInternalEdges;
Handle(BRepMesh_DataStructureOfDelaun) myStructure;
- BRepMeshCol::HClassifier myClassifier;
- BRepMeshCol::Allocator myAllocator;
+ BRepMesh::HClassifier myClassifier;
+ Handle(NCollection_IncAllocator) myAllocator;
};
DEFINE_STANDARD_HANDLE(BRepMesh_FaceAttribute, Standard_Transient)
public:
//! Constructor
- //! \param isInParallel Flag indicates that face edges should be checked in parallel.
+ //! @param isInParallel Flag indicates that face edges should be checked in parallel.
BRepMesh_FaceChecker(const Standard_Boolean isInParallel)
: myIsFailed(Standard_False),
myIsInParallel(isInParallel)
}
//! Checker's body.
- //! \param theFace Face to be checked.
+ //! @param theFace Face to be checked.
void operator ()(const TopoDS_Face& theFace) const
{
if (theFace.IsNull() || myIsFailed)
myInParallel (isInParallel),
myRelative (theRelative),
myShapetrigu (theShapetrigu),
- myInshape (theInshape)
+ myInshape (theInshape),
+ myBoundaryVertices(new BRepMesh::DMapOfVertexInteger),
+ myBoundaryPoints(new BRepMesh::DMapOfIntegerPnt)
{
if ( myRelative )
BRepMesh_ShapeTool::BoxMaxDimension(theBox, myDtotale);
myInParallel (isInParallel),
myRelative (theRelative),
myShapetrigu (theShapetrigu),
- myInshape (theInshape)
+ myInshape (theInshape),
+ myBoundaryVertices(new BRepMesh::DMapOfVertexInteger),
+ myBoundaryPoints(new BRepMesh::DMapOfIntegerPnt)
{
if ( myRelative )
BRepMesh_ShapeTool::BoxMaxDimension(theBox, myDtotale);
if (!myWithShare)
{
myEdges.Clear();
- myBoundaryVertices.Clear();
- myBoundaryPoints.Clear();
+ myBoundaryVertices->Clear();
+ myBoundaryPoints->Clear();
}
Standard_Real defedge;
if (!myRelative)
defface = Max(myDeflection, maxdef);
- N_SEQUENCE<EdgePCurve> aPCurves;
- N_SEQUENCE<TopoDS_Edge> aFaceEdges;
+ NCollection_Sequence<EdgePCurve> aPCurves;
+ NCollection_Sequence<TopoDS_Edge> aFaceEdges;
const TopoDS_Face& aFace = myAttribute->Face();
const Handle(BRepAdaptor_HSurface)& gFace = myAttribute->Surface();
Standard_Real deltaY = 1.0;
{
- BRepMeshCol::HClassifier& aClassifier = myAttribute->ChangeClassifier();
+ BRepMesh::HClassifier& aClassifier = myAttribute->ChangeClassifier();
BRepMesh_WireChecker aDFaceChecker(aFace, Precision::PConfusion(),
myInternalEdges, myVertexEdgeMap, myStructure,
myumin, myumax, myvmin, myvmax, myInParallel );
for (Standard_Integer i = 2; i < aNodesNb; ++i)
{
const Standard_Integer aPointId = aNodes(i);
- gp_Pnt& aPnt = myBoundaryPoints(aPointId);
+ const gp_Pnt& aPnt = myBoundaryPoints->Find(aPointId);
const Standard_Real aParam = aProvider.Parameter(i, aPnt);
gp_Pnt2d aUV = thePCurve.Curve2d->Value(aParam);
gp_Pnt2d aUV;
Standard_Real aParam;
aEdgeTool->Value(i, aParam, aPnt, aUV);
- myBoundaryPoints.Bind(++aLastPointId, aPnt);
+ myBoundaryPoints->Bind(++aLastPointId, aPnt);
Standard_Integer iv2, isv;
myAttribute->AddNode(aLastPointId, aUV.Coord(), BRepMesh_Frontier, iv2, isv);
#include <TopAbs_ShapeEnum.hxx>
#include <BRepMesh_Triangle.hxx>
#include <BRepMesh_FaceAttribute.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <BRep_Tool.hxx>
#include <BRepMesh_ShapeTool.hxx>
return myInParallel;
}
- //! Gives the list of indices of the vertices <br>
- Standard_EXPORT void VerticesOfDomain(BRepMeshCol::MapOfInteger& Indices) const;
-
//! returns the deflection value. <br>
inline Standard_Real GetDeflection() const
{
//! Returns number of boundary 3d points.
inline Standard_Integer NbBoundaryPoints() const
{
- return myBoundaryPoints.Extent();
+ return myBoundaryPoints->Extent();
}
DEFINE_STANDARD_RTTI(BRepMesh_FastDiscret)
//! used for tessellation.
struct EdgeAttributes
{
- TopoDS_Vertex FirstVertex;
- TopoDS_Vertex LastVertex;
+ TopoDS_Vertex FirstVertex;
+ TopoDS_Vertex LastVertex;
- Standard_Real FirstParam;
- Standard_Real LastParam;
+ Standard_Real FirstParam;
+ Standard_Real LastParam;
- gp_Pnt2d FirstUV;
- gp_Pnt2d LastUV;
+ gp_Pnt2d FirstUV;
+ gp_Pnt2d LastUV;
- Standard_Boolean IsSameUV;
- Standard_Real MinDist;
+ Standard_Boolean IsSameUV;
+ Standard_Real MinDist;
- N_HANDLE<TopoDSVExplorer> FirstVExtractor;
- N_HANDLE<TopoDSVExplorer> LastVExtractor;
+ NCollection_Handle<TopoDSVExplorer> FirstVExtractor;
+ NCollection_Handle<TopoDSVExplorer> LastVExtractor;
};
//! Structure keeps geometrical parameters of edge's PCurve.
private:
- TopoDS_Face myFace;
- Standard_Real myAngle;
- Standard_Real myDeflection;
- Standard_Real myDtotale;
- Standard_Boolean myWithShare;
- Standard_Boolean myInParallel;
- BRepMeshCol::DMapOfShapePairOfPolygon myEdges;
- BRepMeshCol::DMapOfFaceAttribute myAttributes;
- Standard_Boolean myRelative;
- Standard_Boolean myShapetrigu;
- Standard_Boolean myInshape;
- TopTools_DataMapOfShapeReal myMapdefle;
+ TopoDS_Face myFace;
+ Standard_Real myAngle;
+ Standard_Real myDeflection;
+ Standard_Real myDtotale;
+ Standard_Boolean myWithShare;
+ Standard_Boolean myInParallel;
+ BRepMesh::DMapOfShapePairOfPolygon myEdges;
+ BRepMesh::DMapOfFaceAttribute myAttributes;
+ Standard_Boolean myRelative;
+ Standard_Boolean myShapetrigu;
+ Standard_Boolean myInshape;
+ TopTools_DataMapOfShapeReal myMapdefle;
// Data shared for whole shape
- BRepMeshCol::DMapOfVertexInteger myBoundaryVertices;
- BRepMeshCol::DMapOfIntegerPnt myBoundaryPoints;
+ BRepMesh::HDMapOfVertexInteger myBoundaryVertices;
+ BRepMesh::HDMapOfIntegerPnt myBoundaryPoints;
// Fast access to attributes of current face
- Handle(BRepMesh_FaceAttribute) myAttribute;
- Handle(BRepMesh_DataStructureOfDelaun) myStructure;
- BRepMeshCol::HIMapOfInteger myVertexEdgeMap;
- BRepMeshCol::HDMapOfShapePairOfPolygon myInternalEdges;
- TopTools_IndexedDataMapOfShapeListOfShape mySharedFaces;
+ Handle(BRepMesh_FaceAttribute) myAttribute;
+ Handle(BRepMesh_DataStructureOfDelaun) myStructure;
+ BRepMesh::HIMapOfInteger myVertexEdgeMap;
+ BRepMesh::HDMapOfShapePairOfPolygon myInternalEdges;
+ TopTools_IndexedDataMapOfShapeListOfShape mySharedFaces;
};
DEFINE_STANDARD_HANDLE(BRepMesh_FastDiscret, Standard_Transient)
const Standard_Real deltaX = myAttribute->GetDeltaX();
const Standard_Real deltaY = myAttribute->GetDeltaY();
- BRepMeshCol::Array1OfInteger tabvert_corr(1, nbVertices);
+ BRepMesh::Array1OfInteger tabvert_corr(1, nbVertices);
// Check the necessity to fill the map of parameters
const Standard_Boolean useUVParam = (thetype == GeomAbs_Torus ||
aPnt2d = myAttribute->Scale(aPnt2d, Standard_True);
BRepMesh_Vertex v_new(aPnt2d, v.Location3d(), v.Movability());
- const BRepMeshCol::ListOfInteger& alist = myStructure->LinksConnectedTo(i);
+ const BRepMesh::ListOfInteger& alist = myStructure->LinksConnectedTo(i);
aMoveNodes.Add(v_new, alist);
tabvert_corr(i) = i;
}
Standard_Real aDef = -1;
if ( !isaline && myStructure->ElementsOfDomain().Extent() > 0 )
{
- BRepMeshCol::ListOfVertex aNewVertices;
+ BRepMesh::ListOfVertex aNewVertices;
if ( !rajout )
{
aDef = control(aNewVertices, trigu, Standard_True);
const BRepMesh_Vertex& v = myStructure->GetNode(i);
gp_XY aPnt2d = myAttribute->Scale(v.Coord(), Standard_False);
BRepMesh_Vertex v_new(aPnt2d, v.Location3d(), v.Movability());
- const BRepMeshCol::ListOfInteger& alist = myStructure->LinksConnectedTo(i);
+ const BRepMesh::ListOfInteger& alist = myStructure->LinksConnectedTo(i);
aMoveNodes.Add(v_new, alist);
// Register internal nodes used in triangulation
//purpose :
//=======================================================================
Standard_Boolean BRepMesh_FastDiscretFace::addVerticesToMesh(
- const BRepMeshCol::ListOfVertex& theVertices,
- BRepMesh_Delaun& theMeshBuilder)
+ const BRepMesh::ListOfVertex& theVertices,
+ BRepMesh_Delaun& theMeshBuilder)
{
if (theVertices.IsEmpty())
return Standard_False;
- BRepMeshCol::Array1OfVertexOfDelaun aArrayOfNewVertices(1, theVertices.Extent());
- BRepMeshCol::ListOfVertex::Iterator aVertexIt(theVertices);
+ BRepMesh::Array1OfVertexOfDelaun aArrayOfNewVertices(1, theVertices.Extent());
+ BRepMesh::ListOfVertex::Iterator aVertexIt(theVertices);
for (Standard_Integer aVertexId = 0; aVertexIt.More(); aVertexIt.Next())
aArrayOfNewVertices(++aVertexId) = aVertexIt.Value();
//function : insertInternalVertices
//purpose :
//=======================================================================
-static void filterParameters(const BRepMeshCol::IMapOfReal& theParams,
- const Standard_Real theMinDist,
- const Standard_Real theFilterDist,
- BRepMeshCol::SequenceOfReal& theResult)
+static void filterParameters(const BRepMesh::IMapOfReal& theParams,
+ const Standard_Real theMinDist,
+ const Standard_Real theFilterDist,
+ BRepMesh::SequenceOfReal& theResult)
{
// Sort sequence of parameters
- BRepMeshCol::SequenceOfReal aParamTmp;
+ BRepMesh::SequenceOfReal aParamTmp;
Standard_Integer aParamLength = 1;
const Standard_Integer anInitLen = theParams.Extent();
}
void BRepMesh_FastDiscretFace::insertInternalVertices(
- BRepMeshCol::ListOfVertex& theNewVertices,
- BRepMesh_Delaun& theMeshBuilder)
+ BRepMesh::ListOfVertex& theNewVertices,
+ BRepMesh_Delaun& theMeshBuilder)
{
const Handle(BRepAdaptor_HSurface)& gFace = myAttribute->Surface();
switch (gFace->GetType())
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::insertInternalVerticesSphere(
- BRepMeshCol::ListOfVertex& theNewVertices)
+ BRepMesh::ListOfVertex& theNewVertices)
{
const Standard_Real umax = myAttribute->GetUMax();
const Standard_Real umin = myAttribute->GetUMin();
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::insertInternalVerticesCylinder(
- BRepMeshCol::ListOfVertex& theNewVertices)
+ BRepMesh::ListOfVertex& theNewVertices)
{
const Standard_Real umax = myAttribute->GetUMax();
const Standard_Real umin = myAttribute->GetUMin();
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::insertInternalVerticesCone(
- BRepMeshCol::ListOfVertex& theNewVertices)
+ BRepMesh::ListOfVertex& theNewVertices)
{
const Standard_Real umax = myAttribute->GetUMax();
const Standard_Real umin = myAttribute->GetUMin();
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::insertInternalVerticesTorus(
- BRepMeshCol::ListOfVertex& theNewVertices)
+ BRepMesh::ListOfVertex& theNewVertices)
{
const Standard_Real umax = myAttribute->GetUMax();
const Standard_Real umin = myAttribute->GetUMin();
Standard_Real pp, pasu, pasv;
Standard_Real r = T.MinorRadius(), R = T.MajorRadius();
- BRepMeshCol::SequenceOfReal ParamU, ParamV;
+ BRepMesh::SequenceOfReal ParamU, ParamV;
Standard_Real Du, Dv;//, pasu, pasv;
Dv = Max(1.0e0 - (aDefFace / r), 0.0e0);
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::insertInternalVerticesBSpline(
- BRepMeshCol::ListOfVertex& theNewVertices)
+ BRepMesh::ListOfVertex& theNewVertices)
{
const Standard_Real aRange[2][2] = {
{ myAttribute->GetUMax(), myAttribute->GetUMin() },
const Standard_Real aDefFace = myAttribute->GetDefFace();
const Handle(BRepAdaptor_HSurface)& gFace = myAttribute->Surface();
- BRepMeshCol::SequenceOfReal aParams[2];
+ BRepMesh::SequenceOfReal aParams[2];
for (Standard_Integer i = 0; i < 2; ++i)
{
Standard_Boolean isU = (i == 0);
const Standard_Real aSqPrecision = aPrecision * aPrecision;
for (Standard_Integer k = 0; k < 2; ++k)
{
- BRepMeshCol::SequenceOfReal& aParams1 = aParams[k];
- BRepMeshCol::SequenceOfReal& aParams2 = aParams[(k + 1) % 2];
+ BRepMesh::SequenceOfReal& aParams1 = aParams[k];
+ BRepMesh::SequenceOfReal& aParams2 = aParams[(k + 1) % 2];
const Standard_Boolean isU = (k == 0);
Standard_Integer aStartIndex, aEndIndex;
if (isU)
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::insertInternalVerticesOther(
- BRepMeshCol::ListOfVertex& theNewVertices)
+ BRepMesh::ListOfVertex& theNewVertices)
{
const Standard_Real aAngle = 0.35;
const Standard_Real aRange[2][2] = {
const Standard_Real aDefFace = myAttribute->GetDefFace();
const Handle(BRepAdaptor_HSurface)& gFace = myAttribute->Surface();
- BRepMeshCol::SequenceOfReal aParams[2];
+ BRepMesh::SequenceOfReal aParams[2];
const Standard_Integer aIsoPointsNb = 11;
for (Standard_Integer k = 0; k < 2; ++k)
{
}
}
- BRepMeshCol::SequenceOfReal& aParams2 = aParams[aOtherParamsIndex];
- GCPnts_TangentialDeflection& aDIso = aDiscretIso[aMaxIndex];
+ BRepMesh::SequenceOfReal& aParams2 = aParams[aOtherParamsIndex];
+ GCPnts_TangentialDeflection& aDIso = aDiscretIso[aMaxIndex];
for (Standard_Integer i = 1; i <= aMaxPointsNb; ++i)
aParams2.Append(aDIso.Parameter(i));
//purpose :
//=======================================================================
Standard_Real BRepMesh_FastDiscretFace::control(
- BRepMeshCol::ListOfVertex& theNewVertices,
- BRepMesh_Delaun& theTrigu,
- const Standard_Boolean theIsFirst)
+ BRepMesh::ListOfVertex& theNewVertices,
+ BRepMesh_Delaun& theTrigu,
+ const Standard_Boolean theIsFirst)
#define CHECK_DEF_AND_INSERT_CURRENT(isSkipped) \
if (aSqDef > aMaxSqDef) \
aBSpline = gFace->BSpline();
NCollection_DataMap<Standard_Integer, gp_Dir> aNorMap;
- BRepMeshCol::MapOfIntegerInteger aStatMap;
+ BRepMesh::MapOfIntegerInteger aStatMap;
NCollection_Map<BRepMesh_OrientedEdge> aCouples(3 * aTrianglesNb);
// Perform refinement passes
break;
// Iterate on current triangles
- const BRepMeshCol::MapOfInteger& aTriangles = myStructure->ElementsOfDomain();
- BRepMeshCol::MapOfInteger::Iterator aTriangleIt(aTriangles);
+ const BRepMesh::MapOfInteger& aTriangles = myStructure->ElementsOfDomain();
+ BRepMesh::MapOfInteger::Iterator aTriangleIt(aTriangles);
for (; aTriangleIt.More(); aTriangleIt.Next())
{
const Standard_Integer aTriangleId = aTriangleIt.Key();
gp_Pnt2d aPnt2d = BRep_Tool::Parameters(theVertex, myAttribute->Face());
- N_HANDLE<FixedVExplorer> aFixedVExplorer = new FixedVExplorer(theVertex);
+ NCollection_Handle<FixedVExplorer> aFixedVExplorer = new FixedVExplorer(theVertex);
Standard_Integer aIndex = myAttribute->GetVertexIndex(aFixedVExplorer);
gp_XY anUV = BRepMesh_ShapeTool::FindUV(aIndex, aPnt2d,
theVertex, BRep_Tool::Tolerance(theVertex), myAttribute);
//purpose :
//=======================================================================
void BRepMesh_FastDiscretFace::insertVertex(
- const gp_Pnt& thePnt3d,
- const gp_XY& theUV,
- BRepMeshCol::ListOfVertex& theVertices)
+ const gp_Pnt& thePnt3d,
+ const gp_XY& theUV,
+ BRepMesh::ListOfVertex& theVertices)
{
Standard_Integer aNbLocat = myAttribute->LastPointId();
mySurfacePoints->Bind(++aNbLocat, thePnt3d);
#include <Standard_DefineHandle.hxx>
#include <BRepMesh_FastDiscretFace.hxx>
#include <BRepMesh_DataStructureOfDelaun.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <BRepMesh_FaceAttribute.hxx>
#include <Standard_Transient.hxx>
#include <TopTools_MutexForShapeProvider.hxx>
class BRepMesh_FastDiscretFace : public Standard_Transient
{
public:
-
-
- Standard_EXPORT BRepMesh_FastDiscretFace(const Standard_Real theAngle,
- const Standard_Boolean theWithShare = Standard_True);
+
+ Standard_EXPORT BRepMesh_FastDiscretFace(
+ const Standard_Real theAngle,
+ const Standard_Boolean theWithShare = Standard_True);
Standard_EXPORT void Add(const Handle(BRepMesh_FaceAttribute)& theAttribute);
- //! Gives the triangle of <Index>. <br>
- Standard_EXPORT const BRepMesh_Triangle& Triangle(const Standard_Integer theIndex) const;
-
DEFINE_STANDARD_RTTI(BRepMesh_FastDiscretFace)
private:
void add(const TopoDS_Vertex& theVertex);
- Standard_Real control(BRepMeshCol::ListOfVertex& theNewVertices,
- BRepMesh_Delaun& theMeshBuilder,
- const Standard_Boolean theIsFirst);
+ Standard_Real control(BRepMesh::ListOfVertex& theNewVertices,
+ BRepMesh_Delaun& theMeshBuilder,
+ const Standard_Boolean theIsFirst);
//! Registers the given nodes in mesh data structure and
//! performs refinement of existing mesh.
//! in respect to inserting nodes.
//! @return TRUE if vertices were been inserted, FALSE elewhere.
Standard_Boolean addVerticesToMesh(
- const BRepMeshCol::ListOfVertex& theVertices,
- BRepMesh_Delaun& theMeshBuilder);
+ const BRepMesh::ListOfVertex& theVertices,
+ BRepMesh_Delaun& theMeshBuilder);
//! Calculates nodes lying on face's surface and inserts them to a mesh.
//! @param theNewVertices list of vertices to be extended and added to mesh.
//! @param theMeshBuilder initialized tool refining mesh
//! in respect to inserting nodes.
- void insertInternalVertices(BRepMeshCol::ListOfVertex& theNewVertices,
- BRepMesh_Delaun& theMeshBuilder);
+ void insertInternalVertices(BRepMesh::ListOfVertex& theNewVertices,
+ BRepMesh_Delaun& theMeshBuilder);
//! Calculates nodes lying on spherical surface.
//! @param theNewVertices list of vertices to be extended and added to mesh.
- void insertInternalVerticesSphere(BRepMeshCol::ListOfVertex& theNewVertices);
+ void insertInternalVerticesSphere(BRepMesh::ListOfVertex& theNewVertices);
//! Calculates nodes lying on cylindrical surface.
//! @param theNewVertices list of vertices to be extended and added to mesh.
- void insertInternalVerticesCylinder(BRepMeshCol::ListOfVertex& theNewVertices);
+ void insertInternalVerticesCylinder(BRepMesh::ListOfVertex& theNewVertices);
//! Calculates nodes lying on conical surface.
//! @param theNewVertices list of vertices to be extended and added to mesh.
- void insertInternalVerticesCone(BRepMeshCol::ListOfVertex& theNewVertices);
+ void insertInternalVerticesCone(BRepMesh::ListOfVertex& theNewVertices);
//! Calculates nodes lying on toroidal surface.
//! @param theNewVertices list of vertices to be extended and added to mesh.
- void insertInternalVerticesTorus(BRepMeshCol::ListOfVertex& theNewVertices);
+ void insertInternalVerticesTorus(BRepMesh::ListOfVertex& theNewVertices);
//! Calculates nodes lying on Bezier/BSpline surface.
//! @param theNewVertices list of vertices to be extended and added to mesh.
- void insertInternalVerticesBSpline(BRepMeshCol::ListOfVertex& theNewVertices);
+ void insertInternalVerticesBSpline(BRepMesh::ListOfVertex& theNewVertices);
//! Calculates nodes lying on custom-type surface.
//! @param theNewVertices list of vertices to be extended and added to mesh.
- void insertInternalVerticesOther(BRepMeshCol::ListOfVertex& theNewVertices);
+ void insertInternalVerticesOther(BRepMesh::ListOfVertex& theNewVertices);
//! Template method trying to insert new internal vertex corresponded to
//! the given 2d point. Calculates 3d position analytically using the given
//! @param theAnalyticSurface analytic surface to calculate 3d point.
//! @param[out] theVertices list of vertices to be updated.
template<class AnalyticSurface>
- void tryToInsertAnalyticVertex(const gp_Pnt2d& thePnt2d,
- const AnalyticSurface& theAnalyticSurface,
- BRepMeshCol::ListOfVertex& theVertices)
+ void tryToInsertAnalyticVertex(const gp_Pnt2d& thePnt2d,
+ const AnalyticSurface& theAnalyticSurface,
+ BRepMesh::ListOfVertex& theVertices)
{
if (!myClassifier->Perform(thePnt2d) == TopAbs_IN)
return;
//! @param thePnt3d 3d point corresponded to the vertex.
//! @param theUV UV point corresponded to the vertex.
//! @param[out] theVertices list of vertices to be updated.
- void insertVertex(const gp_Pnt& thePnt3d,
- const gp_XY& theUV,
- BRepMeshCol::ListOfVertex& theVertices);
+ void insertVertex(const gp_Pnt& thePnt3d,
+ const gp_XY& theUV,
+ BRepMesh::ListOfVertex& theVertices);
private:
- Standard_Real myAngle;
- Standard_Boolean myWithShare;
- Standard_Boolean myInternalVerticesMode;
- BRepMeshCol::IMapOfReal myUParam;
- BRepMeshCol::IMapOfReal myVParam;
- BRepMeshCol::Allocator myAllocator;
+ Standard_Real myAngle;
+ Standard_Boolean myWithShare;
+ Standard_Boolean myInternalVerticesMode;
+ BRepMesh::IMapOfReal myUParam;
+ BRepMesh::IMapOfReal myVParam;
+ Handle(NCollection_IncAllocator) myAllocator;
// Fast access to attributes of current face
- Handle(BRepMesh_FaceAttribute) myAttribute;
- Handle(BRepMesh_DataStructureOfDelaun) myStructure;
- BRepMeshCol::HIMapOfInteger myVertexEdgeMap;
- BRepMeshCol::HClassifier myClassifier;
- BRepMeshCol::HDMapOfIntegerPnt mySurfacePoints;
+ Handle(BRepMesh_FaceAttribute) myAttribute;
+ Handle(BRepMesh_DataStructureOfDelaun) myStructure;
+ BRepMesh::HIMapOfInteger myVertexEdgeMap;
+ BRepMesh::HClassifier myClassifier;
+ BRepMesh::HDMapOfIntegerPnt mySurfacePoints;
};
DEFINE_STANDARD_HANDLE (BRepMesh_FastDiscretFace, Standard_Transient)
//! Constructor.
//! Initiates discretization of the given geometric curve.
- //! \param theCurve curve to be discretized.
- //! \param theFirstParam first parameter of the curve.
- //! \param theLastParam last parameter of the curve.
- //! \param theLinDeflection linear deflection.
- //! \param theAngDeflection angular deflection.
- //! \param theMinPointsNb minimum nuber of points to be produced.
+ //! @param theCurve curve to be discretized.
+ //! @param theFirstParam first parameter of the curve.
+ //! @param theLastParam last parameter of the curve.
+ //! @param theLinDeflection linear deflection.
+ //! @param theAngDeflection angular deflection.
+ //! @param theMinPointsNb minimum nuber of points to be produced.
Standard_EXPORT BRepMesh_GeomTool(const BRepAdaptor_Curve& theCurve,
const Standard_Real theFirstParam,
const Standard_Real theLastParam,
//! Constructor.
//! Initiates discretization of geometric curve corresponding
//! to iso curve of the given surface.
- //! \param theSurface surface the iso curve to be taken from.
- //! \param theIsoType type of iso curve to be used, U or V.
- //! \param theParamIso parameter on the surface specifying the iso curve.
- //! \param theFirstParam first parameter of the curve.
- //! \param theLastParam last parameter of the curve.
- //! \param theLinDeflection linear deflection.
- //! \param theAngDeflection angular deflection.
- //! \param theMinPointsNb minimum nuber of points to be produced.
+ //! @param theSurface surface the iso curve to be taken from.
+ //! @param theIsoType type of iso curve to be used, U or V.
+ //! @param theParamIso parameter on the surface specifying the iso curve.
+ //! @param theFirstParam first parameter of the curve.
+ //! @param theLastParam last parameter of the curve.
+ //! @param theLinDeflection linear deflection.
+ //! @param theAngDeflection angular deflection.
+ //! @param theMinPointsNb minimum nuber of points to be produced.
Standard_EXPORT BRepMesh_GeomTool(const Handle(BRepAdaptor_HSurface)& theSurface,
const GeomAbs_IsoType theIsoType,
const Standard_Real theParamIso,
const Standard_Integer theMinPointsNb = 2);
//! Adds point to already calculated points (or replaces existing).
- //! \param thePoint point to be added.
- //! \param theParam parameter on the curve corresponding to the given point.
- //! \param theIsReplace if TRUE replaces existing point lying within
+ //! @param thePoint point to be added.
+ //! @param theParam parameter on the curve corresponding to the given point.
+ //! @param theIsReplace if TRUE replaces existing point lying within
//! parameteric tolerance of the given point.
- //! \return index of new added point or found with parametric tolerance
+ //! @return index of new added point or found with parametric tolerance
inline Standard_Integer AddPoint(const gp_Pnt& thePoint,
const Standard_Real theParam,
const Standard_Boolean theIsReplace = Standard_True)
}
//! Gets parameters of discretization point with the given index.
- //! \param theIndex index of discretization point.
- //! \param theIsoParam parameter on surface to be used as second coordinate
+ //! @param theIndex index of discretization point.
+ //! @param theIsoParam parameter on surface to be used as second coordinate
//! of resulting 2d point.
- //! \param theParam[out] parameter of the point on the iso curve.
- //! \param thePoint[out] discretization point.
- //! \param theUV[out] discretization point in parametric space of the surface.
- //! \return TRUE on success, FALSE elsewhere.
+ //! @param theParam[out] parameter of the point on the iso curve.
+ //! @param thePoint[out] discretization point.
+ //! @param theUV[out] discretization point in parametric space of the surface.
+ //! @return TRUE on success, FALSE elsewhere.
Standard_EXPORT Standard_Boolean Value(const Standard_Integer theIndex,
const Standard_Real theIsoParam,
Standard_Real& theParam,
gp_Pnt2d& theUV) const;
//! Gets parameters of discretization point with the given index.
- //! \param theIndex index of discretization point.
- //! \param theSurface surface the curve is lying onto.
- //! \param theParam[out] parameter of the point on the curve.
- //! \param thePoint[out] discretization point.
- //! \param theUV[out] discretization point in parametric space of the surface.
- //! \return TRUE on success, FALSE elsewhere.
+ //! @param theIndex index of discretization point.
+ //! @param theSurface surface the curve is lying onto.
+ //! @param theParam[out] parameter of the point on the curve.
+ //! @param thePoint[out] discretization point.
+ //! @param theUV[out] discretization point in parametric space of the surface.
+ //! @return TRUE on success, FALSE elsewhere.
Standard_EXPORT Standard_Boolean Value(const Standard_Integer theIndex,
const Handle(BRepAdaptor_HSurface)& theSurface,
Standard_Real& theParam,
gp_Pnt& thePoint,
gp_Pnt2d& theUV) const;
-public: //! \name static API
-
- //! \param theSurface surface the nomal should be found for.
- //! \param theParamU U parameter in parametric space of the surface.
- //! \param theParamV V parameter in parametric space of the surface.
- //! \param[out] thePoint 3d point corresponding to the given parameters.
- //! \param[out] theNormal normal vector at the point specified by the parameters.
- //! \return FALSE if the normal can not be computed, TRUE elsewhere.
+public: //! @name static API
+
+ //! @param theSurface surface the nomal should be found for.
+ //! @param theParamU U parameter in parametric space of the surface.
+ //! @param theParamV V parameter in parametric space of the surface.
+ //! @param[out] thePoint 3d point corresponding to the given parameters.
+ //! @param[out] theNormal normal vector at the point specified by the parameters.
+ //! @return FALSE if the normal can not be computed, TRUE elsewhere.
static Standard_Boolean Normal(const Handle(BRepAdaptor_HSurface)& theSurface,
const Standard_Real theParamU,
const Standard_Real theParamV,
gp_Dir& theNormal);
//! Checks intersection between two lines defined by two points.
- //! \param theStartPnt1 start point of first line.
- //! \param theEndPnt1 end point of first line.
- //! \param theStartPnt2 start point of second line.
- //! \param theEndPnt2 end point of second line.
- //! \param[out] theIntPnt point of intersection.
- //! \param[out] theParamOnSegment parameters of intersection point
+ //! @param theStartPnt1 start point of first line.
+ //! @param theEndPnt1 end point of first line.
+ //! @param theStartPnt2 start point of second line.
+ //! @param theEndPnt2 end point of second line.
+ //! @param[out] theIntPnt point of intersection.
+ //! @param[out] theParamOnSegment parameters of intersection point
//! corresponding to first and second segment.
- //! \return status of intersection check.
+ //! @return status of intersection check.
static IntFlag IntLinLin(const gp_XY& theStartPnt1,
const gp_XY& theEndPnt1,
const gp_XY& theStartPnt2,
//! Checks intersection between the two segments.
//! Checks that intersection point lies within ranges of both segments.
- //! \param theStartPnt1 start point of first segment.
- //! \param theEndPnt1 end point of first segment.
- //! \param theStartPnt2 start point of second segment.
- //! \param theEndPnt2 end point of second segment.
- //! \param isConsiderEndPointTouch if TRUE EndPointTouch status will be
+ //! @param theStartPnt1 start point of first segment.
+ //! @param theEndPnt1 end point of first segment.
+ //! @param theStartPnt2 start point of second segment.
+ //! @param theEndPnt2 end point of second segment.
+ //! @param isConsiderEndPointTouch if TRUE EndPointTouch status will be
//! returned in case if segments are touching by end points, if FALSE
//! returns NoIntersection flag.
- //! \param isConsiderPointOnSegment if TRUE PointOnSegment status will be
+ //! @param isConsiderPointOnSegment if TRUE PointOnSegment status will be
//! returned in case if end point of one segment lies onto another one,
//! if FALSE returns NoIntersection flag.
- //! \param[out] theIntPnt point of intersection.
- //! \return status of intersection check.
+ //! @param[out] theIntPnt point of intersection.
+ //! @return status of intersection check.
static IntFlag IntSegSeg(const gp_XY& theStartPnt1,
const gp_XY& theEndPnt1,
const gp_XY& theStartPnt2,
private:
//! Classifies the point in case of coincidence of two vectors.
- //! \param thePoint1 the start point of a segment (base point).
- //! \param thePoint2 the end point of a segment.
- //! \param thePointToCheck the point to classify.
- //! \return zero value if point is out of segment and non zero value
+ //! @param thePoint1 the start point of a segment (base point).
+ //! @param thePoint2 the end point of a segment.
+ //! @param thePointToCheck the point to classify.
+ //! @return zero value if point is out of segment and non zero value
//! if point is between the first and the second point of segment.
static Standard_Integer classifyPoint (const gp_XY& thePoint1,
const gp_XY& thePoint2,
}
if (!myEmptyEdges.IsBound(theEdge))
- myEmptyEdges.Bind(theEdge, BRepMeshCol::MapOfTriangulation());
+ myEmptyEdges.Bind(theEdge, BRepMesh::MapOfTriangulation());
if (!aTriangulation.IsNull())
myEmptyEdges(theEdge).Add(aTriangulation);
if (!myEmptyEdges.IsBound(aEdge))
continue;
- BRepMeshCol::MapOfTriangulation& aTriMap = myEmptyEdges(aEdge);
+ BRepMesh::MapOfTriangulation& aTriMap = myEmptyEdges(aEdge);
isEdgesConsistent &= !aTriMap.IsEmpty() && !aTriMap.Contains(aTriangulation);
}
if (aStatus != BRepMesh_ReMesh)
return;
- BRepMeshCol::MapOfShape aUsedFaces;
+ BRepMesh::MapOfShape aUsedFaces;
aUsedFaces.Add(theFace);
const TopTools_IndexedDataMapOfShapeListOfShape& aMapOfSharedFaces =
OCC_CATCH_SIGNALS
Handle(BRepMesh_DataStructureOfDelaun)& aStructure = aFaceAttribute->ChangeStructure();
- const BRepMeshCol::MapOfInteger& aTriangles = aStructure->ElementsOfDomain();
+ const BRepMesh::MapOfInteger& aTriangles = aStructure->ElementsOfDomain();
if (aTriangles.IsEmpty())
return;
- BRepMeshCol::HIMapOfInteger& aVetrexEdgeMap = aFaceAttribute->ChangeVertexEdgeMap();
+ BRepMesh::HIMapOfInteger& aVetrexEdgeMap = aFaceAttribute->ChangeVertexEdgeMap();
// Store triangles
Standard_Integer aVerticesNb = aVetrexEdgeMap->Extent();
Poly_Array1OfTriangle& aPolyTrianges = aNewTriangulation->ChangeTriangles();
Standard_Integer aTriangeId = 1;
- BRepMeshCol::MapOfInteger::Iterator aTriIt(aTriangles);
+ BRepMesh::MapOfInteger::Iterator aTriIt(aTriangles);
for (; aTriIt.More(); aTriIt.Next())
{
const BRepMesh_Triangle& aCurElem = aStructure->GetElement(aTriIt.Key());
BRepMesh_ShapeTool::AddInFace(aFace, aNewTriangulation);
// Store discretization of edges
- BRepMeshCol::HDMapOfShapePairOfPolygon& aInternalEdges = aFaceAttribute->ChangeInternalEdges();
- BRepMeshCol::DMapOfShapePairOfPolygon::Iterator aEdgeIt(*aInternalEdges);
+ BRepMesh::HDMapOfShapePairOfPolygon& aInternalEdges = aFaceAttribute->ChangeInternalEdges();
+ BRepMesh::DMapOfShapePairOfPolygon::Iterator aEdgeIt(*aInternalEdges);
for (; aEdgeIt.More(); aEdgeIt.Next())
{
const TopoDS_Edge& aEdge = TopoDS::Edge(aEdgeIt.Key());
#include <TopTools_DataMapOfShapeReal.hxx>
#include <BRepMesh_DiscretRoot.hxx>
#include <Handle_Poly_Triangulation.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <vector>
//! correctly triangulated parts
class BRepMesh_IncrementalMesh : public BRepMesh_DiscretRoot
{
-public: //! \name mesher API
+public: //! @name mesher API
//! Default constructor
Standard_EXPORT BRepMesh_IncrementalMesh();
//! Constructor.
//! Automatically calls method Perform.
- //! \param theShape shape to be meshed.
- //! \param theLinDeflection linear deflection.
- //! \param isRelative if TRUE deflection used for discretization of
+ //! @param theShape shape to be meshed.
+ //! @param theLinDeflection linear deflection.
+ //! @param isRelative if TRUE deflection used for discretization of
//! each edge will be <theLinDeflection> * <size of edge>. Deflection
//! used for the faces will be the maximum deflection of their edges.
- //! \param theAngDeflection angular deflection.
- //! \param isInParallel if TRUE shape will be meshed in parallel.
+ //! @param theAngDeflection angular deflection.
+ //! @param isInParallel if TRUE shape will be meshed in parallel.
Standard_EXPORT BRepMesh_IncrementalMesh(
const TopoDS_Shape& theShape,
const Standard_Real theLinDeflection,
//! Performs meshing ot the shape.
Standard_EXPORT virtual void Perform();
-public: //! \name accessing to parameters.
+public: //! @name accessing to parameters.
//! Enables using relative deflection.
- //! \param isRelative if TRUE deflection used for discretization of
+ //! @param isRelative if TRUE deflection used for discretization of
//! each edge will be <theLinDeflection> * <size of edge>. Deflection
//! used for the faces will be the maximum deflection of their edges.
inline void SetRelative(const Standard_Boolean isRelative)
return myInParallel;
}
-public: //! \name plugin API
+public: //! @name plugin API
//! Plugin interface for the Mesh Factories.
//! Initializes meshing algorithm with the given parameters.
- //! \param theShape shape to be meshed.
- //! \param theLinDeflection linear deflection.
- //! \param theAngDeflection angular deflection.
- //! \param[out] theAlgo pointer to initialized algorithm.
+ //! @param theShape shape to be meshed.
+ //! @param theLinDeflection linear deflection.
+ //! @param theAngDeflection angular deflection.
+ //! @param[out] theAlgo pointer to initialized algorithm.
Standard_EXPORT static Standard_Integer Discret(const TopoDS_Shape& theShape,
const Standard_Real theLinDeflection,
const Standard_Real theAngDeflection,
//! i.e. PolygonOnTriangulation of particular edge connected
//! to the same Triangulation data structure as stored inside
//! a parent face.
- //! \return TRUE on success, FALSE in case of inconsistencies.
+ //! @return TRUE on success, FALSE in case of inconsistencies.
Standard_Boolean isCorrectPolyData();
//! Builds the incremental mesh for the shape.
//! Checks triangulation of the given face for consistency
//! with the chosen tolerance. If some edge of face has no
//! discrete representation triangulation will be calculated.
- //! \param theFace face to be checked.
+ //! @param theFace face to be checked.
void update(const TopoDS_Face& theFace);
//! Checks discretization of the given edge for consistency
//! with the chosen tolerance.
- //! \param theEdge edge to be checked.
+ //! @param theEdge edge to be checked.
void update(const TopoDS_Edge& theEdge);
//! Collects faces suitable for meshing.
void discretizeFreeEdges();
//! Returns deflection of the given edge.
- //! \param theEdge edge which tolerance should be taken.
+ //! @param theEdge edge which tolerance should be taken.
Standard_Real edgeDeflection(const TopoDS_Edge& theEdge);
//! Returns deflection of the given face.
//! Prepares the given face for meshing.
//! Nullifies triangulation of face and polygons of face's edges.
- //! \param theFace face to be checked.
- //! \param isWithCheck if TRUE, checks parameters of triangulation
+ //! @param theFace face to be checked.
+ //! @param isWithCheck if TRUE, checks parameters of triangulation
//! existing in face. If its deflection satisfies the given value and
//! each edge of face has polygon corresponded to this triangulation,
//! method return FALSE.
- //! \return TRUE in case if the given face should be meshed.
+ //! @return TRUE in case if the given face should be meshed.
Standard_Boolean toBeMeshed(const TopoDS_Face& theFace,
const Standard_Boolean isWithCheck);
protected:
- Standard_Boolean myRelative;
- Standard_Boolean myInParallel;
- BRepMeshCol::DMapOfEdgeListOfTriangulation myEmptyEdges;
- Handle(BRepMesh_FastDiscret) myMesh;
- Standard_Boolean myModified;
- TopTools_DataMapOfShapeReal myEdgeDeflection;
- Standard_Real myMaxShapeSize;
- Standard_Integer myStatus;
- std::vector<TopoDS_Face> myFaces;
+ Standard_Boolean myRelative;
+ Standard_Boolean myInParallel;
+ BRepMesh::DMapOfEdgeListOfTriangulation myEmptyEdges;
+ Handle(BRepMesh_FastDiscret) myMesh;
+ Standard_Boolean myModified;
+ TopTools_DataMapOfShapeReal myEdgeDeflection;
+ Standard_Real myMaxShapeSize;
+ Standard_Integer myStatus;
+ std::vector<TopoDS_Face> myFaces;
};
DEFINE_STANDARD_HANDLE(BRepMesh_IncrementalMesh,BRepMesh_DiscretRoot)
--- /dev/null
+// Copyright (c) 2013 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _BRepMesh_OrientedEdge_HeaderFile
+#define _BRepMesh_OrientedEdge_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Macro.hxx>
+#include <BRepMesh_DegreeOfFreedom.hxx>
+
+//! Light weighted structure representing simple link.
+class BRepMesh_OrientedEdge
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ //! Default constructor.
+ Standard_EXPORT BRepMesh_OrientedEdge()
+ : myFirstNode(-1),
+ myLastNode(-1)
+ {
+ }
+
+ //! Constructs a link between two vertices.
+ Standard_EXPORT BRepMesh_OrientedEdge(
+ const Standard_Integer theFirstNode,
+ const Standard_Integer theLastNode)
+ : myFirstNode(theFirstNode),
+ myLastNode(theLastNode)
+ {
+ }
+
+ //! Returns index of first node of the Link.
+ inline Standard_Integer FirstNode() const
+ {
+ return myFirstNode;
+ }
+
+ //! Returns index of last node of the Link.
+ inline Standard_Integer LastNode() const
+ {
+ return myLastNode;
+ }
+
+ //! Returns hash code for this edge.
+ //! @param theUpper upper index in the container.
+ //! @return hash code.
+ Standard_EXPORT Standard_Integer HashCode(const Standard_Integer theUpper) const
+ {
+ return ::HashCode(myFirstNode + myLastNode, theUpper);
+ }
+
+ //! Checks this and other edge for equality.
+ //! @param theOther edge to be checked against this one.
+ //! @retrun TRUE if edges have the same orientation, FALSE if not.
+ inline Standard_Boolean IsEqual(const BRepMesh_OrientedEdge& theOther) const
+ {
+ return (myFirstNode == theOther.myFirstNode && myLastNode == theOther.myLastNode);
+ }
+
+ //! Alias for IsEqual.
+ Standard_Boolean operator ==(const BRepMesh_OrientedEdge& Other) const
+ {
+ return IsEqual(Other);
+ }
+
+private:
+
+ Standard_Integer myFirstNode;
+ Standard_Integer myLastNode;
+};
+
+inline Standard_Integer HashCode(const BRepMesh_OrientedEdge& theEdge,
+ const Standard_Integer theUpper)
+{
+ return theEdge.HashCode(theUpper);
+}
+
+#endif
}
//! Returns index corresponding to the given position in the pair.
- //! \param thePairPos position of index in the pair (1 or 2).
+ //! @param thePairPos position of index in the pair (1 or 2).
inline Standard_Integer Index(const Standard_Integer thePairPos) const
{
if (thePairPos != 1 && thePairPos != 2)
}
//! Sets index corresponding to the given position in the pair.
- //! \param thePairPos position of index in the pair (1 or 2).
- //! \param theIndex index to be stored.
+ //! @param thePairPos position of index in the pair (1 or 2).
+ //! @param theIndex index to be stored.
inline void SetIndex(const Standard_Integer thePairPos,
const Standard_Integer theIndex)
{
}
//! Remove index from the given position.
- //! \param thePairPos position of index in the pair (1 or 2).
+ //! @param thePairPos position of index in the pair (1 or 2).
inline void RemoveIndex(const Standard_Integer thePairPos)
{
if (thePairPos != 1 && thePairPos != 2)
//! Sets the first element of the pair.
//! If last element is empty, also assignes the given polygon to it.
- //! \param thePolygon plygon to be set.
+ //! @param thePolygon plygon to be set.
inline void Prepend(const Handle(Poly_PolygonOnTriangulation)& thePolygon)
{
myFirst = thePolygon;
//! Sets the last element of the pair.
//! If first element is empty, also assignes the given polygon to it.
- //! \param thePolygon plygon to be set.
+ //! @param thePolygon plygon to be set.
inline void Append(const Handle(Poly_PolygonOnTriangulation)& thePolygon)
{
if (myFirst.IsNull())
void BRepMesh_SelectorOfDataStructureOfDelaun::NeighboursOfNode(
const Standard_Integer theNodeIndex)
{
- BRepMeshCol::ListOfInteger::Iterator aLinkIt(
+ BRepMesh::ListOfInteger::Iterator aLinkIt(
myMesh->LinksConnectedTo(theNodeIndex));
for (; aLinkIt.More(); aLinkIt.Next())
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>
#include <BRepMesh_DataStructureOfDelaun.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <Standard_Integer.hxx>
#include <BRepMesh_Triangle.hxx>
}
//! Returns selected nodes.
- inline const BRepMeshCol::MapOfInteger& Nodes() const
+ inline const BRepMesh::MapOfInteger& Nodes() const
{
return myNodes;
}
//! Returns selected links.
- inline const BRepMeshCol::MapOfInteger& Links() const
+ inline const BRepMesh::MapOfInteger& Links() const
{
return myLinks;
}
//! Returns selected elements.
- inline const BRepMeshCol::MapOfInteger& Elements() const
+ inline const BRepMesh::MapOfInteger& Elements() const
{
return myElements;
}
//! Gives the list of incices of frontier links.
- inline const BRepMeshCol::MapOfInteger& FrontierLinks() const
+ inline const BRepMesh::MapOfInteger& FrontierLinks() const
{
return myFrontier;
}
private:
Handle(BRepMesh_DataStructureOfDelaun) myMesh;
- BRepMeshCol::MapOfInteger myNodes;
- BRepMeshCol::MapOfInteger myLinks;
- BRepMeshCol::MapOfInteger myElements;
- BRepMeshCol::MapOfInteger myFrontier;
+ BRepMesh::MapOfInteger myNodes;
+ BRepMesh::MapOfInteger myLinks;
+ BRepMesh::MapOfInteger myElements;
+ BRepMesh::MapOfInteger myFrontier;
};
#endif
const Handle(BRepMesh_FaceAttribute)& theFaceAttribute)
{
const gp_XY& aPnt2d = thePnt2d.Coord();
- BRepMeshCol::DMapOfIntegerListOfXY& aLocation2D =
+ BRepMesh::DMapOfIntegerListOfXY& aLocation2D =
theFaceAttribute->ChangeLocation2D();
if (!aLocation2D.IsBound(theIndexOfPnt3d))
{
- BRepMeshCol::ListOfXY aPoints2d;
+ BRepMesh::ListOfXY aPoints2d;
aPoints2d.Append(aPnt2d);
aLocation2D.Bind(theIndexOfPnt3d, aPoints2d);
return aPnt2d;
}
- BRepMeshCol::ListOfXY& aPoints2d = aLocation2D.ChangeFind(theIndexOfPnt3d);
+ BRepMesh::ListOfXY& aPoints2d = aLocation2D.ChangeFind(theIndexOfPnt3d);
// Find the most closest 2d point to the given one.
gp_XY aUV;
Standard_Real aMinDist = RealLast();
- BRepMeshCol::ListOfXY::Iterator aPoint2dIt(aPoints2d);
+ BRepMesh::ListOfXY::Iterator aPoint2dIt(aPoints2d);
for (; aPoint2dIt.More(); aPoint2dIt.Next())
{
const gp_XY& aCurPnt2d = aPoint2dIt.Value();
#include <Standard_Macro.hxx>
#include <Handle_BRepAdaptor_HSurface.hxx>
#include <BRepMesh_FaceAttribute.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <Handle_Poly_Triangulation.hxx>
class TopoDS_Face;
}
//! Constructor.
- //! \param theEdges array of edges of triangle.
- //! \param theOrientations array of edge's orientations.
- //! \param theMovability movability of triangle.
+ //! @param theEdges array of edges of triangle.
+ //! @param theOrientations array of edge's orientations.
+ //! @param theMovability movability of triangle.
Standard_EXPORT BRepMesh_Triangle(
const Standard_Integer (&theEdges)[3],
const Standard_Boolean (&theOrientations)[3],
}
//! Initializes the triangle by the given parameters.
- //! \param theEdges array of edges of triangle.
- //! \param theOrientations array of edge's orientations.
- //! \param theMovability movability of triangle.
+ //! @param theEdges array of edges of triangle.
+ //! @param theOrientations array of edge's orientations.
+ //! @param theMovability movability of triangle.
inline void Initialize(
const Standard_Integer (&theEdges)[3],
const Standard_Boolean (&theOrientations)[3],
}
//! Gets edges with orientations composing the triangle.
- //! \param[out] theEdges array edges are stored to.
- //! \param[out] theOrientations array orientations are stored to.
+ //! @param[out] theEdges array edges are stored to.
+ //! @param[out] theOrientations array orientations are stored to.
inline void Edges(Standard_Integer (&theEdges)[3],
Standard_Boolean (&theOrientations)[3]) const
{
}
//! Returns hash code for this triangle.
- //! \param theUpper upper index in the container.
- //! \return hash code.
+ //! @param theUpper upper index in the container.
+ //! @return hash code.
Standard_EXPORT Standard_Integer HashCode(const Standard_Integer theUpper) const
{
return ::HashCode(myEdge1 + myEdge2 + myEdge3, theUpper);
}
//! Checks for equality with another triangle.
- //! \param theOther triangle to be checked against this one.
- //! \return TRUE if equal, FALSE if not.
+ //! @param theOther triangle to be checked against this one.
+ //! @return TRUE if equal, FALSE if not.
Standard_EXPORT Standard_Boolean IsEqual(const BRepMesh_Triangle& theOther) const
{
if (myMovability == BRepMesh_Deleted || theOther.myMovability == BRepMesh_Deleted)
}
//! Creates vertex associated with point in 3d space.
- //! \param theUV position of vertex in parametric space.
- //! \param theLocation3d index of 3d point to be associated with vertex.
- //! \param theMovability movability of the vertex.
+ //! @param theUV position of vertex in parametric space.
+ //! @param theLocation3d index of 3d point to be associated with vertex.
+ //! @param theMovability movability of the vertex.
Standard_EXPORT BRepMesh_Vertex(const gp_XY& theUV,
const Standard_Integer theLocation3d,
const BRepMesh_DegreeOfFreedom theMovability)
}
//! Creates vertex without association with point in 3d space.
- //! \param theU U position of vertex in parametric space.
- //! \param theV V position of vertex in parametric space.
- //! \param theMovability movability of the vertex.
+ //! @param theU U position of vertex in parametric space.
+ //! @param theV V position of vertex in parametric space.
+ //! @param theMovability movability of the vertex.
Standard_EXPORT BRepMesh_Vertex(const Standard_Real theU,
const Standard_Real theV,
const BRepMesh_DegreeOfFreedom theMovability)
{}
//! Initializes vertex associated with point in 3d space.
- //! \param theUV position of vertex in parametric space.
- //! \param theLocation3d index of 3d point to be associated with vertex.
- //! \param theMovability movability of the vertex.
+ //! @param theUV position of vertex in parametric space.
+ //! @param theLocation3d index of 3d point to be associated with vertex.
+ //! @param theMovability movability of the vertex.
inline void Initialize(const gp_XY& theUV,
const Standard_Integer theLocation3d,
const BRepMesh_DegreeOfFreedom theMovability)
}
//! Returns hash code for this vertex.
- //! \param theUpper upper index in the container.
- //! \return hash code.
+ //! @param theUpper upper index in the container.
+ //! @return hash code.
Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const
{
return ::HashCode(Floor(1e5 * myUV.X()) * Floor(1e5 * myUV.Y()), Upper);
}
//! Checks for equality with another vertex.
- //! \param theOther vertex to be checked against this one.
- //! \return TRUE if equal, FALSE if not.
+ //! @param theOther vertex to be checked against this one.
+ //! @return TRUE if equal, FALSE if not.
Standard_EXPORT Standard_Boolean IsEqual(const BRepMesh_Vertex& theOther) const
{
if (myMovability == BRepMesh_Deleted ||
#include <Precision.hxx>
#include <gp_XY.hxx>
#include <gp_XYZ.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <NCollection_CellFilter.hxx>
#include <BRepMesh_Vertex.hxx>
typedef Standard_Integer Target;
//! Constructor.
- //! \param theReservedSize size to be reserved for vector of vertices.
- //! \param theAllocator memory allocator to be used by internal collections.
+ //! @param theReservedSize size to be reserved for vector of vertices.
+ //! @param theAllocator memory allocator to be used by internal collections.
Standard_EXPORT BRepMesh_VertexInspector (
- const Standard_Integer theReservedSize,
- const BRepMeshCol::Allocator& theAllocator)
+ const Standard_Integer theReservedSize,
+ const Handle(NCollection_IncAllocator)& theAllocator)
: myResIndices(theAllocator),
myVertices (theReservedSize),
myDelNodes (theAllocator)
}
//! Registers the given vertex.
- //! \param theVertex vertex to be registered.
+ //! @param theVertex vertex to be registered.
Standard_EXPORT Standard_Integer Add(const BRepMesh_Vertex& theVertex)
{
if( myDelNodes.IsEmpty() )
//! Sets the tolerance to be used for identification of
//! coincident vertices.
- //! \param theToleranceX tolerance for X dimension.
- //! \param theToleranceY tolerance for Y dimension.
+ //! @param theToleranceX tolerance for X dimension.
+ //! @param theToleranceY tolerance for Y dimension.
inline void SetTolerance(const Standard_Real theToleranceX,
const Standard_Real theToleranceY)
{
}
//! Deletes vertex with the given index.
- //! \param theIndex index of vertex to be removed.
+ //! @param theIndex index of vertex to be removed.
inline void Delete(const Standard_Integer theIndex)
{
myVertices(theIndex - 1).SetMovability(BRepMesh_Deleted);
//! Returns list with indexes of vertices that have movability attribute
//! equal to BRepMesh_Deleted and can be replaced with another node.
- inline const BRepMeshCol::ListOfInteger& GetListOfDelPoints() const
+ inline const BRepMesh::ListOfInteger& GetListOfDelPoints() const
{
return myDelNodes;
}
//! Performs inspection of a point with the given index.
- //! \param theTargetIndex index of a circle to be checked.
- //! \return status of the check.
+ //! @param theTargetIndex index of a circle to be checked.
+ //! @return status of the check.
Standard_EXPORT NCollection_CellFilter_Action Inspect(const Standard_Integer theTargetIndex);
//! Checks indices for equlity.
private:
- Standard_Real myTolerance[2];
- BRepMeshCol::ListOfInteger myResIndices;
- BRepMeshCol::VectorOfVertex myVertices;
- BRepMeshCol::ListOfInteger myDelNodes;
- gp_XY myPoint;
+ Standard_Real myTolerance[2];
+ BRepMesh::ListOfInteger myResIndices;
+ BRepMesh::VectorOfVertex myVertices;
+ BRepMesh::ListOfInteger myDelNodes;
+ gp_XY myPoint;
};
#endif
//purpose :
//=======================================================================
BRepMesh_VertexTool::BRepMesh_VertexTool(
- const Standard_Integer theReservedSize,
- const BRepMeshCol::Allocator& theAllocator)
+ const Standard_Integer theReservedSize,
+ const Handle(NCollection_IncAllocator)& theAllocator)
: myAllocator (theAllocator),
myCellFilter(0., myAllocator),
mySelector (Max(theReservedSize, 64),myAllocator)
Standard_Integer aIndex = FindIndex(theVertex);
if (aIndex == 0)
{
- BRepMeshCol::ListOfInteger aParams(myAllocator);
+ BRepMesh::ListOfInteger aParams(myAllocator);
aIndex = Add(theVertex, aParams);
}
return aIndex;
//purpose :
//=======================================================================
Standard_Integer BRepMesh_VertexTool::Add(
- const BRepMesh_Vertex& theVertex,
- const BRepMeshCol::ListOfInteger& theParams)
+ const BRepMesh_Vertex& theVertex,
+ const BRepMesh::ListOfInteger& theParams)
{
Standard_Integer aIndex = mySelector.Add(theVertex);
myLinksMap.Bind(aIndex, theParams);
//purpose :
//=======================================================================
void BRepMesh_VertexTool::Substitute(
- const Standard_Integer theIndex,
- const BRepMesh_Vertex& theVertex,
- const BRepMeshCol::ListOfInteger& theData)
+ const Standard_Integer theIndex,
+ const BRepMesh_Vertex& theVertex,
+ const BRepMesh::ListOfInteger& theData)
{
BRepMesh_Vertex& aV = mySelector.GetVertex(theIndex);
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>
#include <BRepMesh_VertexInspector.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <Standard_OStream.hxx>
#include <gp_XYZ.hxx>
#include <gp_XY.hxx>
DEFINE_STANDARD_ALLOC
//! Constructor.
- //! \param theReservedSize size to be reserved for vector of vertices.
- //! \param theAllocator memory allocator to be used by internal collections.
- Standard_EXPORT BRepMesh_VertexTool(const Standard_Integer theReservedSize,
- const BRepMeshCol::Allocator& theAllocator);
+ //! @param theReservedSize size to be reserved for vector of vertices.
+ //! @param theAllocator memory allocator to be used by internal collections.
+ Standard_EXPORT BRepMesh_VertexTool(
+ const Standard_Integer theReservedSize,
+ const Handle(NCollection_IncAllocator)& theAllocator);
//! Sets new size of cell for cellfilter equal in both directions.
Standard_EXPORT void SetCellSize(const Standard_Real theSize)
}
//! Sets new size of cell for cellfilter.
- //! \param theSizeX size for X dimension.
- //! \param theSizeY size for Y dimension.
+ //! @param theSizeX size for X dimension.
+ //! @param theSizeY size for Y dimension.
Standard_EXPORT void SetCellSize(const Standard_Real theSizeX,
const Standard_Real theSizeY)
{
//! Sets the tolerance to be used for identification of
//! coincident vertices.
- //! \param theToleranceX tolerance for X dimension.
- //! \param theToleranceY tolerance for Y dimension.
+ //! @param theToleranceX tolerance for X dimension.
+ //! @param theToleranceY tolerance for Y dimension.
Standard_EXPORT void SetTolerance(const Standard_Real theToleranceX,
const Standard_Real theToleranceY)
{
Standard_EXPORT Standard_Integer Add(const BRepMesh_Vertex& theVertex);
//! Adds vertex with associated data to the tool.
- //! \param theVertex vertex to be added.
- //! \param theParams data associated with the vertex.
- Standard_EXPORT Standard_Integer Add(const BRepMesh_Vertex& theVertex,
- const BRepMeshCol::ListOfInteger& theParams);
+ //! @param theVertex vertex to be added.
+ //! @param theParams data associated with the vertex.
+ Standard_EXPORT Standard_Integer Add(const BRepMesh_Vertex& theVertex,
+ const BRepMesh::ListOfInteger& theParams);
//! Deletes vertex with the given index from the tool.
Standard_EXPORT void Delete(const Standard_Integer theIndex);
//! Returns data assigned to link with the given index.
- //! \param theIndex index of link which data should be returned.
- //! \return attached data.
- inline BRepMeshCol::ListOfInteger& FindFromIndex(const Standard_Integer theIndex) const
+ //! @param theIndex index of link which data should be returned.
+ //! @return attached data.
+ inline BRepMesh::ListOfInteger& FindFromIndex(const Standard_Integer theIndex) const
{
- return (BRepMeshCol::ListOfInteger&)myLinksMap.Find(theIndex);
+ return (BRepMesh::ListOfInteger&)myLinksMap.Find(theIndex);
}
//! Alias for FindFromIndex.
- BRepMeshCol::ListOfInteger& operator()(const Standard_Integer theIndex) const
+ BRepMesh::ListOfInteger& operator()(const Standard_Integer theIndex) const
{
return FindFromIndex(theIndex);
}
}
//! Substitutes vertex with the given by the given vertex with attributes.
- //! \param theIndex index of vertex to be substituted.
- //! \param theVertex replacement vertex.
- //! \param theData data associated to the vertex.
- Standard_EXPORT void Substitute(const Standard_Integer theIndex,
- const BRepMesh_Vertex& theVertex,
- const BRepMeshCol::ListOfInteger& theData);
+ //! @param theIndex index of vertex to be substituted.
+ //! @param theVertex replacement vertex.
+ //! @param theData data associated to the vertex.
+ Standard_EXPORT void Substitute(const Standard_Integer theIndex,
+ const BRepMesh_Vertex& theVertex,
+ const BRepMesh::ListOfInteger& theData);
//! Remove last node from the structure.
inline void RemoveLast()
//! Returns the list with indexes of vertices that have movability attribute
//! equal to BRepMesh_Deleted and can be replaced with another node.
- inline const BRepMeshCol::ListOfInteger& GetListOfDelNodes() const
+ inline const BRepMesh::ListOfInteger& GetListOfDelNodes() const
{
return mySelector.GetListOfDelPoints();
}
private:
//! Expands the given point according to specified tolerance.
- //! \param thePoint point to be expanded.
- //! \param[out] theMinPoint bottom left corner of area defined by expanded point.
- //! \param[out] theMaxPoint top right corner of area defined by expanded point.
+ //! @param thePoint point to be expanded.
+ //! @param[out] theMinPoint bottom left corner of area defined by expanded point.
+ //! @param[out] theMaxPoint top right corner of area defined by expanded point.
inline void expandPoint(const gp_XY& thePoint,
gp_XY& theMinPoint,
gp_XY& theMaxPoint)
private:
- BRepMeshCol::Allocator myAllocator;
- BRepMeshCol::VertexCellFilter myCellFilter;
- BRepMesh_VertexInspector mySelector;
- BRepMeshCol::DMapOfIntegerListOfInteger myLinksMap;
- Standard_Real myTolerance[2];
+ Handle(NCollection_IncAllocator) myAllocator;
+ BRepMesh::VertexCellFilter myCellFilter;
+ BRepMesh_VertexInspector mySelector;
+ BRepMesh::DMapOfIntegerListOfInteger myLinksMap;
+ Standard_Real myTolerance[2];
};
#endif
//function : Indices
//purpose :
//=======================================================================
-const BRepMeshCol::Array1OfInteger&
+const BRepMesh::Array1OfInteger&
BRepMesh_WireChecker::BndBox2dTreeSelector::Indices() const
{
return myIndices;
BRepMesh_WireChecker::BRepMesh_WireChecker(
const TopoDS_Face& theFace,
const Standard_Real theTolUV,
- const BRepMeshCol::HDMapOfShapePairOfPolygon& theEdges,
- const BRepMeshCol::HIMapOfInteger& theVertexMap,
+ const BRepMesh::HDMapOfShapePairOfPolygon& theEdges,
+ const BRepMesh::HIMapOfInteger& theVertexMap,
const Handle(BRepMesh_DataStructureOfDelaun)& theStructure,
const Standard_Real theUmin,
const Standard_Real theUmax,
{
const TopoDS_Wire& aWire = TopoDS::Wire(aFaceExplorer.Current());
- myWiresEdges.push_back(ListOfEdges());
- ListOfEdges& aEdges = myWiresEdges.back();
+ myWiresEdges.Append(ListOfEdges());
+ ListOfEdges& aEdges = myWiresEdges.ChangeLast();
// Start traversing the wires
BRepTools_WireExplorer aWireExplorer(aWire, aFace);
}
if (aEdges.IsEmpty())
- myWiresEdges.pop_back();
+ myWiresEdges.Remove(myWiresEdges.Size());
}
}
//function : ReCompute
//purpose :
//=======================================================================
-void BRepMesh_WireChecker::ReCompute(BRepMeshCol::HClassifier& theClassifier)
+void BRepMesh_WireChecker::ReCompute(BRepMesh::HClassifier& theClassifier)
{
if (theClassifier.IsNull())
return;
if (!collectDiscretizedWires(aDWires))
return;
- const Standard_Integer aNbWires = (Standard_Integer)aDWires.size();
-
- BRepMeshCol::Array1OfSegmentsTree aWiresBiPoints(aNbWires);
+ const Standard_Integer aNbWires = aDWires.Size();
+ BRepMesh::Array1OfSegmentsTree aWiresBiPoints(1, aNbWires);
fillSegmentsTree(aDWires, aWiresBiPoints);
#ifdef HAVE_TBB
if (myIsInParallel && aNbWires > 1)
{
// check wires in parallel threads using TBB
- tbb::parallel_for(tbb::blocked_range<Standard_Integer>(0, aNbWires),
+ tbb::parallel_for(tbb::blocked_range<Standard_Integer>(1, aNbWires + 1),
aIntChecker);
}
else
#else
BRepMesh_WireInterferenceChecker aIntChecker(aWiresBiPoints, &myStatus);
#endif
- for (Standard_Integer i = 0; i < aNbWires; ++i)
+ for (Standard_Integer i = 1; i <= aNbWires; ++i)
aIntChecker(i);
#ifdef HAVE_TBB
}
return;
// Find holes
- SeqOfDWires::iterator aDWiresIt = aDWires.begin();
- for (; aDWiresIt != aDWires.end(); ++aDWiresIt)
+ SeqOfDWires::Iterator aDWiresIt(aDWires);
+ for (; aDWiresIt.More(); aDWiresIt.Next())
{
- const SeqOfPnt2d& aDWire = *aDWiresIt;
+ const SeqOfPnt2d& aDWire = aDWiresIt.Value();
theClassifier->RegisterWire(aDWire, myTolUV, myUmin, myUmax, myVmin, myVmax);
}
}
Standard_Boolean BRepMesh_WireChecker::collectDiscretizedWires(
SeqOfDWires& theDWires)
{
- // TODO: Collect disretized wires in parallel
- SeqOfWireEdges::iterator aWireIt = myWiresEdges.begin();
- for(; aWireIt != myWiresEdges.end(); ++aWireIt)
+ SeqOfWireEdges::Iterator aWireIt(myWiresEdges);
+ for(; aWireIt.More(); aWireIt.Next())
{
- const ListOfEdges& aEdges = *aWireIt;
+ const ListOfEdges& aEdges = aWireIt.Value();
// For each wire we create a data map, linking vertices (only
// the ends of edges) with their positions in the sequence of
// all 2d points from this wire.
// loop from the map, but since they can't appear twice on the
// valid wire, leave them for a little speed up.
- SeqOfPnt2d aSeqPnt2d;
- DataMapIntInt aNodeInSeq;
+ SeqOfPnt2d aSeqPnt2d;
+ BRepMesh::MapOfIntegerInteger aNodeInSeq;
Standard_Integer aFirstIndex = 0, aLastIndex = 0;
// Start traversing the wire
const Standard_Integer aIdxWireStart = aNodeInSeq(aLastVertexId);
if(aIdxWireStart < aSeqPnt2d.Length())
{
- theDWires.push_back(SeqOfPnt2d());
- SeqOfPnt2d& aWire = theDWires.back();
+ theDWires.Append(SeqOfPnt2d());
+ SeqOfPnt2d& aWire = theDWires.ChangeLast();
aSeqPnt2d.Split(aIdxWireStart, aWire);
}
}
//purpose :
//=======================================================================
void BRepMesh_WireChecker::fillSegmentsTree(
- const SeqOfDWires& theDWires,
- BRepMeshCol::Array1OfSegmentsTree& theWiresSegmentsTree)
+ const SeqOfDWires& theDWires,
+ BRepMesh::Array1OfSegmentsTree& theWiresSegmentsTree)
{
- const size_t aNbWires = theDWires.size();
- for (size_t aWireIt = 0; aWireIt < aNbWires; ++aWireIt)
+ const Standard_Integer aNbWires = theDWires.Size();
+ for (Standard_Integer aWireIt = 1; aWireIt <= aNbWires; ++aWireIt)
{
- const SeqOfPnt2d& aWire = theDWires[aWireIt];
+ const SeqOfPnt2d& aWire = theDWires(aWireIt);
const Standard_Integer aWireLen = aWire.Size();
- BRepMeshCol::HArray1OfSegments aWireSegments =
- new BRepMeshCol::Array1OfSegments(aWireLen);
+ BRepMesh::HArray1OfSegments aWireSegments =
+ new BRepMesh::Array1OfSegments(1, aWireLen);
- BRepMeshCol::HBndBox2dTree aBndBoxTree =
- new BRepMeshCol::BndBox2dTree;
+ BRepMesh::HBndBox2dTree aBndBoxTree =
+ new BRepMesh::BndBox2dTree;
- BRepMeshCol::BndBox2dTreeFiller aBndBoxTreeFiller(*aBndBoxTree);
+ BRepMesh::BndBox2dTreeFiller aBndBoxTreeFiller(*aBndBoxTree);
Standard_Real x1 = 0., y1 = 0., aXstart = 0., aYstart = 0.;
for (Standard_Integer aPntIt = 0; aPntIt <= aWireLen; ++aPntIt)
gp_Pnt2d aStartPnt(x1, y1);
gp_Pnt2d aEndPnt(x2, y2);
- const Standard_Integer aPointId = aPntIt - 1;
- BRepMeshCol::Segment& aSegment = aWireSegments->at(aPointId);
+ BRepMesh::Segment& aSegment = aWireSegments->ChangeValue(aPntIt);
aSegment.StartPnt = aStartPnt.XY();
aSegment.EndPnt = aEndPnt.XY();
Bnd_Box2d aBox;
aBox.Add(aStartPnt);
aBox.Add( aEndPnt);
- aBndBoxTreeFiller.Add(aPointId, aBox);
+ aBndBoxTreeFiller.Add(aPntIt, aBox);
}
x1 = x2;
y1 = y2;
}
aBndBoxTreeFiller.Fill();
- BRepMeshCol::SegmentsTree& aSegmentsTree = theWiresSegmentsTree[aWireIt];
+ BRepMesh::SegmentsTree& aSegmentsTree = theWiresSegmentsTree(aWireIt);
aSegmentsTree.first = aWireSegments;
aSegmentsTree.second = aBndBoxTree;
}
#include <TopoDS_Face.hxx>
#include <BRepMesh_Status.hxx>
#include <BRepMesh_DataStructureOfDelaun.hxx>
-#include <BRepMesh_Collections.hxx>
+#include <BRepMesh.hxx>
#include <TopoDS_Edge.hxx>
#include <Bnd_Box2d.hxx>
#include <gp_Pnt2d.hxx>
//! Used to identify segments with overlapped bounding boxes.
//! Note that instance of selector can be used only once due to
//! unextentable array of indices.
- class BndBox2dTreeSelector : public BRepMeshCol::BndBox2dTree::Selector
+ class BndBox2dTreeSelector : public BRepMesh::BndBox2dTree::Selector
{
public:
Standard_EXPORT BndBox2dTreeSelector(const Standard_Integer theReservedSize);
Standard_EXPORT void Clear();
Standard_EXPORT void SetBox(const Bnd_Box2d& theBox2D);
Standard_EXPORT void SetSkippedIndex(const Standard_Integer theIndex);
- Standard_EXPORT const BRepMeshCol::Array1OfInteger& Indices() const;
+ Standard_EXPORT const BRepMesh::Array1OfInteger& Indices() const;
Standard_EXPORT Standard_Integer IndicesNb() const;
protected:
- Bnd_Box2d myBox2D;
- Standard_Integer mySkippedIndex;
- BRepMeshCol::Array1OfInteger myIndices;
- Standard_Integer myIndicesNb;
+ Bnd_Box2d myBox2D;
+ Standard_Integer mySkippedIndex;
+ BRepMesh::Array1OfInteger myIndices;
+ Standard_Integer myIndicesNb;
};
private:
- typedef NCollection_List<TopoDS_Edge> ListOfEdges;
- typedef std::vector<ListOfEdges> SeqOfWireEdges;
- typedef NCollection_Sequence<gp_Pnt2d> SeqOfPnt2d;
- typedef std::vector<SeqOfPnt2d> SeqOfDWires;
- typedef NCollection_DataMap<Standard_Integer, Standard_Integer> DataMapIntInt;
- typedef std::pair<Standard_Integer, gp_XY> PairIntPnt;
+ typedef NCollection_List<TopoDS_Edge> ListOfEdges;
+ typedef NCollection_Sequence<ListOfEdges> SeqOfWireEdges;
+
+ typedef NCollection_Sequence<gp_Pnt2d> SeqOfPnt2d;
+ typedef NCollection_Sequence<SeqOfPnt2d> SeqOfDWires;
public:
//! Constructor.
- //! \param theFace Face to be checked.
- //! \param theTolUV Tolerance to be used for calculations in parametric space.
- //! \param theEdges Map of edges with associated polygon on triangulation.
- //! \param theVertexMap Map of face vertices.
- //! \param theStructure Discretized representation of face in parametric space.
- //! \param theUmin Lower U boundary of the face in parametric space.
- //! \param theUmax Upper U boundary of the face in parametric space.
- //! \param theVmin Lower V boundary of the face in parametric space.
- //! \param theVmax Upper V boundary of the face in parametric space.
+ //! @param theFace Face to be checked.
+ //! @param theTolUV Tolerance to be used for calculations in parametric space.
+ //! @param theEdges Map of edges with associated polygon on triangulation.
+ //! @param theVertexMap Map of face vertices.
+ //! @param theStructure Discretized representation of face in parametric space.
+ //! @param theUmin Lower U boundary of the face in parametric space.
+ //! @param theUmax Upper U boundary of the face in parametric space.
+ //! @param theVmin Lower V boundary of the face in parametric space.
+ //! @param theVmax Upper V boundary of the face in parametric space.
Standard_EXPORT BRepMesh_WireChecker(
const TopoDS_Face& theFace,
const Standard_Real theTolUV,
- const BRepMeshCol::HDMapOfShapePairOfPolygon& theEdges,
- const BRepMeshCol::HIMapOfInteger& theVertexMap,
+ const BRepMesh::HDMapOfShapePairOfPolygon& theEdges,
+ const BRepMesh::HIMapOfInteger& theVertexMap,
const Handle(BRepMesh_DataStructureOfDelaun)& theStructure,
const Standard_Real theUmin,
const Standard_Real theUmax,
const Standard_Boolean isInParallel);
//! Recompute data using parameters passed in constructor.
- //! \param[out] theClassifier Classifier to be updated using calculated data.
- Standard_EXPORT void ReCompute(BRepMeshCol::HClassifier& theClassifier);
+ //! @param[out] theClassifier Classifier to be updated using calculated data.
+ Standard_EXPORT void ReCompute(BRepMesh::HClassifier& theClassifier);
//! Returns status of the check.
inline BRepMesh_Status Status() const
private:
//! Collects disñrete wires.
- //! \param[out] theDWires sequence of discretized wires to be filled.
- //! \return TRUE on success, FALSE in case of open wire.
+ //! @param[out] theDWires sequence of discretized wires to be filled.
+ //! @return TRUE on success, FALSE in case of open wire.
Standard_Boolean collectDiscretizedWires(SeqOfDWires& theDWires);
//! Fills array of BiPoints for corresponding wire.
- //! \param theDWires Sequence of wires to be processed.
- //! \param theWiresSegmentsTree Array of segments with corresponding
+ //! @param theDWires Sequence of wires to be processed.
+ //! @param theWiresSegmentsTree Array of segments with corresponding
//! bounding boxes trees to be filled.
void fillSegmentsTree(
- const SeqOfDWires& theDWires,
- BRepMeshCol::Array1OfSegmentsTree& theWiresSegmentsTree);
+ const SeqOfDWires& theDWires,
+ BRepMesh::Array1OfSegmentsTree& theWiresSegmentsTree);
//! Assignment operator.
void operator =(BRepMesh_WireChecker& /*theOther*/)
private:
const Standard_Real myTolUV;
- const BRepMeshCol::HDMapOfShapePairOfPolygon& myEdges;
- const BRepMeshCol::HIMapOfInteger& myVertexMap;
+ const BRepMesh::HDMapOfShapePairOfPolygon& myEdges;
+ const BRepMesh::HIMapOfInteger& myVertexMap;
const Handle(BRepMesh_DataStructureOfDelaun)& myStructure;
const Standard_Real myUmin;
const Standard_Real myUmax;
//purpose :
//=======================================================================
BRepMesh_WireInterferenceChecker::BRepMesh_WireInterferenceChecker(
- const std::vector<BRepMeshCol::SegmentsTree>& theWires,
- BRepMesh_Status* theStatus,
- Standard_Mutex* theMutex)
-: myWires (&theWires.front()),
- myWiresNb ((Standard_Integer)theWires.size()),
- myStatus (theStatus),
- myMutex (theMutex)
+ const BRepMesh::Array1OfSegmentsTree& theWires,
+ BRepMesh_Status* theStatus,
+ Standard_Mutex* theMutex)
+: myWires (theWires),
+ myStatus(theStatus),
+ myMutex (theMutex)
{
}
//purpose :
//=======================================================================
BRepMesh_WireInterferenceChecker::BRepMesh_WireInterferenceChecker(
- const std::vector<BRepMeshCol::SegmentsTree>& theWires,
- BRepMesh_Status* theStatus)
-: myWires (&theWires.front()),
- myWiresNb ((Standard_Integer)theWires.size()),
- myStatus (theStatus)
+ const BRepMesh::Array1OfSegmentsTree& theWires,
+ BRepMesh_Status* theStatus)
+: myWires (theWires),
+ myStatus(theStatus)
{
}
#endif
if (*myStatus == BRepMesh_SelfIntersectingWire)
return;
- const BRepMeshCol::SegmentsTree& aWireSegTree1 = myWires[theWireId];
- const BRepMeshCol::Segment* aWireSegments1 = &aWireSegTree1.first->front();
- const BRepMeshCol::HBndBox2dTree& aWireBoxTree1 = aWireSegTree1.second;
- const Standard_Integer aWireLen1 = (Standard_Integer)aWireSegTree1.first->size();
+ const BRepMesh::SegmentsTree& aWireSegTree1 = myWires(theWireId);
+ const BRepMesh::HArray1OfSegments& aWireSegments1 = aWireSegTree1.first;
+ const BRepMesh::HBndBox2dTree& aWireBoxTree1 = aWireSegTree1.second;
- for (Standard_Integer aWireIt = theWireId; aWireIt < myWiresNb; ++aWireIt)
+ for (Standard_Integer aWireIt = theWireId; aWireIt <= myWires.Upper(); ++aWireIt)
{
#ifdef HAVE_TBB
// Break execution in case if flag was raised by another thread
#endif
const Standard_Boolean isSelfIntCheck = (aWireIt == theWireId);
- const BRepMeshCol::SegmentsTree& aWireSegTree2 =
- isSelfIntCheck ? aWireSegTree1 : myWires[aWireIt];
+ const BRepMesh::SegmentsTree& aWireSegTree2 =
+ isSelfIntCheck ? aWireSegTree1 : myWires(aWireIt);
- const BRepMeshCol::Segment* aWireSegments2 = &aWireSegTree2.first->front();
- const BRepMeshCol::HBndBox2dTree& aWireBoxTree2 = aWireSegTree2.second;
+ const BRepMesh::HArray1OfSegments& aWireSegments2 = aWireSegTree2.first;
+ const BRepMesh::HBndBox2dTree& aWireBoxTree2 = aWireSegTree2.second;
- BRepMesh_WireChecker::BndBox2dTreeSelector aSelector ((Standard_Integer)aWireSegTree2.first->size());
- for (Standard_Integer aSegmentId1 = 0; aSegmentId1 < aWireLen1; ++aSegmentId1)
+ BRepMesh_WireChecker::BndBox2dTreeSelector aSelector (aWireSegments2->Size());
+
+ Standard_Integer aSegmentId1 = aWireSegments1->Lower();
+ for (; aSegmentId1 <= aWireSegments1->Upper(); ++aSegmentId1)
{
#ifdef HAVE_TBB
// Break execution in case if flag was raised by another thread
if (aWireBoxTree2->Select(aSelector) == 0)
continue;
- const BRepMeshCol::Segment& aSegment1 = aWireSegments1[aSegmentId1];
- const BRepMeshCol::Array1OfInteger& aSelected = aSelector.Indices();
+ const BRepMesh::Segment& aSegment1 = aWireSegments1->Value(aSegmentId1);
+ const BRepMesh::Array1OfInteger& aSelected = aSelector.Indices();
const Standard_Integer aSelectedNb = aSelector.IndicesNb();
for (Standard_Integer aBndIt = 0; aBndIt < aSelectedNb; ++aBndIt)
{
#endif
const Standard_Integer aSegmentId2 = aSelected(aBndIt);
- const BRepMeshCol::Segment& aSegment2 = aWireSegments2[aSegmentId2];
+ const BRepMesh::Segment& aSegment2 = aWireSegments2->Value(aSegmentId2);
gp_Pnt2d aIntPnt;
BRepMesh_GeomTool::IntFlag aIntStatus = BRepMesh_GeomTool::IntSegSeg(
const gp_XY& aRefPnt = aIntPnt.Coord();
for (Standard_Integer i = aSegmentId1; i < aSegmentId2; ++i)
{
- const BRepMeshCol::Segment& aSeg = aWireSegments1[i];
+ const BRepMesh::Segment& aSeg = aWireSegments1->Value(i);
gp_XY aCurVec = aSeg.EndPnt - aRefPnt;
if (aCurVec.SquareModulus() < gp::Resolution())
#ifdef HAVE_TBB
//! Constructor
- //! \param theWires wires that should be checked.
- //! \param theStatus shared flag to set status of the check.
- //! \param theMutex shared mutex for parallel processing.
+ //! @param theWires wires that should be checked.
+ //! @param theStatus shared flag to set status of the check.
+ //! @param theMutex shared mutex for parallel processing.
BRepMesh_WireInterferenceChecker(
- const std::vector<BRepMeshCol::SegmentsTree>& theWires,
- BRepMesh_Status* theStatus,
- Standard_Mutex* theMutex);
+ const BRepMesh::Array1OfSegmentsTree& theWires,
+ BRepMesh_Status* theStatus,
+ Standard_Mutex* theMutex);
//! Checker's body.
- //! \param theWireRange range of wires to be checked.
+ //! @param theWireRange range of wires to be checked.
void operator ()(const tbb::blocked_range<Standard_Integer>& theWireRange) const;
#else
//! Constructor
- //! \param theWires wires that should be checked.
- //! \param theStatus shared flag to set status of the check.
+ //! @param theWires wires that should be checked.
+ //! @param theStatus shared flag to set status of the check.
BRepMesh_WireInterferenceChecker(
- const std::vector<BRepMeshCol::SegmentsTree>& theWires,
- BRepMesh_Status* theStatus);
+ const BRepMesh::Array1OfSegmentsTree& theWires,
+ BRepMesh_Status* theStatus);
#endif
//! Checker's body.
- //! \param theWireId Id of discretized wire to be checked.
+ //! @param theWireId Id of discretized wire to be checked.
void operator ()(const Standard_Integer& theWireId) const;
private:
//! Classifies the point in case of coincidence of two vectors.
- //! \param thePoint1 the start point of a segment (base point).
- //! \param thePoint2 the end point of a segment.
- //! \param thePointToCheck the point to classify.
- //! \return zero value if point is out of segment and non zero value
+ //! @param thePoint1 the start point of a segment (base point).
+ //! @param thePoint2 the end point of a segment.
+ //! @param thePointToCheck the point to classify.
+ //! @return zero value if point is out of segment and non zero value
//! if point is between the first and the second point of segment.
static Standard_Integer classifyPoint (const gp_XY& thePoint1,
const gp_XY& thePoint2,
const gp_XY& thePointToCheck);
+
+ //! Assignment operator.
+ void operator =(const BRepMesh_WireInterferenceChecker& /*theOther*/)
+ {
+ }
+
private:
- const BRepMeshCol::SegmentsTree* myWires;
- Standard_Integer myWiresNb;
- BRepMesh_Status* myStatus;
+ const BRepMesh::Array1OfSegmentsTree& myWires;
+ BRepMesh_Status* myStatus;
#ifdef HAVE_TBB
- Standard_Mutex* myMutex;
+ Standard_Mutex* myMutex;
#endif
};
+BRepMesh.hxx
BRepMesh_PluginEntryType.hxx
BRepMesh_PluginMacro.hxx
BRepMesh_DegreeOfFreedom.hxx
BRepMesh_FactoryError.hxx
BRepMesh_Vertex.hxx
+BRepMesh_OrientedEdge.hxx
BRepMesh_Edge.hxx
BRepMesh_Triangle.hxx
BRepMesh_Circle.hxx
BRepMesh_DiscretRoot.cxx
BRepMesh_DiscretFactory.hxx
BRepMesh_DiscretFactory.cxx
-BRepMesh_Collections.hxx
BRepMesh_DataStructureOfDelaun.hxx
BRepMesh_DataStructureOfDelaun.cxx
BRepMesh_CircleTool.hxx
uses
TColStd,
Draw,
- TopoDS,
- BRepMesh
+ TopoDS
is
HLRAlgo,
HLRBRep,
Quantity,
- BRepMesh,
gp,
TColgp,
Poly,