I wanted to ask about multi VTK support in FreeCAD.
I looked through a few examples and I saw that the way this is handled now is by creating multiple FemPostPipeLine objects. Then to those one can apply different filters.
If I make changes to this pipeline to support multiple VTKs in one object will that be acceptable for a PR or should I make a new pipeline, say FemMultiPostPipeline which is exclusively targeted for multi VTK support?
The way I plan on implementing the multi VTKs currently is by simply creating a std::vector and pushing the m_dataObject s when they are read in PropertyPostDataObject.
Code: Select all
//PropertyPostDataObject.h
protected:
void createDataObjectByExternalType(vtkSmartPointer<vtkDataObject> ex);
vtkSmartPointer<vtkDataObject> m_dataObject;
std::vector<vtkSmartPointer<vtkDataObject>> data_vector;
};
Code: Select all
//PropertyPostDataObject.cpp
if(ds) {
createDataObjectByExternalType(ds);
m_dataObject->DeepCopy(ds);
try{
data_vector.push_back(m_dataObject);
}
catch (...){
Base::Console().Message("We failed at push back");
}
Code: Select all
//PropertyPostDataObject.cpp
const vtkSmartPointer<vtkDataObject>& PropertyMultiPostDataObject::getValue(void)const
{
return data_vector.at(frame);
}
Either way, any thoughts or advice from people familiar with the VTK input?
Regards,
Preslav