0024646: Wrong result done by Boolean Operation algorithm

1. class BOPAlgo_PaveFiller
   method void BOPAlgo_PaveFiller::PerformEF()
   Do not create intersection vertices in case if it lies ON the boundary of the face.
2. class IntTools_Context
   New method
    Standard_Boolean IntTools_Context::IsPointInFace
        (const gp_Pnt& aP,
         const TopoDS_Face& aF,
         const Standard_Real aTol)
   has been implemented to check if the point IN the face.
3. class IntTools_EdgeFace
   method
    void IntTools_EdgeEdge::FindBestSolution(const Standard_Real aT11,
                                         const Standard_Real aT12,
                                         const Standard_Real aT21,
                                         const Standard_Real aT22,
                                         Standard_Real& aT1,
                                         Standard_Real& aT2)
   Treatment of the touching cases.

Test cases for issue CR24646

Correction of test cases for issue CR24646
This commit is contained in:
emv
2015-02-19 16:07:21 +03:00
committed by bugmaster
parent 7ad63454a5
commit bd28b2afac
13 changed files with 312 additions and 88 deletions

View File

@@ -70,14 +70,15 @@
static
Standard_Boolean IsCoplanar (const BRepAdaptor_Curve& ,
const BRepAdaptor_Surface& );
const BRepAdaptor_Surface& );
static
Standard_Boolean IsRadius (const BRepAdaptor_Curve& aCurve ,
const BRepAdaptor_Surface& aSurface);
const BRepAdaptor_Surface& aSurface,
const Standard_Real aCriteria);
static
Standard_Integer AdaptiveDiscret (const Standard_Integer iDiscret,
const BRepAdaptor_Curve& aCurve ,
const BRepAdaptor_Surface& aSurface);
const BRepAdaptor_Curve& aCurve ,
const BRepAdaptor_Surface& aSurface);
//=======================================================================
//function : IntTools_EdgeFace::IntTools_EdgeFace
@@ -1309,14 +1310,14 @@ void IntTools_EdgeFace::Perform()
if (bIsTouch) {
aCP.SetType(TopAbs_VERTEX);
aCP.SetVertexParameter1(aTx);
aCP.SetRange1 (aTx, aTx);
//aCP.SetRange1 (aTx, aTx);
}
}
if (aType==TopAbs_VERTEX) {
else if (aType==TopAbs_VERTEX) {
bIsTouch=CheckTouchVertex (aCP, aTx);
if (bIsTouch) {
aCP.SetVertexParameter1(aTx);
aCP.SetRange1 (aTx, aTx);
//aCP.SetRange1 (aTx, aTx);
}
}
}
@@ -1327,7 +1328,7 @@ void IntTools_EdgeFace::Perform()
if (aCType==GeomAbs_Circle && aSType==GeomAbs_Plane) {
Standard_Boolean bIsCoplanar, bIsRadius;
bIsCoplanar=IsCoplanar(myC, myS);
bIsRadius=IsRadius(myC, myS);
bIsRadius=IsRadius(myC, myS, myCriteria);
if (!bIsCoplanar && !bIsRadius) {
for (i=1; i<=aNb; i++) {
IntTools_CommonPrt& aCP=mySeqOfCommonPrts(i);
@@ -1337,7 +1338,14 @@ void IntTools_EdgeFace::Perform()
if (bIsTouch) {
aCP.SetType(TopAbs_VERTEX);
aCP.SetVertexParameter1(aTx);
aCP.SetRange1 (aTx, aTx);
//aCP.SetRange1 (aTx, aTx);
}
}
else if (aType==TopAbs_VERTEX) {
bIsTouch=CheckTouchVertex (aCP, aTx);
if (bIsTouch) {
aCP.SetVertexParameter1(aTx);
//aCP.SetRange1 (aTx, aTx);
}
}
}
@@ -1483,8 +1491,9 @@ Standard_Boolean IsCoplanar (const BRepAdaptor_Curve& aCurve ,
//function : IsRadius
//purpose :
//=======================================================================
Standard_Boolean IsRadius (const BRepAdaptor_Curve& aCurve ,
const BRepAdaptor_Surface& aSurface)
Standard_Boolean IsRadius (const BRepAdaptor_Curve& aCurve,
const BRepAdaptor_Surface& aSurface,
const Standard_Real aCriteria)
{
Standard_Boolean bFlag=Standard_False;
@@ -1500,7 +1509,7 @@ Standard_Boolean IsRadius (const BRepAdaptor_Curve& aCurve ,
Standard_Real aR=aCirc.Radius();
gp_Pln aPln=aSurface.Plane();
Standard_Real aD=aPln.Distance(aCenter);
if (fabs (aD-aR) < 1.e-7) {
if (fabs (aD-aR) < aCriteria) {
return !bFlag;
}
}