Thanks to the Great scripting example on Results Retrieval on Shells, I manage to do similar stuff on a structural model made of beams. I wonder how I can retrieve the utilization of beams in IronPython?
Here is a snippet from the example (which works nicely!):
# ... other karamba related CLR import import feb # Karamba's C++ library (undocumented in the API) # clone the model and its list of elements to avoid side effects model = model_in.Clone() # clone its elements to avoid side effects model.cloneElements() # clone the feb-model to avoid side effects model.deepCloneFEModel() deform = feb.Deform(model.febmodel) response = feb.Response(deform) # calculate the displacements response.updateNodalDisplacements(); # calculate the member forces response.updateMemberForces(); # if something changed inform the feb-model about it (otherwise it won't recalculate) model.febmodel.touch() lc = 0 energy_visitor = feb.EnergyVisitor(model.febmodel, model.febmodel.state(0), lc); energy_visitor.visit(model.febmodel); elastic_E = energy_visitor.elasticEnergy() max_displ = response.maxDisplacement()
Results Retrieval example above uses the
feb library’s classes like
feb.EnergyVisitor to access the model’s results. However, the
feb library seems to be a C++ backend (I can’t use inspection to probe its attributes and functions) and its API is not documented at the SDK manual.
I wonder if we can have the API of
feb documented in the SDK as well? And in a shorter term, can we also have a scripting example demonstrating how we can retrieve the data that we can get from the
Utilization of Elements component, in C+ or IronPython?
Thanks again for making and maintaining such a great plugin!