mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0027469: Modeling Algorithms - Regression vs 6.9.1: Wrong result of Edge/Face intersection
IntTools/IntTools_BeanFaceIntersector.cxx - decreasing parameter aDeltaRestrictor in method ComputeRangeFromStartPoint(...) to avoid "jumping" across the common part boundary. IntTools/IntTools_EdgeFace.cxx - method IsCoincident() - improving criteria of coincidence between edge and face.
This commit is contained in:
@@ -1140,7 +1140,7 @@ void IntTools_BeanFaceIntersector::ComputeRangeFromStartPoint(const Standard_Boo
|
||||
Standard_Integer aValidIndex = theIndex;
|
||||
|
||||
Standard_Real aMinDelta = myCurveResolution * 0.5;
|
||||
Standard_Real aDeltaRestrictor = myLastParameter - myFirstParameter;
|
||||
Standard_Real aDeltaRestrictor = 0.1 * (myLastParameter - myFirstParameter);
|
||||
|
||||
if(aMinDelta > aDeltaRestrictor)
|
||||
aMinDelta = aDeltaRestrictor * 0.5;
|
||||
@@ -1202,7 +1202,7 @@ void IntTools_BeanFaceIntersector::ComputeRangeFromStartPoint(const Standard_Boo
|
||||
|
||||
aDelta = (pointfound) ? (aDelta * 2.) : (aDelta * 0.5);
|
||||
aDelta = (aDelta < aDeltaRestrictor) ? aDelta : aDeltaRestrictor;
|
||||
|
||||
|
||||
aCurPar = (ToIncreaseParameter) ? (aPrevPar + aDelta) : (aPrevPar - aDelta);
|
||||
|
||||
|
||||
|
@@ -93,13 +93,18 @@ Standard_Boolean IntTools_EdgeFace::IsCoincident()
|
||||
myS.GetType() == GeomAbs_Plane)
|
||||
aNbSeg = 2; // Check only three points for Line/Plane intersection
|
||||
|
||||
const Standard_Real aTresh=0.5;
|
||||
const Standard_Real aTresh = 0.5;
|
||||
const Standard_Integer aTreshIdxF = RealToInt((aNbSeg+1)*0.25),
|
||||
aTreshIdxL = RealToInt((aNbSeg+1)*0.75);
|
||||
const Handle(Geom_Surface) aSurf = BRep_Tool::Surface(myFace);
|
||||
|
||||
aT1=myRange.First();
|
||||
aT2=myRange.Last();
|
||||
Standard_Real aBndShift = 0.01 * (aT2 - aT1);
|
||||
//Shifting first and last curve points in order to avoid projection
|
||||
//on surface boundary and rejection projection point with minimal distance
|
||||
aT1 += aBndShift;
|
||||
aT2 -= aBndShift;
|
||||
dT=(aT2-aT1)/aNbSeg;
|
||||
//
|
||||
Standard_Boolean isClassified = Standard_False;
|
||||
@@ -115,8 +120,11 @@ Standard_Boolean IntTools_EdgeFace::IsCoincident()
|
||||
//
|
||||
|
||||
aD=aProjector.LowerDistance();
|
||||
if (aD>myCriteria) {
|
||||
continue;
|
||||
if (aD > myCriteria) {
|
||||
if (aD > 100. * myCriteria)
|
||||
return Standard_False;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
//
|
||||
|
||||
|
Reference in New Issue
Block a user