This because we must provide custom instructions in the Swig preprocessor when we generate the python wrapper. Do you really need this?
Note, for other elements (and in general for other c++ classes) the downcasting must be done on the Python side using statements like chrono.CastToXxxxXXxx(...), so what you need would be
myshell = chrono.CastToChElementShellBST(myelement)
...But it is not yet implemented. Sorry. Others are already in place, for instance you can do stuff like mybeam = chrono.CastTo ChElementBeamEuler(myelement)
At the moment our Swig preprocessor just implements the following casting for elements:
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementBar)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementSpring)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementTetraCorot_4)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementTetraCorot_4_P)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementTetraCorot_10)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementHexaCorot_8)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementHexaCorot_20)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementBeamEuler)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementBeamANCF_3243)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementBeamANCF_3333)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementBeamIGA)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementBeamTaperedTimoshenko)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementBeamTaperedTimoshenkoFPM)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementCableANCF)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementShellReissner4)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementShellANCF_3423)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementShellANCF_3833)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementHexaANCF_3813)
%DefSharedPtrDynamicCast(chrono::fea,ChElementBase,ChElementHexaANCF_3813_9)
I'll remember to add the corresponding %DefSharedPtrDynamicCast(...) for the BST shell in future releases.
thanks
Alessandro Tasora