1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

# fix cone with holes

This commit is contained in:
mzernova 2024-07-31 16:04:36 +01:00
parent 8c3471161b
commit 9b6c641484

View File

@ -569,18 +569,24 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
static NCollection_Sequence<gp_Circ> getCylinderCircles (const TopoDS_Face& theHollowCylinder)
{
NCollection_Sequence<gp_Circ> aCircles;
Standard_Integer aLinesNb = 0;
TopExp_Explorer anEdgeExp;
for (anEdgeExp.Init (theHollowCylinder, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next())
{
const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgeExp.Current());
BRepAdaptor_Curve anAdaptor (anEdge);
aLinesNb++;
if (anAdaptor.GetType() == GeomAbs_Circle
&& BRep_Tool::IsClosed (anEdge))
{
aCircles.Append (anAdaptor.Circle());
}
else if (anAdaptor.GetType() != GeomAbs_Line || aLinesNb > 4)
{
return NCollection_Sequence<gp_Circ>();
}
}
return aCircles;