mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0031425: Visualization - free Edge has selection sensitivity inconsistent to presentation
BRepTools::Triangulation() has been extended with a new parameter for checking Poly_Polygon3D presense within free Edges. StdPrs_WFShape::Add() now performs auto-triangulation in the same way as StdPrs_ShadedShape::Add(). StdSelect_BRepSelectionTool::GetEdgeSensitive() now creates Select3D_SensitiveSegment instead of Select3D_SensitiveCurve for tessellated segment. Select3D_SensitiveSegment default sensitivity factor has been changed to 3 pixels to match Select3D_SensitiveCurve. Test case bug23625_1, added workaround for out-of-range crash in HLRBRep_PolyAlgo on re-triangulated shape.
This commit is contained in:
@@ -113,8 +113,8 @@ void StdSelect_BRepSelectionTool::Load (const Handle(SelectMgr_Selection)& theSe
|
||||
const Standard_Real theMaxParam)
|
||||
{
|
||||
Standard_Integer aPriority = (thePriority == -1) ? GetStandardPriority (theShape, theType) : thePriority;
|
||||
|
||||
if( isAutoTriangulation && !BRepTools::Triangulation (theShape, Precision::Infinite()) )
|
||||
if (isAutoTriangulation
|
||||
&& !BRepTools::Triangulation (theShape, Precision::Infinite(), true))
|
||||
{
|
||||
BRepMesh_IncrementalMesh aMesher(theShape, theDeflection, Standard_False, theDeviationAngle);
|
||||
}
|
||||
@@ -448,7 +448,15 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
|
||||
if (!aPoints.IsNull()
|
||||
&& !aPoints->IsEmpty())
|
||||
{
|
||||
theSensitive = new Select3D_SensitiveCurve (theOwner, aPoints);
|
||||
if (aPoints->Length() == 2)
|
||||
{
|
||||
// don't waste memory, create a segment
|
||||
theSensitive = new Select3D_SensitiveSegment (theOwner, aPoints->First(), aPoints->Last());
|
||||
}
|
||||
else
|
||||
{
|
||||
theSensitive = new Select3D_SensitiveCurve (theOwner, aPoints);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user