1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0025039: Improvement of code structure of general and supporting tools implemented in BRepMesh

Removed CDL declarations; Data collections are replaced by NCollections; Small code refactoring.
Remove definition of BRepMesh class. Code refactoring of BRepMesh_IncrementalMesh.
Function BRepMesh_Write storing BRepMesh_DataStructureOfDelaun to BRep file is added for debug needs.
Static method BRepMesh_GeomTool::IntLinLin has been added to eliminate code duplications in BRepMesh_Dealun and BRepMesh_CircleTool.
BRepMesh_CircleTool simplified method to find circumcircle.

Fix merging conflicts
Remove redundant function
Fix compilation warning on MacOS
Revert changes occurred during rebase
Resolved merging conflicts
Use parallel flag with BRepMesh_FastDiscret

Test cases for issue CR25039_2
This commit is contained in:
oan
2014-07-10 14:51:15 +04:00
committed by apn
parent b6c0b841ec
commit fc9b36d630
109 changed files with 5266 additions and 6602 deletions

View File

@@ -41,6 +41,8 @@
#include <StdPrs_ToolShadedShape.hxx>
#include <StdPrs_WFShape.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
@@ -132,11 +134,11 @@ namespace
// Precision for compare square distances
const Standard_Real aPreci = Precision::SquareConfusion();
StdPrs_ToolShadedShape aShapeTool;
for (aShapeTool.Init (theShape); aShapeTool.MoreFace(); aShapeTool.NextFace())
TopExp_Explorer aFaceIt(theShape, TopAbs_FACE);
for (; aFaceIt.More(); aFaceIt.Next())
{
const TopoDS_Face& aFace = aShapeTool.CurrentFace();
aT = aShapeTool.Triangulation (aFace, aLoc);
const TopoDS_Face& aFace = TopoDS::Face(aFaceIt.Current());
aT = StdPrs_ToolShadedShape::Triangulation (aFace, aLoc);
if (!aT.IsNull())
{
aNbTriangles += aT->NbTriangles();
@@ -151,10 +153,10 @@ namespace
Handle(Graphic3d_ArrayOfTriangles) anArray = new Graphic3d_ArrayOfTriangles (aNbVertices, 3 * aNbTriangles,
Standard_True, Standard_False, theHasTexels);
Standard_Real aUmin (0.0), aUmax (0.0), aVmin (0.0), aVmax (0.0), dUmax (0.0), dVmax (0.0);
for (aShapeTool.Init (theShape); aShapeTool.MoreFace(); aShapeTool.NextFace())
for (aFaceIt.Init (theShape, TopAbs_FACE); aFaceIt.More(); aFaceIt.Next())
{
const TopoDS_Face& aFace = aShapeTool.CurrentFace();
aT = aShapeTool.Triangulation (aFace, aLoc);
const TopoDS_Face& aFace = TopoDS::Face(aFaceIt.Current());
aT = StdPrs_ToolShadedShape::Triangulation (aFace, aLoc);
if (aT.IsNull())
{
continue;
@@ -165,7 +167,7 @@ namespace
const TColgp_Array1OfPnt& aNodes = aT->Nodes();
const TColgp_Array1OfPnt2d& aUVNodes = aT->UVNodes();
TColgp_Array1OfDir aNormals (aNodes.Lower(), aNodes.Upper());
aShapeTool.Normal (aFace, aPolyConnect, aNormals);
StdPrs_ToolShadedShape::Normal (aFace, aPolyConnect, aNormals);
if (theHasTexels)
{
@@ -201,7 +203,7 @@ namespace
Standard_Integer anIndex[3];
for (Standard_Integer aTriIter = 1; aTriIter <= aT->NbTriangles(); ++aTriIter)
{
if (aShapeTool.Orientation (aFace) == TopAbs_REVERSED)
if (aFace.Orientation() == TopAbs_REVERSED)
{
aTriangles (aTriIter).Get (anIndex[0], anIndex[2], anIndex[1]);
}