23034: EDF GEOM: Information after a transformation without copy

Fix regression of geom/imps_07/H9 -- no info on field steps
This commit is contained in:
eap 2015-05-07 19:27:01 +03:00
parent 8d74e7ed1f
commit 18a5df8c67
4 changed files with 28 additions and 20 deletions

View File

@ -493,24 +493,17 @@ Handle(TColStd_HSequenceOfTransient) GEOM_BaseObject::GetLastDependency()
*/
//================================================================================
std::vector< Handle(TFunction_Driver)> GEOM_BaseObject::GetCreationDrivers()
Handle(TFunction_Driver) GEOM_BaseObject::GetCreationDriver(int funNb)
{
std::vector< Handle(TFunction_Driver)> aDriverVec;
for ( int i = 1, nb = GetNbFunctions(); i <= nb; ++i )
Handle(TFunction_Driver) driver;
Handle(GEOM_Function) function = GetFunction(funNb);
if ( !function.IsNull() )
{
Handle(GEOM_Function) function = GetFunction(i);
if ( !function.IsNull() )
{
Standard_GUID aGUID = function->GetDriverGUID();
aDriverVec.push_back( Handle(TFunction_Driver )() );
if ( TFunction_DriverTable::Get()->FindDriver(aGUID, aDriverVec.back() ))
aDriverVec.back()->Init( function->GetEntry() );
else
aDriverVec.pop_back();
}
Standard_GUID aGUID = function->GetDriverGUID();
if ( TFunction_DriverTable::Get()->FindDriver(aGUID, driver ))
driver->Init( function->GetEntry() );
}
return aDriverVec;
return driver;
}
//=============================================================================

View File

@ -149,7 +149,7 @@ public:
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetLastDependency();
//Returns drivers creators of this object
Standard_EXPORT std::vector< Handle(TFunction_Driver)> GetCreationDrivers();
Standard_EXPORT Handle(TFunction_Driver) GetCreationDriver(int funNb);
//###########################################################
// Internal methods

View File

@ -83,6 +83,20 @@ GetCreationInformation(std::string& theOperationName,
AddParam( theParams, "Step", data.GetStepID() );
AddParam( theParams, "Stamp", data.GetStepStamp() );
}
else if ( funType == GEOM_Field::FUN_CHANGE_COMP_NAMES )
{
theOperationName = "Change component names";
}
else if ( funType == GEOM_Field::FUN_CHANGE_STEP_STAMP )
{
theOperationName = "Change stamp";
AddParam( theParams, "Stamp", data.GetStepStamp() );
}
else if ( funType == GEOM_Field::FUN_CHANGE_VALUE )
{
theOperationName = "FIELD_EDIT";//"Change values";
AddParam( theParams, "Values", "..." );
}
else
{
return false;

View File

@ -272,12 +272,13 @@ GEOM::CreationInformationSeq* GEOM_BaseObject_i::GetCreationInformation()
{
GEOM::CreationInformationSeq_var info = new GEOM::CreationInformationSeq();
std::vector< Handle(TFunction_Driver)> drivers = _impl->GetCreationDrivers();
info->length( drivers.size() );
int nbFun = _impl->GetNbFunctions();
info->length( nbFun );
int nbI = 0;
for ( size_t i = 0; i < drivers.size(); ++i )
for ( int i = 1; i <= nbFun; ++i )
{
Handle(GEOM_BaseDriver) driver = Handle(GEOM_BaseDriver)::DownCast( drivers[i] );
Handle(GEOM_BaseDriver) driver =
Handle(GEOM_BaseDriver)::DownCast( _impl->GetCreationDriver( i ));
if ( !driver.IsNull() )
{
std::vector<GEOM_Param> params;