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

0025202: Incorrect value of IsClosed flag in shapes produced by some algorithms

Method BRep_Tool::IsClosed() extended to analyze closure of wires in addition to shells and solids.
External and Internal edges and vertices are ignored in this check.
Analysis of compounds is disabled.

Update of flag Closed according to actual state is added in most places where new shells are constructed.

Draw-command and test case for issue CR25202
This commit is contained in:
abv
2014-10-08 18:52:07 +04:00
committed by bugmaster
parent 2bc75a1bce
commit ab860031bd
53 changed files with 330 additions and 111 deletions

View File

@@ -122,6 +122,7 @@ static void MakeWire(const TopTools_Array1OfShape& Edges,
}
}
newwire.Orientation(TopAbs_FORWARD);
newwire.Closed (Standard_True);
}
static void CutEdge(const TopoDS_Edge& CurrentEdge,
@@ -349,6 +350,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
B.Add(W,Edge4);
B.Add(W,Edge2.Reversed());
B.Add(W,Edge3);
W.Closed (Standard_True);
B.Add(Face,W);
@@ -562,6 +564,7 @@ TopoDS_Shell BRepFill::Shell(const TopoDS_Wire& Wire1,
B.Add(W,Edge4);
B.Add(W,Edge2.Reversed());
B.Add(W,Edge3);
W.Closed (Standard_True);
B.Add(Face,W);
@@ -617,6 +620,7 @@ TopoDS_Shell BRepFill::Shell(const TopoDS_Wire& Wire1,
B.SameRange(Edge4,Standard_False);
}
Shell.Closed (BRep_Tool::IsClosed (Shell));
BRepLib::SameParameter(Shell);
return Shell;
}

View File

@@ -616,6 +616,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
TopoDS_Shell S;
B.MakeShell(S);
B.Add(S, StopShape);
S.Closed (BRep_Tool::IsClosed (S));
B.MakeSolid(Sol2);
B.Add(Sol2, S); // shell => solid (for fusion)
break;

View File

@@ -381,14 +381,10 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
}
// create the new surface
TopoDS_Shell shell;
TopoDS_Face face;
TopoDS_Wire W;
TopoDS_Edge edge1, edge2, edge3, edge4, couture;
BRep_Builder B;
B.MakeShell(shell);
TopoDS_Wire newW1, newW2;
BRep_Builder BW1, BW2;
BW1.MakeWire(newW1);

View File

@@ -589,6 +589,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
W.Closed(LastShape.Closed());
TheLast = W;
}
result.Closed (BRep_Tool::IsClosed (result));
break;
}
@@ -603,6 +604,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
if ( !mySpine.Closed() && !TheFirst.IsNull()) {
B.Add(result, TheFirst.Reversed());
}
result.Closed (BRep_Tool::IsClosed (result));
break;
}

View File

@@ -285,6 +285,7 @@ void BRepFill_TrimShellCorner::Perform()
for(ii = myFaces->LowerRow(); ii <= myFaces->UpperRow(); ii++) {
aBB.Add(aShell, myFaces->Value(ii, jj));
}
aShell.Closed (BRep_Tool::IsClosed (aShell));
if(jj == myFaces->LowerCol()) {
myShape1 = aShell;