Skip to content

Scene graph draw options#1279

Open
ole-alb wants to merge 36 commits into
mainfrom
scene-graph-draw-options
Open

Scene graph draw options#1279
ole-alb wants to merge 36 commits into
mainfrom
scene-graph-draw-options

Conversation

@ole-alb

@ole-alb ole-alb commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

In this PR the draw options are introduced to the display options.
This makes it easy for the user to display the flaps or e.g. the triangulation.

Description

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 ole-alb changed the base branch from main to display-options January 5, 2026 12:13
@codecov

codecov Bot commented Jan 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.19048% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.55%. Comparing base (8eb0b43) to head (62a43a0).

Files with missing lines Patch % Lines
src/wing/CCPACSWing.cpp 76.19% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1279   +/-   ##
=======================================
  Coverage   72.55%   72.55%           
=======================================
  Files         315      315           
  Lines       27540    27561   +21     
=======================================
+ Hits        19982    19998   +16     
- Misses       7558     7563    +5     
Flag Coverage Δ
unittests 72.55% <76.19%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
src/wing/CCPACSWing.h 100.00% <ø> (ø)
src/wing/CCPACSWing.cpp 84.93% <76.19%> (-0.21%) ⬇️
🚀 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.

@ole-alb ole-alb marked this pull request as ready for review February 6, 2026 15:16
@ole-alb ole-alb requested a review from joergbrech February 6, 2026 15:17
Base automatically changed from display-options to main May 22, 2026 11:46

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

Thanks! This looks great! I noticed a few things.

  • When selecting "Show the complete aircraft with duct cutouts, the aircraft is generated a few times in a succession. This happens also with draw options that open a dialog: The dialog opens several times.
  • The Draw Options entry exists also for geometries, that have no options, such as engines or engine pylons. The drop down menu is empty.
  • There are some draw options that I would remove from the drop down, e.g. "Draw Control Point Net", "Show intersection line" and "Draw any component". I feel like these are not a property of the aircraft geometry but a separate function that should be kept in a menu.
  • Some draw options could be disabled/excluded from the drop down, if they are not defined (far field, systems, ducts, flaps, structure)
  • The draw options are all called "Show ...". IMHO we can remove the "Show".
  • When selecting "Show Fuselage Profile" and then choosing another draw option for the fuselage, the profile is not removed.
  • When selecting "Show Wing Profiles" and then choosing another draw option nothing happens. I am stuck on the profile view.
  • When selecting "Show Wing Component segment points" a dialog for the eta xsi coordinaes appear several times. Maybe we can remove this draw option and just keep it in the menu?
  • Please add a changelog entry.

Comment thread src/wing/CCPACSWing.h
Comment on lines +177 to +181
/**
* @brief Returns the mirrored loft at the wings symmetry plane
* @param input_shape Shape to be mirrored with the wings symmetry
* @return PNamedShape
*/

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.

Eventhough we talked about this, now that some time has past I find this function a bit confusing. Why does it take an argument? What happens if the argument is nullptr? I think this function could use more explaining documentation.

Comment thread src/wing/CCPACSWing.cpp
Comment on lines +332 to +337
std::string mirrorName = mirroredShape->Name();
mirrorName += "M";
std::string mirrorShortName = mirroredShape->ShortName();
mirrorShortName += "M";
mirroredShape->SetName(mirrorName.c_str());
mirroredShape->SetShortName(mirrorShortName.c_str());

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.

I think we agreed on a different suffix for mirrored uids? :mirrored

Comment on lines +67 to +75

// for (const auto& action : getDrawOptionsActions()) {
// QAction* act = findChild<QAction*>(action.name);
// if (act) {
// connect(act, &QAction::triggered, this, [this, action]() {
// action.handler(currentUid); // Pass the UID
// });
// }
// }

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.

dev artifact?

Suggested change
// for (const auto& action : getDrawOptionsActions()) {
// QAction* act = findChild<QAction*>(action.name);
// if (act) {
// connect(act, &QAction::triggered, this, [this, action]() {
// action.handler(currentUid); // Pass the UID
// });
// }
// }

void drawWingComponentSegmentPoints(const QString& wingUID=nullptr);
void drawWingShells(const QString& wingUID=nullptr);
void drawWingFlaps(const QString& wingUID=nullptr);
void drawWingStructure(const QString& wingUID=nullptr);

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.

Why nullptr default argument? I am surprised we can convert a nullptr to a const QString& without compiler error in the first place.

Why do we need a default argument?

Comment on lines +110 to +115
void drawFuselage(const QString& Uid=nullptr);
void drawFuselageTriangulation(const QString& Uid=nullptr);
void drawFuselageSamplePoints(const QString& Uid=nullptr);
void drawFuselageSamplePointsAngle(const QString& Uid=nullptr);
void drawFusedFuselage(const QString& Uid=nullptr);
void drawFuselageGuideCurves(const QString& Uid=nullptr);

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.

See above. Why the nullptr default argument?


// Rotor selection dialogs
QString dlgGetRotorSelection();
QString dlgGetRotorSelection(const QString& rotorUid=nullptr);

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.

See above. Why the nullptr default argument?

Comment on lines +175 to +176
QString dlgGetRotorBladeSelection(const QString& rotorBladeUid=nullptr);
QString dlgGetRotorBladeComponentSegmentSelection(const QString& rotorBladeCompSegUid=nullptr);

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.

See above. Why the nullptr default argument?


// Fuselage selection dialogs
QString dlgGetFuselageSelection();
QString dlgGetFuselageSelection(const QString& Uid=nullptr);

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.

See above. Why the nullptr default argument?

for (int j = 1; j <= wing.GetComponentSegmentCount(); ++j) {
tigl::CCPACSWingComponentSegment& cs = wing.GetComponentSegment(j);

if (auto& teds = cs.GetControlSurfaces()->GetTrailingEdgeDevices()) {

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.

Do we have to check if the cs has control surfaces in the first place?

}
}
}
if (auto& leds = cs.GetControlSurfaces()->GetLeadingEdgeDevices()) {

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.

See above. What if the cs has no control surfaces?

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.

2 participants