Eliminate useless GetSubShape() lines in the python dump

This commit is contained in:
vsr 2011-01-10 10:16:57 +00:00
parent bf697caef8
commit 68aba60ffd
3 changed files with 20 additions and 0 deletions

View File

@ -325,6 +325,12 @@ module GEOM
*/
boolean IsShape();
/*
* Return true if passed object is identical to this object
* \param other object being compared with this one
*/
boolean IsSame(in GEOM_Object other);
/*!
* Set list of parameters
* \param theParameters is a string containing the notebook variables separated by ":" symbol,

View File

@ -491,6 +491,18 @@ bool GEOM_Object_i::IsShape()
return !_impl->GetValue().IsNull() && _impl->GetType() != GEOM_MARKER;
}
bool GEOM_Object_i::IsSame(GEOM::GEOM_Object_ptr other)
{
TopoDS_Shape thisShape = _impl->GetValue();
TopoDS_Shape otherShape;
if ( !CORBA::is_nil( other ) ) {
Handle(GEOM_Object) otherObject = GEOM_Engine::GetEngine()->GetObject( other->GetStudyID(), other->GetEntry(), false );
if ( !otherObject.IsNull() )
otherShape = otherObject->GetValue();
}
return thisShape.IsSame( otherShape );
}
void GEOM_Object_i::SetParameters(const char* theParameters)
{
_impl->SetParameters((char*)theParameters);

View File

@ -97,6 +97,8 @@ class GEOM_I_EXPORT GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public
virtual GEOM::GEOM_Object_ptr GetMainShape();
virtual bool IsSame(GEOM::GEOM_Object_ptr other);
virtual bool IsShape();
virtual void SetParameters(const char* theParameters);