mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 17:40:24 +08:00
Replaces two buggy pieces of SelectMgr_TriangularFrustumSet used during polyline (polygon rubber-band) selection: - OverlapsBox(min, max, bool* theInside): the corner-edge isIntersectBoundary heuristic produced false "fully inside" answers whenever an AABB was large enough that its 12 edges did not cross the polyline but its interior did not lie inside either. Rewrite: first probe every frustum for any overlap; if none, return false. Otherwise, project the 8 AABB corners onto the frustum near plane and apply a ray-cast inside test against the original polyline loop. If any corner projects outside, clear theInside; else leave it untouched. The near-plane coplanarity assumption is guaranteed by Build(), which derives every near vertex from myBuilder->ProjectPntOnViewPlane(x, y, 0.0). - OverlapsPoint(const gp_Pnt&): previously a stub returning false, which made strict-inclusion polyline selection of Select3D_SensitiveTriangle, SensitivePoly, SensitiveTriangulation, SensitivePrimitiveArray, MeshVS_CommonSensitiveEntity and MeshVS_SensitiveQuad silently impossible (those sensitive types call theMgr.OverlapsPoint(...) on each vertex in strict-inclusion mode; a blanket false meant nothing was ever picked). Now delegates to the same near-plane projection + ray-cast test, so strict inclusion works for all these sensitive types in polyline mode. Covered by a new Draw test tests/vselect/bugs/bug_polyline_inclusion that exercises both strict-inclusion and overlap modes for spheres inside/outside a polygonal rubber band. No GTest is added because constructing a working TriangularFrustumSet requires a configured Graphic3d_Camera + viewport; the Tcl test is the regression gate.