1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +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:
kgv
2020-03-11 17:06:49 +03:00
committed by bugmaster
parent 08669adf1b
commit 29263c947e
14 changed files with 122 additions and 46 deletions

View File

@@ -542,9 +542,6 @@ void StdPrs_ShadedShape::Add (const Handle (Prs3d_Presentation)& thePrs,
return;
}
// add wireframe presentation for isolated edges and vertices
wireframeFromShape (thePrs, theShape, theDrawer);
// Use automatic re-triangulation with deflection-check logic only if this feature is enable
if (theDrawer->IsAutoTriangulation())
{
@@ -552,6 +549,9 @@ void StdPrs_ShadedShape::Add (const Handle (Prs3d_Presentation)& thePrs,
StdPrs_ToolTriangulatedShape::Tessellate (theShape, theDrawer);
}
// add wireframe presentation for isolated edges and vertices
wireframeFromShape (thePrs, theShape, theDrawer);
// add special wireframe presentation for faces without triangulation
wireframeNoTriangFacesFromShape (thePrs, theShape, theDrawer);

View File

@@ -240,7 +240,7 @@ void StdPrs_ToolTriangulatedShape::Normal (const TopoDS_Face& theFace,
Standard_Boolean StdPrs_ToolTriangulatedShape::IsTessellated (const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer)
{
return BRepTools::Triangulation (theShape, Prs3d::GetDeflection (theShape, theDrawer));
return BRepTools::Triangulation (theShape, Prs3d::GetDeflection (theShape, theDrawer), true);
}
// =======================================================================

View File

@@ -100,6 +100,11 @@ void StdPrs_WFShape::Add (const Handle(Prs3d_Presentation)& thePresentation,
return;
}
if (theDrawer->IsAutoTriangulation())
{
StdPrs_ToolTriangulatedShape::Tessellate (theShape, theDrawer);
}
// draw triangulation-only edges
if (Handle(Graphic3d_ArrayOfPrimitives) aTriFreeEdges = AddEdgesOnTriangulation (theShape, Standard_True))
{