}
// get list of faces
- TopTools_ListOfShape LF;
- BRepLib::ReverseSortFaces(S,LF);
-
- // make array of faces suitable for processing (excluding faces without surface)
std::vector<TopoDS_Face> aFaces;
- for (TopTools_ListIteratorOfListOfShape it(LF); it.More(); it.Next())
{
- TopoDS_Face F = TopoDS::Face(it.Value());
-
- TopLoc_Location L1;
- const Handle(Geom_Surface)& Surf = BRep_Tool::Surface(F, L1);
- if(Surf.IsNull())
- continue;
-
- Update (F);
- aFaces.push_back (F);
+ TopTools_ListOfShape aFaceList;
+ BRepLib::ReverseSortFaces (S, aFaceList);
+ TopTools_MapOfShape aFaceMap;
+ aFaces.reserve (aFaceList.Extent());
+
+ // make array of faces suitable for processing (excluding faces without surface)
+ TopLoc_Location aDummyLoc;
+ const TopLoc_Location anEmptyLoc;
+ for (TopTools_ListIteratorOfListOfShape aFaceIter (aFaceList); aFaceIter.More(); aFaceIter.Next())
+ {
+ TopoDS_Shape aFaceNoLoc = aFaceIter.Value();
+ aFaceNoLoc.Location (anEmptyLoc);
+ if (!aFaceMap.Add (aFaceNoLoc))
+ continue; // already processed
+
+ TopoDS_Face aFace = TopoDS::Face (aFaceIter.Value());
+ const Handle(Geom_Surface)& aSurf = BRep_Tool::Surface (aFace, aDummyLoc);
+ if (aSurf.IsNull())
+ continue;
+
+ Update (aFace);
+ aFaces.push_back (aFace);
+ }
}
if (myInParallel)
}
}
else checks = thecopier->SendAll(filename,thegraph->Graph(),thelibrary,theprotocol);
-
+ Handle_Interface_Check aMainFail = checks.CCheck(0);
+ if (!aMainFail.IsNull() && aMainFail->HasFailed ())
+ {
+ return IFSelect_RetStop;
+ }
if (theloaded.Length() == 0) theloaded.AssignCat(filename);
thecheckrun = checks;
if (checks.IsEmpty(Standard_True)) return IFSelect_RetDone;
#include <TColgp_Array1OfPnt2d.hxx>
#include <Poly_Polygon3D.hxx>
#include <Poly_Polygon2D.hxx>
+#include <Standard.hxx>
static Standard_Integer mpnames (Draw_Interpretor& , Standard_Integer , const char** );
static Standard_Integer mpsetdefaultname (Draw_Interpretor& , Standard_Integer , const char** );
{
Standard_Boolean isParallelOn = atoi (argv[1]) == 1;
BRepMesh_IncrementalMesh::SetParallelDefault (isParallelOn);
+ if (isParallelOn)
+ Standard::SetReentrant(Standard_True);
}
std::cout << "Incremental Mesh, multi-threading "
<< (BRepMesh_IncrementalMesh::IsParallelDefault() ? "ON\n" : "OFF\n");