mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
# fix cone with holes
This commit is contained in:
parent
8c3471161b
commit
9b6c641484
@ -569,18 +569,24 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
|
|||||||
static NCollection_Sequence<gp_Circ> getCylinderCircles (const TopoDS_Face& theHollowCylinder)
|
static NCollection_Sequence<gp_Circ> getCylinderCircles (const TopoDS_Face& theHollowCylinder)
|
||||||
{
|
{
|
||||||
NCollection_Sequence<gp_Circ> aCircles;
|
NCollection_Sequence<gp_Circ> aCircles;
|
||||||
|
Standard_Integer aLinesNb = 0;
|
||||||
|
|
||||||
TopExp_Explorer anEdgeExp;
|
TopExp_Explorer anEdgeExp;
|
||||||
for (anEdgeExp.Init (theHollowCylinder, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next())
|
for (anEdgeExp.Init (theHollowCylinder, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next())
|
||||||
{
|
{
|
||||||
const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgeExp.Current());
|
const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgeExp.Current());
|
||||||
BRepAdaptor_Curve anAdaptor (anEdge);
|
BRepAdaptor_Curve anAdaptor (anEdge);
|
||||||
|
aLinesNb++;
|
||||||
|
|
||||||
if (anAdaptor.GetType() == GeomAbs_Circle
|
if (anAdaptor.GetType() == GeomAbs_Circle
|
||||||
&& BRep_Tool::IsClosed (anEdge))
|
&& BRep_Tool::IsClosed (anEdge))
|
||||||
{
|
{
|
||||||
aCircles.Append (anAdaptor.Circle());
|
aCircles.Append (anAdaptor.Circle());
|
||||||
}
|
}
|
||||||
|
else if (anAdaptor.GetType() != GeomAbs_Line || aLinesNb > 4)
|
||||||
|
{
|
||||||
|
return NCollection_Sequence<gp_Circ>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return aCircles;
|
return aCircles;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user