1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

@@ -1795,7 +1795,7 @@ Standard_Integer TopOpeBRepBuild_Builder1::IsSame2d (const TopTools_SequenceOfSh
if (!(aBAS.IsUPeriodic() || aBAS.IsVPeriodic())) return 1;
//we process here only fully closed edges (Vf == Vl)
if(!anEdgeObj.Closed() || !anEdgeTool.Closed())
if(!BRep_Tool::IsClosed(anEdgeObj) || !BRep_Tool::IsClosed(anEdgeTool))
return 1;
Standard_Real f = 0., l = 0., tolpc = 0. ,

View File

@@ -553,8 +553,6 @@ void TopOpeBRepBuild_Builder1::Destroy()
Vl = TopoDS::Vertex(myDataStructure->Shape(iref));
Vl.Orientation(TopAbs_REVERSED);
}
Standard_Boolean bitclosed = Vf.IsSame(Vl);
aNewEdge.Closed(bitclosed);
myBuildTool.AddEdgeVertex (aNewEdge, Vf);
myBuildTool.Parameter (aNewEdge, Vf, ParF);
@@ -841,9 +839,6 @@ void TopOpeBRepBuild_Builder1::Destroy()
// Make new edge from EdgeF
TopoDS_Edge aNewEdge;
myBuildTool.CopyEdge (EdgeF, aNewEdge);
Standard_Boolean bitclosed = aV1.IsSame(aV2);
aNewEdge.Closed(bitclosed);
myBuildTool.AddEdgeVertex (aNewEdge, aV1);
myBuildTool.Parameter (aNewEdge, aV1, aPar1);

View File

@@ -152,7 +152,6 @@ Standard_Integer TopOpeBRepBuild_Builder1::CorrectResult2d(TopoDS_Shape& aResult
aShell.Closed (BRep_Tool::IsClosed(aShell));
BB.Add (aSolid, aShell);
}
aSolid.Closed (BRep_Tool::IsClosed(aSolid));
aResult=aSolid;
//update section curves

View File

@@ -145,7 +145,7 @@ Standard_Integer FUN_AnalyzemapVon1E(const TopTools_IndexedDataMapOfShapeShape&
}
else if (nV == 1) {
const TopoDS_Shape& E = mapVon1E.FindFromIndex(1);
Standard_Boolean Eclosed = E.Closed();
Standard_Boolean Eclosed = BRep_Tool::IsClosed(E);
Standard_Boolean dgE = BRep_Tool::Degenerated(TopoDS::Edge(E));
if (dgE) res = ISVERTEX;
else if (Eclosed) res = CLOSEDW;
@@ -319,7 +319,7 @@ void TopOpeBRepBuild_FaceBuilder::DetectUnclosedWire(TopTools_IndexedDataMapOfSh
{
const TopoDS_Edge &E = TopoDS::Edge (itE.Value());
Standard_Integer I = myBlockBuilder.Element(E);
if (!E.Closed() && myBlockBuilder.ElementIsValid(I))
if (!BRep_Tool::IsClosed(E) && myBlockBuilder.ElementIsValid(I))
{
TopoDS_Vertex Vf,Vl;
TopExp::Vertices (E, Vf, Vl);

View File

@@ -150,11 +150,6 @@ void TopOpeBRepBuild_Builder::GEDBUMakeEdges
} // EDBUloop.InitVertex : on vertices of new edge newEdge
Standard_Boolean addedge = (nVF == 1 && nVR == 1);
Standard_Boolean bitclosed = Standard_False;
if (nVF == 1 && nVR == 1) {
bitclosed = VF.IsSame(VR);
newEdge.Closed(bitclosed);
}
if (addedge) {
if (tosplit) {
TopTools_ListOfShape loe; Standard_Boolean ok = TopOpeBRepTool_TOOL::SplitE(TopoDS::Edge(newEdge),loe);