1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0025154: Collections in BRepMesh package are named in non-conformant manner

- BRepMesh converted to nocdlpack,
- Collections are defined in namespace BRepMesh,
- Doxygen comments corrected to use @ instead of \.
This commit is contained in:
oan
2014-09-17 17:00:32 +04:00
committed by bugmaster
parent d9ff84e8ea
commit 848fa7e315
46 changed files with 1173 additions and 1191 deletions

View File

@@ -22,14 +22,32 @@
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.),
@@ -40,21 +58,10 @@ BRepMesh_FaceAttribute::BRepMesh_FaceAttribute(
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();
}
//=======================================================================
@@ -72,6 +79,29 @@ BRepMesh_FaceAttribute::~BRepMesh_FaceAttribute()
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 :
@@ -96,7 +126,9 @@ Handle(BRepMesh_DataStructureOfDelaun)& BRepMesh_FaceAttribute::ResetStructure()
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();
@@ -125,8 +157,8 @@ Standard_Boolean BRepMesh_FaceAttribute::getVertexIndex(
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
@@ -164,3 +196,21 @@ gp_XY BRepMesh_FaceAttribute::Scale(const gp_XY& thePoint2d,
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);
}