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

0027035: General fuse algorithm loses face

The main reason of the bug is incorrect check, if the edge is seam-edge or not.
In the fix it is determined with new methods in GeomLib class.

The bug is fixed.

Creation of test case for this fix

Small correction in the code
This commit is contained in:
nbv
2016-02-15 13:51:12 +03:00
committed by abv
parent aff5997de8
commit 3906794761
6 changed files with 491 additions and 40 deletions

View File

@@ -891,3 +891,39 @@ Standard_Real MaxToleranceEdge (const TopoDS_Face& aF)
}
return aTolMax;
}
//=======================================================================
//function : IsEdgeIsoline
//purpose :
//=======================================================================
void BOPTools_AlgoTools2D::IsEdgeIsoline( const TopoDS_Edge& theE,
const TopoDS_Face& theF,
Standard_Boolean& isTheUIso,
Standard_Boolean& isTheVIso)
{
isTheUIso = isTheVIso = Standard_False;
gp_Vec2d aT;
gp_Pnt2d aP;
Standard_Real aFirst = 0.0, aLast = 0.0;
const Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface(theE, theF, aFirst, aLast);
aPC->D1(0.5*(aFirst+aLast), aP, aT);
const Standard_Real aSqMagn = aT.SquareMagnitude();
if(aSqMagn <= gp::Resolution())
return;
//Normalyze aT
aT /= sqrt(aSqMagn);
//sin(da) ~ da, when da->0.
const Standard_Real aTol = Precision::Angular();
const gp_Vec2d aRefVDir(0.0, 1.0), aRefUDir(1.0, 0.0);
const Standard_Real aDPv = aT.CrossMagnitude(aRefVDir),
aDPu = aT.CrossMagnitude(aRefUDir);
isTheUIso = (aDPv <= aTol);
isTheVIso = (aDPu <= aTol);
}