From: mzernova Date: Wed, 31 Jul 2024 11:39:56 +0000 (+0100) Subject: # Fix cone X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=603a391e9c888f60691f56e60daf7179f1989c97;p=occt.git # Fix cone --- diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.cxx b/src/StdSelect/StdSelect_BRepSelectionTool.cxx index 6551636e74..5b72c7507d 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.cxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.cxx @@ -648,10 +648,12 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_ aRad2 = aCircles.First().Radius(); aHeight = aRad2 * Tan (aCone.SemiAngle()); } - else if (aCircles.Size() == 2) + else { - aRad1 = Min (aCircles.First().Radius(), aCircles.Last().Radius()); - aRad2 = Max (aCircles.First().Radius(), aCircles.Last().Radius()); + aRad1 = aCone.RefRadius(); + aRad2 = IsEqual (aRad1, aCircles.First().Radius()) + ? aCircles.Last().Radius() + : aCircles.First().Radius(); aHeight = aCircles.First().Location().Distance (aCircles.Last().Location()); }