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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user