mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 21:22:04 +05:00
0052994: Remove Extra Edges makes a shape invalid
This commit is contained in:
parent
326bf4caf8
commit
f83b8bcd3a
@ -161,7 +161,7 @@ static Standard_Boolean IsToMerge
|
|||||||
|
|
||||||
isSame = Standard_True;
|
isSame = Standard_True;
|
||||||
|
|
||||||
for (; anIter1.More(); anIter1.Next()) {
|
for (; anIter1.More() && isSame; anIter1.Next()) {
|
||||||
TopoDS_Face aFace1 = TopoDS::Face(anIter1.Value());
|
TopoDS_Face aFace1 = TopoDS::Face(anIter1.Value());
|
||||||
TopTools_ListIteratorOfListOfShape anIter2(aLst2);
|
TopTools_ListIteratorOfListOfShape anIter2(aLst2);
|
||||||
|
|
||||||
@ -581,16 +581,24 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
|||||||
if (C.IsNull()) {
|
if (C.IsNull()) {
|
||||||
// jfa for Mantis issue 0020228
|
// jfa for Mantis issue 0020228
|
||||||
if (PV1.Distance(PV2) > Precision::Confusion()) continue;
|
if (PV1.Distance(PV2) > Precision::Confusion()) continue;
|
||||||
// closed chain
|
// closed chain. Make a closed circular edge starting from V1.
|
||||||
if (edge1.Orientation() == TopAbs_FORWARD) {
|
gp_Ax1 anAxis = C1->Axis();
|
||||||
C = C1;
|
|
||||||
} else {
|
if (edge1.Orientation() == TopAbs_REVERSED) {
|
||||||
C = Handle(Geom_Circle)::DownCast(C1->Reversed());
|
anAxis.Reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const gp_Pnt &aP0 = anAxis.Location();
|
||||||
|
gp_Dir aDX(PV1.XYZ().Subtracted(aP0.XYZ()));
|
||||||
|
gp_Ax2 aNewAxis(aP0, anAxis.Direction(), aDX);
|
||||||
|
|
||||||
|
C = new Geom_Circle(aNewAxis, C1->Radius());
|
||||||
|
|
||||||
B.MakeEdge (E,C,Precision::Confusion());
|
B.MakeEdge (E,C,Precision::Confusion());
|
||||||
B.Add(E,V1);
|
B.Add(E,V1);
|
||||||
B.Add(E,V2);
|
B.Add(E,V2);
|
||||||
|
B.UpdateVertex(V1, 0., E, 0.);
|
||||||
|
B.UpdateVertex(V2, 2.*M_PI, E, 0.);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gp_Pnt P0 = C->Location();
|
gp_Pnt P0 = C->Location();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user