1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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

@@ -65,7 +65,10 @@ is
-- file is an ASCII file. If the mode returns False, the
-- generated file is a binary file.
Write(me : in out; aShape : Shape from TopoDS; aFileName : CString from Standard);
Write(me : in out;
aShape : Shape from TopoDS;
aFileName : CString from Standard;
InParallel : Boolean from Standard = Standard_False);
---Purpose: Converts a given shape to STL format and writes it to file with a given filename.
fields

View File

@@ -54,17 +54,17 @@ Standard_Boolean& StlAPI_Writer::ASCIIMode()
return theASCIIMode;
}
void StlAPI_Writer::Write(const TopoDS_Shape& aShape,const Standard_CString aFileName)
void StlAPI_Writer::Write(const TopoDS_Shape& theShape, const Standard_CString theFileName, const Standard_Boolean theInParallel)
{
OSD_Path aFile(aFileName);
OSD_Path aFile(theFileName);
if (theRelativeMode) {
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
Bnd_Box Total;
BRepBndLib::Add(aShape, Total);
BRepBndLib::Add(theShape, Total);
Total.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
theDeflection = MAX3(aXmax-aXmin , aYmax-aYmin , aZmax-aZmin)*theCoefficient;
}
StlTransfer::BuildIncrementalMesh(aShape, theDeflection, theStlMesh);
StlTransfer::BuildIncrementalMesh(theShape, theDeflection, theInParallel, theStlMesh);
// Write the built mesh
if (theASCIIMode) {
RWStl::WriteAscii(theStlMesh, aFile);