mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface
Removed workaround within GeomLib_CheckCurveOnSurface.
This commit is contained in:
parent
793d165af6
commit
3738565abb
@ -90,7 +90,7 @@ class BOPAlgo_FaceSelfIntersect :
|
|||||||
//
|
//
|
||||||
virtual void Perform() {
|
virtual void Perform() {
|
||||||
BOPAlgo_Algo::UserBreak();
|
BOPAlgo_Algo::UserBreak();
|
||||||
IntTools_FaceFace::Perform(myF, myF);
|
IntTools_FaceFace::Perform (myF, myF, myRunParallel);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
protected:
|
protected:
|
||||||
@ -428,6 +428,7 @@ void BOPAlgo_CheckerSI::CheckFaceSelfIntersection()
|
|||||||
|
|
||||||
BOPAlgo_FaceSelfIntersect& aFaceSelfIntersect = aVFace.Appended();
|
BOPAlgo_FaceSelfIntersect& aFaceSelfIntersect = aVFace.Appended();
|
||||||
//
|
//
|
||||||
|
aFaceSelfIntersect.SetRunParallel (myRunParallel);
|
||||||
aFaceSelfIntersect.SetIndex(i);
|
aFaceSelfIntersect.SetIndex(i);
|
||||||
aFaceSelfIntersect.SetFace(aF);
|
aFaceSelfIntersect.SetFace(aF);
|
||||||
aFaceSelfIntersect.SetTolF(aTolF);
|
aFaceSelfIntersect.SetTolF(aTolF);
|
||||||
|
@ -180,7 +180,7 @@ class BOPAlgo_FaceFace :
|
|||||||
myTrsf = aTrsf.Inverted();
|
myTrsf = aTrsf.Inverted();
|
||||||
}
|
}
|
||||||
|
|
||||||
IntTools_FaceFace::Perform (aF1, aF2);
|
IntTools_FaceFace::Perform (aF1, aF2, myRunParallel);
|
||||||
}
|
}
|
||||||
catch (Standard_Failure const&)
|
catch (Standard_Failure const&)
|
||||||
{
|
{
|
||||||
@ -292,6 +292,7 @@ void BOPAlgo_PaveFiller::PerformFF()
|
|||||||
//
|
//
|
||||||
BOPAlgo_FaceFace& aFaceFace=aVFaceFace.Appended();
|
BOPAlgo_FaceFace& aFaceFace=aVFaceFace.Appended();
|
||||||
//
|
//
|
||||||
|
aFaceFace.SetRunParallel (myRunParallel);
|
||||||
aFaceFace.SetIndices(nF1, nF2);
|
aFaceFace.SetIndices(nF1, nF2);
|
||||||
aFaceFace.SetFaces(aF1, aF2);
|
aFaceFace.SetFaces(aF1, aF2);
|
||||||
aFaceFace.SetBoxes (myDS->ShapeInfo (nF1).Box(), myDS->ShapeInfo (nF2).Box());
|
aFaceFace.SetBoxes (myDS->ShapeInfo (nF1).Box(), myDS->ShapeInfo (nF2).Box());
|
||||||
|
@ -649,7 +649,7 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
|
|||||||
aFF.SetList(aListOfPnts);
|
aFF.SetList(aListOfPnts);
|
||||||
aFF.SetFuzzyValue (BOPTest_Objects::FuzzyValue());
|
aFF.SetFuzzyValue (BOPTest_Objects::FuzzyValue());
|
||||||
//
|
//
|
||||||
aFF.Perform (aF1, aF2);
|
aFF.Perform (aF1, aF2, BOPTest_Objects::RunParallel());
|
||||||
//
|
//
|
||||||
anIsDone=aFF.IsDone();
|
anIsDone=aFF.IsDone();
|
||||||
if (!anIsDone) {
|
if (!anIsDone) {
|
||||||
|
@ -390,19 +390,9 @@ void GeomLib_CheckCurveOnSurface::Init( const Handle(Geom_Curve)& theCurve,
|
|||||||
//function : Perform
|
//function : Perform
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
#ifndef HAVE_TBB
|
|
||||||
//After fixing bug # 26365, this fragment should be deleted
|
|
||||||
//(together the text "#ifdef HAVE_TBB")
|
|
||||||
|
|
||||||
void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve,
|
|
||||||
const Standard_Boolean)
|
|
||||||
{
|
|
||||||
const Standard_Boolean isTheMTDisabled = Standard_True;
|
|
||||||
#else
|
|
||||||
void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve,
|
void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve,
|
||||||
const Standard_Boolean isTheMTDisabled)
|
const Standard_Boolean isTheMTDisabled)
|
||||||
{
|
{
|
||||||
#endif
|
|
||||||
if( myCurve.IsNull() ||
|
if( myCurve.IsNull() ||
|
||||||
mySurface.IsNull() ||
|
mySurface.IsNull() ||
|
||||||
thePCurve.IsNull())
|
thePCurve.IsNull())
|
||||||
|
@ -357,7 +357,8 @@ static Standard_Boolean isTreatAnalityc(const BRepAdaptor_Surface& theBAS1,
|
|||||||
//purpose : intersect surfaces of the faces
|
//purpose : intersect surfaces of the faces
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
|
void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
|
||||||
const TopoDS_Face& aF2)
|
const TopoDS_Face& aF2,
|
||||||
|
const Standard_Boolean theToRunParallel)
|
||||||
{
|
{
|
||||||
if (myContext.IsNull()) {
|
if (myContext.IsNull()) {
|
||||||
myContext=new IntTools_Context;
|
myContext=new IntTools_Context;
|
||||||
@ -560,7 +561,7 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
|
|||||||
MakeCurve(i, dom1, dom2, TolArc);
|
MakeCurve(i, dom1, dom2, TolArc);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
ComputeTolReached3d();
|
ComputeTolReached3d (theToRunParallel);
|
||||||
//
|
//
|
||||||
if (bReverse) {
|
if (bReverse) {
|
||||||
Handle(Geom2d_Curve) aC2D1, aC2D2;
|
Handle(Geom2d_Curve) aC2D1, aC2D2;
|
||||||
@ -624,7 +625,7 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
|
|||||||
//function :ComputeTolReached3d
|
//function :ComputeTolReached3d
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void IntTools_FaceFace::ComputeTolReached3d()
|
void IntTools_FaceFace::ComputeTolReached3d (const Standard_Boolean theToRunParallel)
|
||||||
{
|
{
|
||||||
Standard_Integer i, j, aNbLin = mySeqOfCurve.Length();
|
Standard_Integer i, j, aNbLin = mySeqOfCurve.Length();
|
||||||
if (!aNbLin) {
|
if (!aNbLin) {
|
||||||
@ -662,8 +663,7 @@ void IntTools_FaceFace::ComputeTolReached3d()
|
|||||||
// Look for the maximal deviation between 3D and 2D curves
|
// Look for the maximal deviation between 3D and 2D curves
|
||||||
Standard_Real aD, aT;
|
Standard_Real aD, aT;
|
||||||
const Handle(Geom_Surface)& aS = !j ? aS1 : aS2;
|
const Handle(Geom_Surface)& aS = !j ? aS1 : aS2;
|
||||||
if (IntTools_Tools::ComputeTolerance
|
if (IntTools_Tools::ComputeTolerance (aC3D, aC2D, aS, aFirst, aLast, aD, aT, Precision::PConfusion(), theToRunParallel))
|
||||||
(aC3D, aC2D, aS, aFirst, aLast, aD, aT))
|
|
||||||
{
|
{
|
||||||
if (aD > aTolC)
|
if (aD > aTolC)
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,9 @@ public:
|
|||||||
//! Intersects underliing surfaces of F1 and F2
|
//! Intersects underliing surfaces of F1 and F2
|
||||||
//! Use sum of tolerance of F1 and F2 as intersection
|
//! Use sum of tolerance of F1 and F2 as intersection
|
||||||
//! criteria
|
//! criteria
|
||||||
Standard_EXPORT void Perform (const TopoDS_Face& F1, const TopoDS_Face& F2);
|
Standard_EXPORT void Perform (const TopoDS_Face& F1,
|
||||||
|
const TopoDS_Face& F2,
|
||||||
|
const Standard_Boolean theToRunParallel = Standard_False);
|
||||||
|
|
||||||
|
|
||||||
//! Returns True if the intersection was successful
|
//! Returns True if the intersection was successful
|
||||||
@ -106,7 +108,7 @@ protected:
|
|||||||
//! as a maximal deviation between 3D curve and 2D curves on faces.<br>
|
//! as a maximal deviation between 3D curve and 2D curves on faces.<br>
|
||||||
//! If there are no 2D curves the maximal deviation between 3D curves
|
//! If there are no 2D curves the maximal deviation between 3D curves
|
||||||
//! and surfaces is computed.
|
//! and surfaces is computed.
|
||||||
Standard_EXPORT void ComputeTolReached3d();
|
Standard_EXPORT void ComputeTolReached3d (const Standard_Boolean theToRunParallel);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -792,12 +792,13 @@ Standard_Boolean IntTools_Tools::ComputeTolerance
|
|||||||
const Standard_Real theLast,
|
const Standard_Real theLast,
|
||||||
Standard_Real& theMaxDist,
|
Standard_Real& theMaxDist,
|
||||||
Standard_Real& theMaxPar,
|
Standard_Real& theMaxPar,
|
||||||
const Standard_Real theTolRange)
|
const Standard_Real theTolRange,
|
||||||
|
const Standard_Boolean theToRunParallel)
|
||||||
{
|
{
|
||||||
GeomLib_CheckCurveOnSurface aCS;
|
GeomLib_CheckCurveOnSurface aCS;
|
||||||
//
|
//
|
||||||
aCS.Init(theCurve3D, theSurf, theFirst, theLast, theTolRange);
|
aCS.Init(theCurve3D, theSurf, theFirst, theLast, theTolRange);
|
||||||
aCS.Perform(theCurve2D);
|
aCS.Perform (theCurve2D, !theToRunParallel);
|
||||||
if (!aCS.IsDone()) {
|
if (!aCS.IsDone()) {
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
@ -172,8 +172,8 @@ public:
|
|||||||
const Standard_Real theLast,
|
const Standard_Real theLast,
|
||||||
Standard_Real& theMaxDist,
|
Standard_Real& theMaxDist,
|
||||||
Standard_Real& theMaxPar,
|
Standard_Real& theMaxPar,
|
||||||
const Standard_Real theTolRange =
|
const Standard_Real theTolRange = Precision::PConfusion(),
|
||||||
Precision::PConfusion());
|
const Standard_Boolean theToRunParallel = Standard_False);
|
||||||
|
|
||||||
|
|
||||||
//! Computes the correct Intersection range for
|
//! Computes the correct Intersection range for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user