mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-06 08:14:17 +05:00
Fix Quadrangle and Triangle filters for quadratic elements
This commit is contained in:
parent
3c8cb0e08e
commit
d3af61ce33
@ -225,7 +225,8 @@ bool SMESHGUI_QuadrangleFilter::IsValid( const int theCellId ) const
|
|||||||
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
||||||
const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
|
const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
|
||||||
|
|
||||||
return anElem && anElem->GetType() == SMDSAbs_Face && anElem->NbNodes() == 4;
|
return anElem && anElem->GetType() == SMDSAbs_Face &&
|
||||||
|
( anElem->NbNodes() == ( anElem->IsQuadratic() ? 8 : 4 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -244,7 +245,8 @@ bool SMESHGUI_QuadrangleFilter::IsObjValid( const int theObjId ) const
|
|||||||
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
||||||
const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
|
const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
|
||||||
|
|
||||||
return anElem && anElem->GetType() == SMDSAbs_Face && anElem->NbNodes() == 4;
|
return anElem && anElem->GetType() == SMDSAbs_Face &&
|
||||||
|
( anElem->NbNodes() == ( anElem->IsQuadratic() ? 8 : 4 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -302,7 +304,8 @@ bool SMESHGUI_TriangleFilter::IsValid( const int theCellId ) const
|
|||||||
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
||||||
const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
|
const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
|
||||||
|
|
||||||
return anElem && anElem->GetType() == SMDSAbs_Face && anElem->NbNodes() == 3;
|
return anElem && anElem->GetType() == SMDSAbs_Face &&
|
||||||
|
( anElem->NbNodes() == ( anElem->IsQuadratic() ? 6 : 3 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -321,7 +324,8 @@ bool SMESHGUI_TriangleFilter::IsObjValid( const int theObjId ) const
|
|||||||
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
|
||||||
const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
|
const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
|
||||||
|
|
||||||
return anElem && anElem->GetType() == SMDSAbs_Face && anElem->NbNodes() == 3;
|
return anElem && anElem->GetType() == SMDSAbs_Face &&
|
||||||
|
( anElem->NbNodes() == ( anElem->IsQuadratic() ? 6 : 3 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user