Skip to content

Several fuslage python bindings seem to be broken #1037

Open
@hardt-fa-flb

Description

@hardt-fa-flb

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

from __future__ import print_function

from tixi3 import tixi3wrapper
from tigl3 import tigl3wrapper
import tigl3.configuration
import os


def display_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 manager
    mgr = 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 nicht

    print(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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions