mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 14:10:33 +05:00
Improve NumberFilter: retrieve selected and main shape with the same instance of GEOM_Client()
This commit is contained in:
parent
1dfdc856a7
commit
b22f47d357
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
#include "SMESH_NumberFilter.hxx"
|
#include "SMESH_NumberFilter.hxx"
|
||||||
|
|
||||||
#include "GEOMBase.h"
|
#include "GEOM_Client.hxx"
|
||||||
|
#include "GeometryGUI.h"
|
||||||
|
|
||||||
#include "SUIT_Application.h"
|
#include "SUIT_Application.h"
|
||||||
#include "SUIT_Session.h"
|
#include "SUIT_Session.h"
|
||||||
@ -81,9 +82,9 @@ bool SMESH_NumberFilter::isOk (const SUIT_DataOwner* theDataOwner) const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Get shape from geom object and verify its parameters
|
// Get shape from geom object and verify its parameters
|
||||||
TopoDS_Shape aShape;
|
GEOM_Client aGeomClient;
|
||||||
if (!GEOMBase::GetShape(aGeomObj, aShape) ||
|
TopoDS_Shape aShape = aGeomClient.GetShape(GeometryGUI::GetGeomGen(), aGeomObj);
|
||||||
aShape.IsNull() ||
|
if (aShape.IsNull() ||
|
||||||
!myShapeTypes.Contains(aShape.ShapeType()))
|
!myShapeTypes.Contains(aShape.ShapeType()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -92,8 +93,8 @@ bool SMESH_NumberFilter::isOk (const SUIT_DataOwner* theDataOwner) const
|
|||||||
|
|
||||||
// Verify whether shape of entry object is sub-shape of myMainObj
|
// Verify whether shape of entry object is sub-shape of myMainObj
|
||||||
if (!myMainObj->_is_nil()) {
|
if (!myMainObj->_is_nil()) {
|
||||||
TopoDS_Shape aMainShape;
|
TopoDS_Shape aMainShape = aGeomClient.GetShape(GeometryGUI::GetGeomGen(), myMainObj);
|
||||||
if (!GEOMBase::GetShape(myMainObj, aMainShape))
|
if (aMainShape.IsNull())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool isFound = false;
|
bool isFound = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user