static const Standard_Real aPipeLinearTolerance = 1.0e-4;
static const Standard_Real aPipeAngularTolerance = 1.0e-2;
-static const Standard_Boolean isParallelComputation = Standard_False;
const char aDirPatch[] = "D:\\nbv-29523\\shapes\\my\\";
static Standard_Boolean CheckSingularityAndAdd(const TopoDS_Face& theF,
TopTools_ListOfShape& theListOfFaces,
TopTools_ListOfShape& theListOfSplits);
-#define BREPFILL_VOLUVED_DEBUG
+//#define BREPFILL_VOLUVED_DEBUG
//=======================================================================
//function : GetSpineAndProfile
// Split interfered edges
BOPAlgo_PaveFiller aPF;
aPF.SetArguments(aLE);
- aPF.SetRunParallel(isParallelComputation);
+ aPF.SetRunParallel(myIsParallel);
aPF.Perform();
if (aPF.HasErrors())
aBuilder.AddArgument(aS);
}
- aBuilder.SetRunParallel(isParallelComputation);
+ aBuilder.SetRunParallel(myIsParallel);
aBuilder.PerformWithFiller(aPF);
if (aBuilder.HasErrors())
{
// Split interfered faces
BOPAlgo_PaveFiller aPF;
aPF.SetArguments(aLF);
- aPF.SetRunParallel(isParallelComputation);
+ aPF.SetRunParallel(myIsParallel);
aPF.SetFuzzyValue(myFuzzyValue);
aPF.Perform();
aBuilder.AddArgument(aS);
}
- aBuilder.SetRunParallel(isParallelComputation);
+ aBuilder.SetRunParallel(myIsParallel);
aBuilder.PerformWithFiller(aPF);
myPipeShell = aBuilder.Shape();
}
aMV.SetArguments(aLF);
aMV.SetFuzzyValue(myFuzzyValue);
aMV.SetIntersect(Standard_True);
- aMV.SetRunParallel(isParallelComputation);
+ aMV.SetRunParallel(myIsParallel);
aMV.SetAvoidInternalShapes(Standard_True);
aMV.Perform();
BOPAlgo_MakerVolume aMV;
aMV.SetArguments(theArgsList);
aMV.SetIntersect(Standard_True);
- aMV.SetRunParallel(isParallelComputation);
+ aMV.SetRunParallel(myIsParallel);
aMV.SetAvoidInternalShapes(Standard_True);
aMV.Perform();
//function : CheckSingularityAndAdd
//purpose : Returns TRUE if theF has been split
//=======================================================================
-Standard_Boolean CheckSingularityAndAdd(const TopoDS_Face& theF,
- const Standard_Real theFuzzyToler,
- TopTools_ListOfShape& theListOfFaces,
- TopTools_ListOfShape& theListOfSplits)
+Standard_Boolean BRepFill_Voluved::CheckSingularityAndAdd(const TopoDS_Face& theF,
+ const Standard_Real theFuzzyToler,
+ TopTools_ListOfShape& theListOfFaces,
+ TopTools_ListOfShape& theListOfSplits) const
{
const BRepAdaptor_Surface anAS(theF, Standard_False);
GeomAbs_SurfaceType aSType = anAS.GetType();
// Split interfered edges
BOPAlgo_PaveFiller aPF;
aPF.SetArguments(aLE);
- aPF.SetRunParallel(isParallelComputation);
+ aPF.SetRunParallel(myIsParallel);
aPF.Perform();
if (aPF.HasErrors())
aBuilder.AddArgument(aS);
}
- aBuilder.SetRunParallel(isParallelComputation);
+ aBuilder.SetRunParallel(myIsParallel);
aBuilder.PerformWithFiller(aPF);
if (aBuilder.HasErrors())
{
aBAB.AddArgument(aSh);
}
- aBAB.SetRunParallel(isParallelComputation);
+ aBAB.SetRunParallel(myIsParallel);
aBAB.SetNonDestructive(Standard_True);
aBAB.PerformWithFiller(aPF);
if (aBAB.HasErrors())
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
class BOPAlgo_MakerVolume;
+class TopoDS_Face;
//! Constructs an evolved volume from a spine (wire or face)
//! and a profile ( wire).
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_Voluved() :myErrorStatus(BRepFill_Voluved_Empty),
- myFuzzyValue(0.0)
+ myFuzzyValue(0.0),
+ myIsParallel(Standard_True)
{
}
return myResult;
}
+ //! Triggers computation mode between Parallel/Single-thread
+ void SetRunParallel(Standard_Boolean theValue)
+ {
+ myIsParallel = theValue;
+ }
+
protected:
Standard_EXPORT void PerformSweep();
Standard_EXPORT void GetSpineAndProfile(const TopoDS_Wire& theSpine,
const TopoDS_Wire& theProfile);
+ Standard_EXPORT Standard_Boolean CheckSingularityAndAdd(const TopoDS_Face& theF,
+ const Standard_Real theFuzzyToler,
+ TopTools_ListOfShape& theListOfFaces,
+ TopTools_ListOfShape& theListOfSplits) const;
+
+
private:
enum
TopoDS_Compound myTopBottom; // Lids can be split on several faces
TopoDS_Shape myResult;
Standard_Real myFuzzyValue;
-
+ Standard_Boolean myIsParallel;
};
const Standard_Boolean Solid,
const Standard_Boolean ProfOnSpine,
const Standard_Boolean theIsVolume,
- const Standard_Real Tol)
+ const Standard_Real Tol,
+ const Standard_Boolean theRunInParallel)
{
if (theIsVolume)
{
+ myVolume.SetRunParallel(theRunInParallel);
myVolume.Perform(Spine, Profil, Tol);
}
else
const Standard_Boolean Solid,
const Standard_Boolean ProfOnSpine,
const Standard_Boolean theIsVolume,
- const Standard_Real Tol)
+ const Standard_Real Tol,
+ const Standard_Boolean theRunInParallel)
{
if (theIsVolume)
{
+ myVolume.SetRunParallel(theRunInParallel);
myVolume.Perform(TopoDS::Wire(TopoDS_Iterator(Spine).Value()), Profil, Tol);
}
else
Standard_EXPORT BRepOffsetAPI_MakeEvolved();
- Standard_EXPORT BRepOffsetAPI_MakeEvolved(const TopoDS_Wire& Spine, const TopoDS_Wire& Profil, const GeomAbs_JoinType Join/* = GeomAbs_Arc*/, const Standard_Boolean AxeProf/* = Standard_True*/, const Standard_Boolean Solid/* = Standard_False*/, const Standard_Boolean ProfOnSpine/* = Standard_False*/, const Standard_Boolean theIsVolume, const Standard_Real Tol/* = Precision::Confusion()*/);
+ Standard_EXPORT BRepOffsetAPI_MakeEvolved(const TopoDS_Wire& Spine, const TopoDS_Wire& Profil, const GeomAbs_JoinType Join/* = GeomAbs_Arc*/, const Standard_Boolean AxeProf/* = Standard_True*/, const Standard_Boolean Solid/* = Standard_False*/, const Standard_Boolean ProfOnSpine/* = Standard_False*/, const Standard_Boolean theIsVolume, const Standard_Real Tol/* = Precision::Confusion()*/, const Standard_Boolean theRunInParallel);
//! These constructors construct an evolved shape by sweeping the profile
//! Profile along the spine Spine.
//! axis passing along the vertex and the normal to the
//! plane of the spine. At present, this is the only
//! construction type implemented.
- Standard_EXPORT BRepOffsetAPI_MakeEvolved(const TopoDS_Face& Spine, const TopoDS_Wire& Profil, const GeomAbs_JoinType Join/* = GeomAbs_Arc*/, const Standard_Boolean AxeProf/* = Standard_True*/, const Standard_Boolean Solid/* = Standard_False*/, const Standard_Boolean ProfOnSpine/* = Standard_False*/, const Standard_Boolean theIsVolume, const Standard_Real Tol/* = Precision::Confusion()*/);
+ Standard_EXPORT BRepOffsetAPI_MakeEvolved(const TopoDS_Face& Spine, const TopoDS_Wire& Profil, const GeomAbs_JoinType Join/* = GeomAbs_Arc*/, const Standard_Boolean AxeProf/* = Standard_True*/, const Standard_Boolean Solid/* = Standard_False*/, const Standard_Boolean ProfOnSpine/* = Standard_False*/, const Standard_Boolean theIsVolume, const Standard_Real Tol/* = Precision::Confusion()*/, const Standard_Boolean theRunInParallel);
Standard_EXPORT const BRepFill_Evolved& Evolved() const;
Standard_Real aTolerance = 0.0;
TopoDS_Shape Base;
TopoDS_Wire Prof;
+ Standard_Boolean isParallel = Standard_True;
for (Standard_Integer i = 2; i < n; i++)
{
return 1;
}
- if (!Solid && !strcmp(a[i], "-solid"))
+ if (!strcmp(a[i], "-solid"))
{
Solid = Standard_True;
continue;
}
+ if (!strcmp(a[i], "-stm"))
+ {
+ isParallel = Standard_False;
+ continue;
+ }
+
switch (a[i][1])
{
case 's':
TopoDS_Shape Volevo = IsAFace ? BRepOffsetAPI_MakeEvolved(TopoDS::Face(Base),
Prof, GeomAbs_Arc, !hasToComputeAxes,
- Solid, Standard_False, isVolume, aTolerance) :
+ Solid, Standard_False, isVolume,
+ aTolerance, isParallel) :
BRepOffsetAPI_MakeEvolved(TopoDS::Wire(Base),
Prof, GeomAbs_Arc, !hasToComputeAxes,
- Solid, Standard_False, isVolume, aTolerance);
+ Solid, Standard_False, isVolume,
+ aTolerance, isParallel);
DBRep::Set(a[1],Volevo);
}
// ################################ Extrude tool #########################################
- BRepOffsetAPI_MakeEvolved mkEvolved = BRepOffsetAPI_MakeEvolved(extrudeWire, toolWire, GeomAbs_Arc, Standard_False, Standard_True, Standard_False, Standard_True, 0);
+ BRepOffsetAPI_MakeEvolved mkEvolved = BRepOffsetAPI_MakeEvolved(extrudeWire, toolWire, GeomAbs_Arc, Standard_False, Standard_True, Standard_False, Standard_True, 0, Standard_True);
DBRep::Set(theArgVec[1], mkEvolved.Shape());