1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-18 14:27:39 +03:00

OCC22357 Hidden face selection

This commit is contained in:
bugmaster
2011-04-28 15:57:34 +00:00
committed by bugmaster
parent 256d432045
commit 4952a30a49
32 changed files with 1565 additions and 1213 deletions

View File

@@ -31,13 +31,13 @@ MeshVS_SensitiveFace::MeshVS_SensitiveFace (
// name : MeshVS_SensitiveFace::Project
// Purpose :
//=======================================================================
void MeshVS_SensitiveFace::Project( const Select3D_Projector& aProj )
void MeshVS_SensitiveFace::Project( const Handle(Select3D_Projector)& aProj )
{
Select3D_SensitiveFace::Project( aProj );
if ( HasLocation() )
aProj.Project( myCentre.Transformed( Location().Transformation() ), myProjCentre );
aProj->Project( myCentre.Transformed( Location().Transformation() ), myProjCentre );
else
aProj.Project( myCentre, myProjCentre );
aProj->Project( myCentre, myProjCentre );
}
//=======================================================================

View File

@@ -139,14 +139,14 @@ Handle(Select3D_SensitiveEntity) MeshVS_SensitiveMesh::GetConnected( const TopLo
//=======================================================================
Standard_Real MeshVS_SensitiveMesh::ComputeDepth( const gp_Lin& /*EyeLine*/ ) const
{
return 0.;
return Precision::Infinite();
}
//==================================================
// Function: ProjectOneCorner
// Purpose :
//==================================================
void MeshVS_SensitiveMesh::ProjectOneCorner(const Select3D_Projector& theProj,
void MeshVS_SensitiveMesh::ProjectOneCorner(const Handle(Select3D_Projector)& theProj,
const Standard_Real theX,
const Standard_Real theY,
const Standard_Real theZ)
@@ -154,9 +154,9 @@ void MeshVS_SensitiveMesh::ProjectOneCorner(const Select3D_Projector& theProj,
gp_Pnt aPnt( theX, theY, theZ );
gp_Pnt2d aProjPnt;
if( HasLocation() )
theProj.Project( aPnt.Transformed(Location().Transformation()), aProjPnt );
theProj->Project( aPnt.Transformed(Location().Transformation()), aProjPnt );
else
theProj.Project( aPnt, aProjPnt );
theProj->Project( aPnt, aProjPnt );
mybox2d.Add( aProjPnt );
}
@@ -164,7 +164,7 @@ void MeshVS_SensitiveMesh::ProjectOneCorner(const Select3D_Projector& theProj,
// Function: Project
// Purpose :
//==================================================
void MeshVS_SensitiveMesh::Project(const Select3D_Projector& aProj)
void MeshVS_SensitiveMesh::Project(const Handle(Select3D_Projector)& aProj)
{
Select3D_SensitiveEntity::Project(aProj); // to set the field last proj...

View File

@@ -34,7 +34,7 @@ MeshVS_SensitivePolyhedron( const Handle( SelectBasics_EntityOwner )& Owner,
// Function : Project
// Purpose :
//================================================================
void MeshVS_SensitivePolyhedron::Project( const Select3D_Projector& aProjector )
void MeshVS_SensitivePolyhedron::Project( const Handle(Select3D_Projector)& aProjector )
{
Select3D_SensitiveEntity::Project( aProjector );
@@ -55,9 +55,9 @@ void MeshVS_SensitivePolyhedron::Project( const Select3D_Projector& aProjector )
{
pnt = myNodes->Value( i );
if( !hasLoc )
aProjector.Project( pnt, proj );
aProjector->Project( pnt, proj );
else
aProjector.Project( pnt.Transformed( Location().Transformation() ), proj );
aProjector->Project( pnt.Transformed( Location().Transformation() ), proj );
myNodes2d->SetValue( i, proj.XY() );
myCenter += proj.XY();
@@ -161,9 +161,10 @@ Standard_Boolean MeshVS_SensitivePolyhedron::Matches( const Standard_Real X,
}
if( inside )
Select3D_SensitiveEntity::Matches( X, Y, aTol, DMin );
return inside;
{
return Select3D_SensitiveEntity::Matches( X, Y, aTol, DMin );
}
return Standard_False;
}
//================================================================

View File

@@ -27,13 +27,13 @@ MeshVS_SensitiveSegment::MeshVS_SensitiveSegment (
// name : MeshVS_SensitiveSegment::Project
// Purpose :
//=======================================================================
void MeshVS_SensitiveSegment::Project( const Select3D_Projector& aProj )
void MeshVS_SensitiveSegment::Project( const Handle(Select3D_Projector)& aProj )
{
Select3D_SensitiveSegment::Project( aProj );
if ( HasLocation() )
aProj.Project( myCentre.Transformed( Location().Transformation() ), myProjCentre );
aProj->Project( myCentre.Transformed( Location().Transformation() ), myProjCentre );
else
aProj.Project( myCentre, myProjCentre );
aProj->Project( myCentre, myProjCentre );
}
//=======================================================================