mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-29 02:40:36 +05:00
0021036: EDF 1633 GEOM: A degenerated edge is created in Fillet_1D
This commit is contained in:
parent
93a152798f
commit
99388a9c64
@ -504,18 +504,15 @@ TopoDS_Edge GEOMImpl_Fillet1d::Result(const gp_Pnt& thePoint,
|
|||||||
else
|
else
|
||||||
anEnd = aNearest->GetParam();
|
anEnd = aNearest->GetParam();
|
||||||
|
|
||||||
//Check the case when start and end are identical. This happens
|
if (fabs(aStart - anEnd) > Precision::Confusion())
|
||||||
//when the edge decreases to size 0. Old ww5 allows such
|
{
|
||||||
//cases. So we are again bug compatible
|
//Divide edge
|
||||||
if (fabs(aStart - anEnd) < Precision::PConfusion()/*gp::Resolution()*/)
|
BRepBuilderAPI_MakeEdge aDivider1(aCurve, aStart, anEnd);
|
||||||
anEnd = 0.01;
|
if (myEdgesExchnged)
|
||||||
//Divide edge
|
theEdge2 = aDivider1.Edge();
|
||||||
BRepBuilderAPI_MakeEdge aDivider1(aCurve, aStart, anEnd);
|
else
|
||||||
if (myEdgesExchnged)
|
theEdge1 = aDivider1.Edge();
|
||||||
theEdge2 = aDivider1.Edge();
|
}
|
||||||
else
|
|
||||||
theEdge1 = aDivider1.Edge();
|
|
||||||
|
|
||||||
|
|
||||||
aCurve = BRep_Tool::Curve(myEdge2, aStart, anEnd);
|
aCurve = BRep_Tool::Curve(myEdge2, aStart, anEnd);
|
||||||
aCurve->D1(aNearest->GetParam2(), aPoint2, aDir);
|
aCurve->D1(aNearest->GetParam2(), aPoint2, aDir);
|
||||||
@ -526,16 +523,14 @@ TopoDS_Edge GEOMImpl_Fillet1d::Result(const gp_Pnt& thePoint,
|
|||||||
else
|
else
|
||||||
anEnd = aNearest->GetParam2();
|
anEnd = aNearest->GetParam2();
|
||||||
|
|
||||||
//Check the case when start and end are identical. This happens
|
if (fabs(aStart - anEnd) > Precision::Confusion())
|
||||||
//when the edge decreases to size 0. Old ww5 allows such
|
{
|
||||||
//cases. So we are again bug compatible
|
BRepBuilderAPI_MakeEdge aDivider2(aCurve, aStart, anEnd);
|
||||||
if (fabs(aStart - anEnd) < Precision::PConfusion()/*gp::Resolution()*/)
|
if (myEdgesExchnged)
|
||||||
anEnd = 0.01;
|
theEdge1 = aDivider2.Edge();
|
||||||
BRepBuilderAPI_MakeEdge aDivider2(aCurve, aStart, anEnd);
|
else
|
||||||
if (myEdgesExchnged)
|
theEdge2 = aDivider2.Edge();
|
||||||
theEdge1 = aDivider2.Edge();
|
}
|
||||||
else
|
|
||||||
theEdge2 = aDivider2.Edge();
|
|
||||||
|
|
||||||
delete aNearest;
|
delete aNearest;
|
||||||
return aResult;
|
return aResult;
|
||||||
|
@ -235,9 +235,9 @@ Standard_Integer GEOMImpl_Fillet1dDriver::Execute(TFunction_Logbook& log) const
|
|||||||
|
|
||||||
// check if face edges modified,
|
// check if face edges modified,
|
||||||
// if yes, than map to original edges (from vertex-edges list), because edges can be modified before
|
// if yes, than map to original edges (from vertex-edges list), because edges can be modified before
|
||||||
if (!aModifE1.IsNull() && !aModifE1.IsSame( anEdge1 ))
|
if (aModifE1.IsNull() || !anEdge1.IsSame( aModifE1 ))
|
||||||
addEdgeRelation( anEdgeToEdgeMap, TopoDS::Edge(aVertexEdges.First()), aModifE1 );
|
addEdgeRelation( anEdgeToEdgeMap, TopoDS::Edge(aVertexEdges.First()), aModifE1 );
|
||||||
if (!aModifE2.IsNull() && !aModifE2.IsSame( anEdge2 ))
|
if (aModifE2.IsNull() || !anEdge2.IsSame( aModifE2 ))
|
||||||
addEdgeRelation( anEdgeToEdgeMap, TopoDS::Edge(aVertexEdges.Last()), aModifE2 );
|
addEdgeRelation( anEdgeToEdgeMap, TopoDS::Edge(aVertexEdges.Last()), aModifE2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ Standard_Integer GEOMImpl_Fillet1dDriver::Execute(TFunction_Logbook& log) const
|
|||||||
TopoDS_Shape anEdge = anExp.Current();
|
TopoDS_Shape anEdge = anExp.Current();
|
||||||
if ( !anEdgeToEdgeMap.IsBound( anEdge ) )
|
if ( !anEdgeToEdgeMap.IsBound( anEdge ) )
|
||||||
aListOfNewEdge.Append( anEdge );
|
aListOfNewEdge.Append( anEdge );
|
||||||
else
|
else if (!anEdgeToEdgeMap.Find( anEdge ).IsNull())
|
||||||
aListOfNewEdge.Append( anEdgeToEdgeMap.Find( anEdge ) );
|
aListOfNewEdge.Append( anEdgeToEdgeMap.Find( anEdge ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user