Skip to content

Systems#1283

Merged
joergbrech merged 135 commits into
mainfrom
systems
Jun 11, 2026
Merged

Systems#1283
joergbrech merged 135 commits into
mainfrom
systems

Conversation

@MarAlder

@MarAlder MarAlder commented Jan 25, 2026

Copy link
Copy Markdown
Collaborator

Description

This extension (partly) covers the new CPACS system specification from CPACSv3.5.

  • Shape generation for primitive geometries
  • Link external CAD files in pre-defined system elements
  • Combination of geometric primitives in pre-defined system elements
  • Fuselage-like elements
  • Computation of mass and CoG properties (postponing inertias for the future weight&balance implementation, as it seems quite complex...)

Additional remarks

  • The implemented code complies with our formatting guidelines
  • When creating the Python bindings, I made sure that enum values are also exported. However, Python users can only access the enum index. The enums in tigl.h are explicitly numbered starting from 1, whereas enums from the auto-generated classes (e.g., the @componentRepresentation attribute -> GetComponentRepresentation) implicitly start from 0. This certainly causes confusion. Using GetComponentRepresentation as an example, I have therefore implemented an additional method that returns the corresponding string value via GetComponentRepresentationAsString. For future consideration: Perhaps there is a way to implement something like this generally as a kind of template in SWIG, so that such ...AsString methods do not have to be created and maintained manually.

How Has This Been Tested?

C++
In tiglSystems.cpp, both valid and invalid datasets (simpletest-systems.cpacs.xml and simpletest-invalid-systems.cpacs.xml, respectively) are tested to cover all new methods and exceptions.

Python
The file test_systems.py was created to test the accessibility of the wrapped C++ classes, as well as some basic features.


Visualization and testing
image

Python bindings with documentation
image

Open ToDos:

  • Clean up old system definition
  • Make strategy on how to implement rotorElements (same or different PR?)
  • Check proper use of const
  • Some refactoring (what goes into VehicleElementBuilder, what not?)
  • Make available in rotorcraft
  • Evaluate restructuring the XSD structure to provide transformation at multiple levels
  • Add getter for representation attribute
  • Clean-up tests
  • Check if/how wing-like structures can be modeled via multiSegmentShape
  • Add systemArchitecture evaluations
  • Clean XSD and align with CPACS repository
  • Avoid crash when rotorElementUID is used instead of systemElementUID
  • Extend list of explicit system elements (work in progress by colleagues from SL) --> moved to Support update of systemElements #1326
  • Rethink rotor implementation
  • Make components optional in genericSystem

Checklist:

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

@MarAlder MarAlder self-assigned this Jan 25, 2026
@codecov

codecov Bot commented Jan 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.47312% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.96%. Comparing base (7696964) to head (f7d9bf7).

Files with missing lines Patch % Lines
src/fuselage/CCPACSFuselageSegment.cpp 25.00% 3 Missing ⚠️
src/api/tigl.cpp 75.00% 2 Missing ⚠️
src/configuration/CCPACSConfiguration.cpp 97.72% 1 Missing ⚠️
src/fuselage/CCPACSFuselageSegments.cpp 91.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1283      +/-   ##
==========================================
+ Coverage   72.58%   72.96%   +0.38%     
==========================================
  Files         316      322       +6     
  Lines       27750    28290     +540     
==========================================
+ Hits        20141    20643     +502     
- Misses       7609     7647      +38     
Flag Coverage Δ
unittests 72.96% <92.47%> (+0.38%) ⬆️

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

Files with missing lines Coverage Δ
src/CCPACSPoint.cpp 75.43% <100.00%> (+1.85%) ⬆️
src/CCPACSPointAbsRel.cpp 84.21% <100.00%> (+0.57%) ⬆️
src/common/tiglexternalfilehelpers.cpp 100.00% <100.00%> (ø)
src/cpacs_other/CCPACSExternalObject.cpp 52.17% <100.00%> (-3.00%) ⬇️
src/fuselage/CCPACSFuselageSections.cpp 100.00% <100.00%> (ø)
src/fuselage/CTiglFuselageConnection.cpp 97.29% <100.00%> (+0.11%) ⬆️
src/geometry/CCPACSTransformation.cpp 91.36% <ø> (+0.12%) ⬆️
src/geometry/CCPACSTransformationSE3.cpp 34.17% <ø> (ø)
src/geometry/CTiglElementGeometryBuilder.cpp 100.00% <ø> (ø)
src/geometry/CTiglElementMassBuilder.cpp 100.00% <ø> (ø)
... and 11 more

... and 1 file with indirect coverage changes

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

@joergbrech joergbrech left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only three more minor things before we can merge!

1, Please open a new issue for the extended list of explicit system elements (missing check box in PR message)


Edit: Oh and please resolve the Changelog conflict.

Comment thread tests/unittests/tiglSystems.cpp Outdated
Comment thread src/systems/CCPACSComponent.cpp Outdated

@joergbrech joergbrech left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks a lot! There is a new merge conflict due to changes in the code generator. I can take over from here if you like.

@MarAlder

Copy link
Copy Markdown
Collaborator Author

Sure, feel free to take over ;-)

@joergbrech joergbrech merged commit 8350f01 into main Jun 11, 2026
16 checks passed
@joergbrech joergbrech deleted the systems branch June 11, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement new CPACS systems definition

3 participants