1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024040: The result of CUT operation is not correct

Changed the way of getting point inside face for detecting same domain faces.
Adding test case for this fix
This commit is contained in:
emv
2013-07-04 14:19:17 +04:00
parent afed7fd721
commit e656bcbe59
2 changed files with 30 additions and 10 deletions

View File

@@ -840,7 +840,7 @@ static
Handle(BOPInt_Context)& theContext)
{
Standard_Boolean bFlag;
Standard_Integer iP;
Standard_Integer iErr;
Standard_Real aTolF1, aTolF2, aTol;
gp_Pnt2d aP2D;
gp_Pnt aP;
@@ -857,27 +857,22 @@ static
//
aTolF1=BRep_Tool::Tolerance(aF1);
// 1
iP=0;
aExp.Init(aF1, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
aE1=(*(TopoDS_Edge*)(&aExp.Current()));
if (!BRep_Tool::Degenerated(aE1)) {
iP=1;
//break;
Standard_Real aTolE = BRep_Tool::Tolerance(aE1);
aTolF1 = (aTolE > aTolF1) ? aTolE : aTolF1;
}
}
if (!iP) {
return bFlag;
}
//
// 2
aTolF2=BRep_Tool::Tolerance(aF2);
aTol=aTolF1+aTolF2;
//
BOPTools_AlgoTools3D::PointNearEdge(aE1, aF1, aP2D, aP, theContext);
bFlag=theContext->IsValidPointForFace(aP, aF2, aTol);
iErr = BOPTools_AlgoTools3D::PointInFace(aF1, aP, aP2D, theContext);
if (!iErr) {
bFlag=theContext->IsValidPointForFace(aP, aF2, aTol);
}
//
return bFlag;
}