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:
@@ -256,6 +256,7 @@ TopoDS_Shape BRepSweep_NumLinearRegularSweep::Shape (const TopoDS_Shape& aGenS,
|
||||
TopoDS_Shape wi;
|
||||
myBuilder.MakeWire(wi);
|
||||
myBuilder.Add(wi,newShape,Or);
|
||||
wi.Closed(BRep_Tool::IsClosed(wi));
|
||||
WireSeq.Append(wi);
|
||||
}
|
||||
else{
|
||||
@@ -328,6 +329,7 @@ TopoDS_Shape BRepSweep_NumLinearRegularSweep::Shape (const TopoDS_Shape& aGenS,
|
||||
}
|
||||
}
|
||||
else{
|
||||
newWire.Closed(BRep_Tool::IsClosed(newWire));
|
||||
myBuilder.Add(myShapes(iGenS,iDirS),newWire);
|
||||
}
|
||||
myBuiltShapes(iGenS,iDirS) = Standard_True;
|
||||
@@ -393,7 +395,10 @@ TopoDS_Shape BRepSweep_NumLinearRegularSweep::Shape (const TopoDS_Shape& aGenS,
|
||||
}
|
||||
myBuiltShapes(iGenS,iDirS) = Standard_True;
|
||||
}
|
||||
myShapes(iGenS,iDirS).Closed (BRep_Tool::IsClosed (myShapes(iGenS,iDirS)));
|
||||
// Change the "Closed" flag only for Wires and Shells
|
||||
if (myShapes(iGenS, iDirS).ShapeType() == TopAbs_WIRE ||
|
||||
myShapes(iGenS, iDirS).ShapeType() == TopAbs_SHELL)
|
||||
myShapes(iGenS,iDirS).Closed (BRep_Tool::IsClosed (myShapes(iGenS,iDirS)));
|
||||
return myShapes(iGenS,iDirS);
|
||||
}
|
||||
|
||||
|
@@ -201,14 +201,7 @@ TopoDS_Shape BRepSweep_Rotation::MakeEmptyDirectingEdge
|
||||
Handle(Geom_Circle) GC = new Geom_Circle(Axis,O.Distance(P));
|
||||
Standard_Real tol = BRep_Tool::Tolerance(TopoDS::Vertex(aGenV));
|
||||
myBuilder.Builder().MakeEdge(E, GC, tol);
|
||||
|
||||
gp_Pnt PLast = GC->Value(myAng);
|
||||
if(PLast.SquareDistance(P) > tol*tol) E.Closed(Standard_False);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return E;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user