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

0022867: Avoid performing mesh of a singled face model in parallel mode when flag IsParallel is set to true.

This commit is contained in:
azn
2012-03-23 15:31:00 +04:00
committed by bugmaster
parent cf9a910a8a
commit 416d4426c4
9 changed files with 59 additions and 28 deletions

View File

@@ -38,7 +38,8 @@ uses
is
BuildIncrementalMesh (Shape : in Shape from TopoDS;
Deflection : in Real from Standard;
Deflection : in Real from Standard;
InParallel : in Boolean from Standard;
Mesh : Mesh from StlMesh)
raises ConstructionError;
end StlTransfer;

View File

@@ -36,7 +36,7 @@
#include <CSLib.hxx>
#include <gp_Dir.hxx>
#include <gp_XYZ.hxx>
#include <BRepMesh.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <TopAbs.hxx>
#include <Precision.hxx>
#include <TopExp_Explorer.hxx>
@@ -113,15 +113,16 @@ static void Normal(const TopoDS_Face& aFace,
}
void StlTransfer::BuildIncrementalMesh (const TopoDS_Shape& Shape,
const Standard_Real Deflection,
const Handle(StlMesh_Mesh)& Mesh)
const Standard_Real Deflection,
const Standard_Boolean InParallel,
const Handle(StlMesh_Mesh)& Mesh)
{
if (Deflection <= Precision::Confusion ()) {
Standard_ConstructionError::Raise ("StlTransfer::BuildIncrementalMesh");
}
Standard_Integer NbVertices, NbTriangles;
BRepMesh::Mesh (Shape, Deflection);
BRepMesh_IncrementalMesh aMesher(Shape, Deflection, Standard_False, 0.5, InParallel);
for (TopExp_Explorer itf(Shape,TopAbs_FACE); itf.More(); itf.Next()) {
TopoDS_Face face = TopoDS::Face(itf.Current());
TopLoc_Location Loc, loc;