From: kgv Date: Mon, 24 Jun 2019 12:03:49 +0000 (+0300) Subject: 0030805: Visualization, StdSelect_BRepSelectionTool - empty sensitivity from polygon... X-Git-Tag: V7_4_0_beta~100 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=e05d8d90c0ac0db2f70f15cb5258cca27bc31f11;p=occt-copy.git 0030805: Visualization, StdSelect_BRepSelectionTool - empty sensitivity from polygon-only Edge StdSelect_BRepSelectionTool::GetEdgeSensitive() now takes polygon points before creating curve Adaptor. --- diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.cxx b/src/StdSelect/StdSelect_BRepSelectionTool.cxx index ff96652a36..36f2db83e8 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.cxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.cxx @@ -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())