1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00

0030805: Visualization, StdSelect_BRepSelectionTool - empty sensitivity from polygon-only Edge

StdSelect_BRepSelectionTool::GetEdgeSensitive() now takes polygon points before creating curve Adaptor.
This commit is contained in:
kgv 2019-06-24 15:03:49 +03:00 committed by apn
parent 841aa8c47b
commit e05d8d90c0

@ -443,6 +443,15 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
Handle(Select3D_SensitiveEntity)& theSensitive)
{
const TopoDS_Edge& anEdge = TopoDS::Edge (theShape);
// try to get points from existing polygons
Handle(TColgp_HArray1OfPnt) aPoints = GetPointsFromPolygon (anEdge);
if (!aPoints.IsNull()
&& !aPoints->IsEmpty())
{
theSensitive = new Select3D_SensitiveCurve (theOwner, aPoints);
return;
}
BRepAdaptor_Curve cu3d;
try {
OCC_CATCH_SIGNALS
@ -451,14 +460,6 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
return;
}
// try to get points from existing polygons
Handle(TColgp_HArray1OfPnt) aPoints = GetPointsFromPolygon (anEdge);
if (!aPoints.IsNull() && aPoints->Length() > 0)
{
theSensitive = new Select3D_SensitiveCurve (theOwner, aPoints);
return;
}
Standard_Real aParamFirst = cu3d.FirstParameter();
Standard_Real aParamLast = cu3d.LastParameter();
switch (cu3d.GetType())