mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-27 09:50:34 +05:00
Merge branch 'master' into V7_5_BR
This commit is contained in:
commit
3d1e657101
@ -364,15 +364,19 @@ bool GEOM_Object_i::IsShape()
|
|||||||
return !_impl->GetValue().IsNull() && _impl->GetType() != GEOM_MARKER;
|
return !_impl->GetValue().IsNull() && _impl->GetType() != GEOM_MARKER;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GEOM_Object_i::IsSame(GEOM::GEOM_Object_ptr other)
|
bool GEOM_Object_i::IsSame(GEOM::GEOM_BaseObject_ptr other)
|
||||||
{
|
{
|
||||||
TopoDS_Shape thisShape = _impl->GetValue();
|
bool result = false;
|
||||||
TopoDS_Shape otherShape;
|
|
||||||
if ( !CORBA::is_nil( other ) ) {
|
GEOM::GEOM_Object_var shapePtr = GEOM::GEOM_Object::_narrow( other );
|
||||||
|
if ( !CORBA::is_nil( shapePtr ) ) {
|
||||||
Handle(GEOM_Object) otherObject = Handle(GEOM_Object)::DownCast
|
Handle(GEOM_Object) otherObject = Handle(GEOM_Object)::DownCast
|
||||||
( GEOM_Engine::GetEngine()->GetObject( other->GetStudyID(), other->GetEntry(), false ));
|
( GEOM_Engine::GetEngine()->GetObject( shapePtr->GetStudyID(), shapePtr->GetEntry(), false ));
|
||||||
if ( !otherObject.IsNull() )
|
if ( !otherObject.IsNull() ) {
|
||||||
otherShape = otherObject->GetValue();
|
TopoDS_Shape thisShape = _impl->GetValue();
|
||||||
|
TopoDS_Shape otherShape = otherObject->GetValue();
|
||||||
|
result = !thisShape.IsNull() && !otherShape.IsNull() && thisShape.IsSame( otherShape );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return thisShape.IsSame( otherShape );
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ class GEOM_I_EXPORT GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public
|
|||||||
|
|
||||||
virtual GEOM::GEOM_Object_ptr GetMainShape();
|
virtual GEOM::GEOM_Object_ptr GetMainShape();
|
||||||
|
|
||||||
virtual bool IsSame(GEOM::GEOM_Object_ptr other);
|
virtual bool IsSame(GEOM::GEOM_BaseObject_ptr other);
|
||||||
|
|
||||||
virtual bool IsShape();
|
virtual bool IsShape();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user