Restored old constructor and old behavior where possible.
Minor correction.
Standard_Real aRange = Compute3DRange();
Handle(NCollection_IncAllocator) anAlloc = new NCollection_IncAllocator;
NCollection_CellFilter<NodeInspector>
- aCells(NodeInspector::Dimension, Max(myTolerance, aRange/IntegerLast()), anAlloc);
+ aCells(Max(myTolerance, aRange/IntegerLast()), anAlloc);
for(Standard_Integer i = myFaceVec.Lower(); i <= myFaceVec.Upper(); i++)
{
Standard_Integer i, nbVertices = aVertexNode.Extent();
// Create map of node -> vertices
TopTools_IndexedDataMapOfShapeListOfShape NodeVertices;
- BRepBuilderAPI_CellFilter aFilter (BRepBuilderAPI_VertexInspector::Dimension, Tolerance);
+ BRepBuilderAPI_CellFilter aFilter (Tolerance);
BRepBuilderAPI_VertexInspector anInspector (Tolerance);
for (i = 1; i <= nbVertices; i++) {
TopoDS_Shape vertex = aVertexNode.FindKey(i);
const Handle(NCollection_IncAllocator)& theAllocator)
: myTolerance (Precision::PConfusion() * Precision::PConfusion()),
myAllocator (theAllocator),
- myCellFilter(BRepMesh_CircleInspector::Dimension, 10, theAllocator),
+ myCellFilter(10, theAllocator),
mySelector (myTolerance, 64, theAllocator)
{
}
const Handle(NCollection_IncAllocator)& theAllocator)
: myTolerance (Precision::PConfusion() * Precision::PConfusion()),
myAllocator (theAllocator),
- myCellFilter(BRepMesh_CircleInspector::Dimension, 10, theAllocator),
+ myCellFilter(10, theAllocator),
mySelector (myTolerance, Max(theReservedSize, 64), theAllocator)
{
}
const Standard_Integer theReservedSize,
const Handle(NCollection_IncAllocator)& theAllocator)
: myAllocator (theAllocator),
- myCellFilter(BRepMesh_VertexInspector::Dimension, 0., myAllocator),
+ myCellFilter(0., myAllocator),
mySelector (Max(theReservedSize, 64),myAllocator)
{
const Standard_Real aTol = Precision::Confusion();
anIntervals2.Upper() - anIntervals2.Lower())
* Precision::PConfusion() / (2.0 * Sqrt(2.0));
Extrema_CCPointsInspector anInspector(Precision::PConfusion());
- NCollection_CellFilter<Extrema_CCPointsInspector> aFilter(Extrema_CCPointsInspector::Dimension, aCellSize);
+ NCollection_CellFilter<Extrema_CCPointsInspector> aFilter(aCellSize);
NCollection_Vector<gp_XY> aPnts;
Standard_Integer i,j,k;
//! By default cell size is 0, which is invalid; thus if default
//! constructor is used, the tool must be initialized later with
//! appropriate cell size by call to Reset()
+ //! Constructor when dimension count is unknown at compilation time.
NCollection_CellFilter (const Standard_Integer theDim,
const Standard_Real theCellSize = 0,
const Handle(NCollection_IncAllocator)& theAlloc = 0)
Reset (theCellSize, theAlloc);
}
+ //! Constructor when dimenstion count is known at compilation time.
+ NCollection_CellFilter (const Standard_Real theCellSize = 0,
+ const Handle(NCollection_IncAllocator)& theAlloc = 0)
+ : myCellSize(0, Inspector::Dimension - 1)
+ {
+ myDim = Inspector::Dimension;
+ Reset (theCellSize, theAlloc);
+ }
+
//! Clear the data structures, set new cell size and allocator
void Reset (Standard_Real theCellSize,
const Handle(NCollection_IncAllocator)& theAlloc=0)
ReadMesh->AddDomain ();
// Filter unique vertices to share the nodes of the mesh.
- BRepBuilderAPI_CellFilter uniqueVertices(BRepBuilderAPI_VertexInspector::Dimension, Precision::Confusion());
+ BRepBuilderAPI_CellFilter uniqueVertices(Precision::Confusion());
BRepBuilderAPI_VertexInspector inspector(Precision::Confusion());
for (ifacet=1; ifacet<=NBFACET; ++ifacet) {
ReadMesh->AddDomain();
// Filter unique vertices to share the nodes of the mesh.
- BRepBuilderAPI_CellFilter uniqueVertices(BRepBuilderAPI_VertexInspector::Dimension, Precision::Confusion());
+ BRepBuilderAPI_CellFilter uniqueVertices(Precision::Confusion());
BRepBuilderAPI_VertexInspector inspector(Precision::Confusion());
// main reading