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

0027356: BRepTools::Clean() does not clean free edges from Poly_Polygon3D

Added code to clean 3D polygons on edges in BRepTools::Clean().
This commit is contained in:
oan
2016-04-15 17:12:28 +03:00
committed by bugmaster
parent 28c08a7d40
commit a4ab454c0f
2 changed files with 33 additions and 0 deletions

View File

@@ -874,6 +874,21 @@ void BRepTools::Clean(const TopoDS_Shape& theShape)
aBuilder.UpdateFace(aFace, aNullTriangulation);
}
// Iterate over all edges seeking for 3d polygons
Handle (Poly_Polygon3D) aNullPoly3d;
TopExp_Explorer aEdgeIt (theShape, TopAbs_EDGE);
for (; aEdgeIt.More (); aEdgeIt.Next ())
{
const TopoDS_Edge& aEdge = TopoDS::Edge (aEdgeIt.Current ());
TopLoc_Location aLoc;
Handle (Poly_Polygon3D) aPoly3d = BRep_Tool::Polygon3D (aEdge, aLoc);
if (aPoly3d.IsNull ())
continue;
aBuilder.UpdateEdge (aEdge, aNullPoly3d);
}
}
//=======================================================================