mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
0026146: Visualization, Select3D_ISensitivePointSet - eliminate crash when clearing selections [only with TBB]
Remove classes Select3D_ISensitivePointSet and Select3D_BoundarySensitivePointSet; use Select3D_SensitivePoly directly for boundary selection. Make last argument in Select3D_SensitiveFace non-default to ensure that value is always explicitly specified by the caller. Inherit SelectMgr_FrustumBuilder from Standard_Transient to use normal Handle instead of NCollection_Handle. Add test case bugs/vis/bug26146.
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
//Modif on jul-21-97 : changement en harray1 pour eventuelles connexions ...
|
||||
|
||||
#include <Select3D_SensitiveFace.hxx>
|
||||
#include <Select3D_SensitivePoly.hxx>
|
||||
#include <Select3D_InteriorSensitivePointSet.hxx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
@@ -41,7 +44,7 @@ Select3D_SensitiveFace::Select3D_SensitiveFace (const Handle(SelectBasics_Entity
|
||||
}
|
||||
else
|
||||
{
|
||||
myFacePoints = new Select3D_BoundarySensitivePointSet (theOwnerId, thePoints);
|
||||
myFacePoints = new Select3D_SensitivePoly (theOwnerId, thePoints, Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +64,7 @@ Select3D_SensitiveFace::Select3D_SensitiveFace (const Handle(SelectBasics_Entity
|
||||
}
|
||||
else
|
||||
{
|
||||
myFacePoints = new Select3D_BoundarySensitivePointSet (theOwnerId, thePoints->Array1());
|
||||
myFacePoints = new Select3D_SensitivePoly (theOwnerId, thePoints->Array1(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +75,15 @@ Select3D_SensitiveFace::Select3D_SensitiveFace (const Handle(SelectBasics_Entity
|
||||
//=======================================================================
|
||||
void Select3D_SensitiveFace::GetPoints (Handle(TColgp_HArray1OfPnt)& theHArrayOfPnt)
|
||||
{
|
||||
myFacePoints->GetPoints (theHArrayOfPnt);
|
||||
if (myFacePoints->IsKind(STANDARD_TYPE(Select3D_SensitivePoly)))
|
||||
{
|
||||
Handle(Select3D_SensitivePoly)::DownCast (myFacePoints)->Points3D (theHArrayOfPnt);
|
||||
}
|
||||
else
|
||||
{
|
||||
Handle(Select3D_InteriorSensitivePointSet)::DownCast (myFacePoints)->GetPoints (theHArrayOfPnt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -102,7 +113,7 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitiveFace::GetConnected()
|
||||
{
|
||||
// Create a copy of this
|
||||
Handle(TColgp_HArray1OfPnt) aPoints;
|
||||
myFacePoints->GetPoints (aPoints);
|
||||
GetPoints (aPoints);
|
||||
|
||||
Handle(Select3D_SensitiveEntity) aNewEntity =
|
||||
new Select3D_SensitiveFace (myOwnerId, aPoints, mySensType);
|
||||
|
Reference in New Issue
Block a user