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

0030940: BRepFilletAPI_MakeFillet algorithm fails on closed shell

1. Add check of configuration of corner in the end of spine.
2. Correct treatment of "smooth corners".
This commit is contained in:
jgv
2019-09-20 13:52:10 +03:00
committed by apn
parent bf327822d6
commit eff3eff916
33 changed files with 586 additions and 319 deletions

View File

@@ -149,9 +149,6 @@ static void TrimEdge (const TopoDS_Edge& Edge,
TColStd_SequenceOfReal& ThePar,
TopTools_SequenceOfShape& S);
static TopAbs_Orientation OriEdgeInFace (const TopoDS_Edge& E,
const TopoDS_Face& F);
static Standard_Integer PosOnFace (Standard_Real d1,
Standard_Real d2,
Standard_Real d3);
@@ -986,8 +983,8 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
// skin => same orientation E[0] , inverted orientation E[2]
// if contreskin it is inverted.
//--------------------------------------------------------------
E[0].Orientation(OriEdgeInFace(E[0],F[0]));
E[2].Orientation(OriEdgeInFace(E[2],F[1]));
E[0].Orientation(BRepTools::OriEdgeInFace(E[0],F[0]));
E[2].Orientation(BRepTools::OriEdgeInFace(E[2],F[1]));
if (DistanceToOZ(VF) < DistanceToOZ(VL) ) {
// Skin
@@ -1199,14 +1196,14 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
TopTools_ListIteratorOfListOfShape itl;
const TopTools_ListOfShape& LF = myMap(CurrentSpine)(VCF);
TopAbs_Orientation Ori = OriEdgeInFace(TopoDS::Edge(LF.First()),
TopAbs_Orientation Ori = BRepTools::OriEdgeInFace(TopoDS::Edge(LF.First()),
CurrentFace);
for (itl.Initialize(LF), itl.Next(); itl.More(); itl.Next()) {
TopoDS_Edge RE = TopoDS::Edge(itl.Value());
MapBis(CurrentFace).Append(RE.Oriented(Ori));
}
const TopTools_ListOfShape& LL = myMap(CurrentSpine)(VCL);
Ori = OriEdgeInFace(TopoDS::Edge(LL.First()),CurrentFace);
Ori = BRepTools::OriEdgeInFace(TopoDS::Edge(LL.First()),CurrentFace);
for (itl.Initialize(LL), itl.Next() ; itl.More(); itl.Next()) {
TopoDS_Edge RE = TopoDS::Edge(itl.Value());
MapBis(CurrentFace).Append(RE.Oriented(Ori));
@@ -2920,26 +2917,6 @@ static TopAbs_Orientation Relative (const TopoDS_Wire& W1,
return TopAbs_REVERSED;
}
//=======================================================================
//function : OriEdgeInFace
//purpose :
//=======================================================================
TopAbs_Orientation OriEdgeInFace (const TopoDS_Edge& E,
const TopoDS_Face& F )
{
TopExp_Explorer Exp(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
for (; Exp.More() ;Exp.Next()) {
if (Exp.Current().IsSame(E)) {
return Exp.Current().Orientation();
}
}
throw Standard_ConstructionError("BRepFill_Evolved::OriEdgeInFace");
}
//=======================================================================
//function : IsOnFace