Skip to content

Enable duct cutouts for fuel tank vessels - #1426

Open
MarAlder wants to merge 8 commits into
mainfrom
1416-ducts-through-fuel-tanks
Open

Enable duct cutouts for fuel tank vessels#1426
MarAlder wants to merge 8 commits into
mainfrom
1416-ducts-through-fuel-tanks

Conversation

@MarAlder

@MarAlder MarAlder commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Enable duct cutouts for fuel tank vessels

Description

Ducts were only subtracted from fuselages and wings. CCPACSVessel built its loft directly in BuildLoft(), so vessels neither participated in the cutout mechanism nor reacted to the duct cutout flag. Configurations with a duct passing through a tank could not be represented.

Since a tank can be composed of multiple vessels CCPACSDucts::LoftWithDuctCutouts() gained an overload taking several uIDs; the vessel passes its own uID and that of its parent fuel tank. The existing single-uID overload delegates to it, so fuselage and wing behaviour is unchanged.

ℹ️ As a side refactoring, the corrupt tank was moved from simpletest-fuelTanks.cpacs.xml into a separate simpletest-invalid-fuelTanks.cpacs.xml with its own InvalidFuelTanks fixture (similar to tests for systems and decks).

Closes #1416

How Has This Been Tested?

simpletest-fuelTanks.cpacs.xml gained three ducts: one running through both the section-based (tank1) and the parametric vessels (tank3), and two that lie entirely inside a vessel but are excluded, one by the vessel uID (tank1_outerVessel), one by the fuel tank uID (tank3).

The tests in tiglTanks.cpp cover the cutout flag, unchanged volumes while disabled, the cut volumes, exact restoration after toggling back, solid validity via BRepCheck_Analyzer, the added faces, both exclusion levels, and propagation to CCPACSFuelTank.

On the Python side, test_fuelTanks.py covers the bindings only: reaching CCPACSDucts from the configuration, both LoftWithDuctCutouts() overloads, the new one with a Python list, and the cutout flag via the TiGL API cross-checked against CCPACSDucts::IsEnabled(). The list argument requires std::vector<std::string> to be instantiated in SWIG, which common.i did not do; the added %template(StringVector) also makes CPACSUIDSequence::GetUIDs() iterable from Python.

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

image image image

Checklist for PR Author:

  • Unit or integration test added (if applicable)
  • Python interface updated (if applicable)
  • Python test added (if Python interface updated)
  • Doxygen docstrings added
  • ChangeLog.md updated

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

PR Reminders

This PR has changes in src/, tests/unittests/, tests/python/, and bindings/python_internal/ but not in TIGLCreator/ or tests/integrationtests/. ChangeLog.md has changes.

  • ✅ Tests added or not required
  • ✅ Python bindings modified
  • ✅ ChangeLog.md updated

This is an automated reminder from CI

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.30%. Comparing base (b2ff2b5) to head (d8ce872).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1426      +/-   ##
==========================================
+ Coverage   73.27%   73.30%   +0.02%     
==========================================
  Files         324      324              
  Lines       28642    28659      +17     
==========================================
+ Hits        20987    21008      +21     
+ Misses       7655     7651       -4     
Flag Coverage Δ
unittests 73.30% <100.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
src/ducts/CCPACSDucts.cpp 97.43% <100.00%> (+0.21%) ⬆️
src/fuelTanks/CCPACSVessel.cpp 100.00% <100.00%> (+0.26%) ⬆️

... 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.

@MarAlder
MarAlder requested a review from AntonReiswich August 20, 2026 10:17
@MarAlder
MarAlder marked this pull request as ready for review August 20, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ducts should also be extractable from fuelTanks

1 participant