TopoDS_Shape HYDROData_Zone::GetShape() const
{
- Handle(TNaming_NamedShape) aNamedShape;
- if( myLab.FindChild( DataTag_Shape ).FindAttribute( TNaming_NamedShape::GetID(), aNamedShape ) )
- return aNamedShape->Get();
+ TDF_Label aLabel = myLab.FindChild( DataTag_Shape, false );
+ if ( !aLabel.IsNull() )
+ {
+ Handle(TNaming_NamedShape) aNamedShape;
+ if( aLabel.FindAttribute( TNaming_NamedShape::GetID(), aNamedShape ) )
+ return aNamedShape->Get();
+ }
+
return TopoDS_Shape();
}
{
MergeAltitudesType aMergeType = Merge_UNKNOWN;
- Handle(TDataStd_Integer) anInt;
- if ( myLab.FindChild( DataTag_MergeType ).FindAttribute( TDataStd_Integer::GetID(), anInt ) )
- aMergeType = (MergeAltitudesType)anInt->Get();
+ TDF_Label aLabel = myLab.FindChild( DataTag_MergeType, false );
+ if ( !aLabel.IsNull() )
+ {
+ Handle(TDataStd_Integer) anInt;
+ if ( aLabel.FindAttribute( TDataStd_Integer::GetID(), anInt ) )
+ aMergeType = (MergeAltitudesType)anInt->Get();
+ }
return aMergeType;
}
return false; // Object is already in reference list
AddReferenceObject( theObject, DataTag_GeometryObject );
+
return true;
}