tigl icon indicating copy to clipboard operation
tigl copied to clipboard

Scene graph

Open ole-alb opened this issue 2 months ago • 2 comments

Description

Closes #1253 Add a Scene Graph to easily show and hide components. It also preserves the state when the CPACS file is edited.

How Has This Been Tested?

Screenshots, that help to understand the changes(if applicable):

Checklist:

Task Finished Reviewer Approved
At least one test for the new functionality was added.
  • - [ ] yes
  • - [ ] does not apply
  • - [ ] OK
New classes have been added to the Python interface.
  • - [ ] yes
  • - [ ] does not apply
  • - [ ] OK
The code is properly documented with doxygen docstrings
  • - [ ] yes
  • - [ ] does not apply
  • - [ ] OK
Changes are documented at the top of ChangeLog.md
  • - [ ] yes
  • - [ ] does not apply
  • - [ ] OK

ole-alb avatar Nov 04 '25 15:11 ole-alb

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 72.47%. Comparing base (90b31ef) to head (0788cd7). :warning: Report is 30 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1254   +/-   ##
=======================================
  Coverage   72.47%   72.47%           
=======================================
  Files         313      313           
  Lines       27391    27391           
=======================================
  Hits        19851    19851           
  Misses       7540     7540           
Flag Coverage Δ
unittests 72.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 04 '25 16:11 codecov[bot]

I played around with the GUI a little bit and noticed a few things.

  • [x] The AircraftModel has a checkbox in the CPACS Tree, but it cannot be checked. Probably, because the implementation of GetLoft always returns a nullptr.
  • [x] If I change the visibility of a component and then modify the CPACS file on disk, the configuration is reloaded, but I get a crash. I tried this on the T25v4 from the digital hangar. I changed the visibility of a component, changed the name of the creator in the header in the xml file to trigger a reload and observe the crash when I choose the AircraftModel in TiGLCreator. (I wanted to check, if visibility and color of individual components as well as camera properties are preserved)
  • [x] If I open the T25 and display only the rotorcraft all visible compoments are unchecked. Eventhough they are clearly visible. The checkboxes don't seem to do anything.
  • [x] If I close one CPACS configuration and re-open another, AIS Shapes get cached and the association is wrong. I have to close and reopen the TiGLCreator.
  • [x] It would be really convenient, if I could filter the CPACS Tree for all checkable items. This should be fairly simple to do by extending the CPACSFilterModel

joergbrech avatar Dec 08 '25 13:12 joergbrech

I am sorry, but I noticed 2 more things

  • [x] If I unselect the engine, only the mirrored engine is removed. (tested with T25v4)
  • [x] If I check "Geometry Nodes" in the CPACS Tree, the textbased filter does not work anymore (e.g. I want to filter all geometry nodes that have the term "bellyFairing" in the uid (tested with T25v4)

joergbrech avatar Dec 17 '25 15:12 joergbrech

I noticed one more thing, but I suggest to move it to a new issue so that we can get this merged: When we reopen a file, only the visibility of the shapes are preserved, but none of the other properties (material, color, transparency, rendering mode)

You are right, since this isn't really part of this scene graph implementation I ignored these values for now. It should be implemented in PR #1270

ole-alb avatar Dec 18 '25 15:12 ole-alb