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

0025656: Specification of semantic of Closed flag of an edge

1. Using of the "Closed" flag was unified:
  a) this flag is applicable for TopoDS_Wire and TopoDS_Shell only, because these entities may hedge an area in 2D space or a volume in 3D space correspondingly;
  b) other types of TopoDS shapes are passing over this flag;
  c) changing of this flag should be controlled by high-level algorithms (not BRep_Builder).
2. Implemented verification of the closedness of edges. An edge is closed if and only if its first and last vertices are the same.
3. Test cases were changed according to new behavior.
This commit is contained in:
azv
2014-12-30 07:37:51 +03:00
committed by bugmaster
parent a195430212
commit da72a17c80
43 changed files with 87 additions and 238 deletions

View File

@@ -361,15 +361,9 @@ Standard_Boolean BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge,
Standard_Real First, Last;
BRep_Builder B;
Standard_Boolean is_closed ;
is_closed = AnEdge.Closed() ;
B.UpdateEdge(AnEdge,C3d,LocalLoc,0.0e0);
BRep_Tool::Range(AnEdge, S, LC, First, Last);
B.Range(AnEdge, First, Last); //Do not forget 3D range.(PRO6412)
TopoDS_Edge E = AnEdge ;
E.Closed(is_closed) ;
}
else {
//
@@ -430,14 +424,10 @@ Standard_Boolean BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge,
max_deviation = Max( tolerance, Tolerance );
if (NewCurvePtr.IsNull())
return Standard_False;
Standard_Boolean is_closed ;
is_closed = AnEdge.Closed() ;
B.UpdateEdge(TopoDS::Edge(AnEdge),
NewCurvePtr,
L[0],
max_deviation) ;
TopoDS_Edge E = AnEdge ;
E.Closed(is_closed) ;
if (jj == 1 ) {
//
// if there is only one curve on surface attached to the edge

View File

@@ -279,7 +279,6 @@ void BRepLib_MakeWire::Add(const TopoDS_Edge& E)
// copy the edge
TopoDS_Shape Dummy = EE.EmptyCopied();
myEdge = TopoDS::Edge(Dummy);
myEdge.Closed(EE.Closed());
for (it.Initialize(EE); it.More(); it.Next()) {

View File

@@ -97,7 +97,6 @@ void BRepLib_MakeWire::Add(const TopTools_ListOfShape& L)
TopoDS_Edge newEd=TopoDS::Edge(aLocalShape);
// TopoDS_Edge newEd=TopoDS::Edge(curEd.EmptyCopied());
BB.Transfert(curEd, newEd);
newEd.Closed(curEd.Closed());
TopTools_ListIteratorOfListOfShape itV(nlist);
for (; itV.More(); itV.Next()) {
BB.Add(newEd, itV.Value());