You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to access the fuselage skin segments with python. Unfortunately, I got stuck by walking through the class hierarchy at the CPACSFuselageStructure.get_skin method, that returns an empty object. The output of the script below is:
from __future__ importprint_functionfromtixi3importtixi3wrapperfromtigl3importtigl3wrapperimporttigl3.configurationimportosdefdisplay_fuselage_structure(tigl_handle):
""" This is an example how to use the internal tigl/pyocc API to display all wing and fuselage segments """# get the configuration managermgr=tigl3.configuration.CCPACSConfigurationManager_get_instance()
# get the CPACS configuration, defined by the tigl handle# we need to access the underlying tigl handle (that is used in the C/C++ API)config=mgr.get_configuration(tigl_handle._handle.value)
uid_manager=config.get_uidmanager()
f1=uid_manager.get_geometric_component("Fuselage")
structure=f1.get_structure()
skin=structure.get_skin() # Funktioniert nichtprint(dir(skin))
if__name__=='__main__':
tixi_h=tixi3wrapper.Tixi3()
tigl_h=tigl3wrapper.Tigl3()
dir_path=os.path.dirname(os.path.realpath(__file__))
tixi_h.open(dir_path+"/fuselage_structure-v3.xml")
tigl_h.open(tixi_h, "")
display_fuselage_structure(tigl_h)
The text was updated successfully, but these errors were encountered:
The class is probably just not properly registered in the configuration files for the Python bindings with swig. Thanks for letting us know! We will check it out.
I tried to access the fuselage skin segments with python. Unfortunately, I got stuck by walking through the class hierarchy at the
CPACSFuselageStructure.get_skin
method, that returns an empty object. The output of the script below is:['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__int__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'acquire', 'append', 'disown', 'next', 'own']
.Use case here: fuselage.zip
The text was updated successfully, but these errors were encountered: