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

@@ -89,15 +89,24 @@
static Standard_Integer writestl
(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<3 || argc>4) di << "Use: " << argv[0] << "shape file [ascii/binary (0/1) : 1 by default]" << "\n";
else {
TopoDS_Shape shape = DBRep::Get(argv[1]);
if (argc < 3 || argc > 5) {
di << "Use: " << argv[0]
<< " shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]" << "\n";
} else {
TopoDS_Shape aShape = DBRep::Get(argv[1]);
Standard_Boolean anASCIIMode = Standard_False;
Standard_Boolean isInParallel = Standard_False;
if (argc==4) {
Standard_Integer mode = atoi(argv[3]);
if (mode==0) anASCIIMode = Standard_True;
}
StlAPI::Write(shape, argv[2],anASCIIMode);
if (argc==5) {
isInParallel = atoi(argv[4]) == 1;
Standard::SetReentrant(isInParallel);
}
StlAPI_Writer aWriter;
aWriter.ASCIIMode() = anASCIIMode;
aWriter.Write (aShape, argv[2], isInParallel);
}
return 0;
}
@@ -961,7 +970,7 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands)
//XSDRAW::LoadDraw(theCommands);
theCommands.Add ("writevrml", "shape file",__FILE__,writevrml,g);
theCommands.Add ("writestl", "shape file [ascii/binary (0/1) : 1 by default]",__FILE__,writestl,g);
theCommands.Add ("writestl", "shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]",__FILE__,writestl,g);
theCommands.Add ("readstl", "shape file",__FILE__,readstl,g);
theCommands.Add ("loadvrml" , "shape file",__FILE__,loadvrml,g);
theCommands.Add ("storevrml" , "shape file defl [type]",__FILE__,storevrml,g);