Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
42dd3b1
add wing options
ole-alb Dec 15, 2025
686f413
Merge remote-tracking branch 'origin/display-options' into scene-grap…
ole-alb Dec 17, 2025
72fd107
Merge remote-tracking branch 'origin/display-options' into scene-grap…
ole-alb Dec 17, 2025
b716d35
add draw functions
ole-alb Dec 18, 2025
8869e3c
Merge remote-tracking branch 'origin/display-options' into scene-grap…
ole-alb Dec 18, 2025
da9d499
Merge remote-tracking branch 'origin/display-options' into scene-grap…
ole-alb Dec 18, 2025
9407856
don't delete wing when displaying flaps
ole-alb Dec 18, 2025
35cc524
Merge remote-tracking branch 'origin/mirror-flaps' into scene-graph-d…
ole-alb Dec 18, 2025
c54c66e
Merge remote-tracking branch 'origin/display-options' into scene-grap…
ole-alb Jan 5, 2026
c51fbd1
fix mirrored flap transform
ole-alb Jan 8, 2026
eb2c509
apply flap transform for leds
ole-alb Jan 8, 2026
d9e7c9b
fix display wing option
ole-alb Jan 8, 2026
4481e66
fix crash invalid uid
ole-alb Jan 8, 2026
0d4fdcc
fix reset button for wings
ole-alb Jan 9, 2026
3d89992
current state
ole-alb Jan 23, 2026
009cbe7
mirror ribs and spars
ole-alb Jan 23, 2026
4fb6591
add wing structure to display options
ole-alb Feb 3, 2026
b173bb5
add shells to display options
ole-alb Feb 3, 2026
0032980
add component segments to display options
ole-alb Feb 3, 2026
6619f61
add fused wing
ole-alb Feb 3, 2026
84f390e
rename show options
ole-alb Feb 3, 2026
c7b5cd8
use removeWingFlaps helper
ole-alb Feb 3, 2026
942bb66
use draw wing in drawfusedwing
ole-alb Feb 3, 2026
6169d98
add sample points to display options
ole-alb Feb 3, 2026
0408674
add triangulation to display options
ole-alb Feb 3, 2026
7f4b1cb
add overlay porfile points to display options
ole-alb Feb 3, 2026
0fb81ef
add wing guide curves to display options
ole-alb Feb 4, 2026
6013a5b
add fuselage options to display options
ole-alb Feb 4, 2026
b22f2b0
add aircraft options
ole-alb Feb 4, 2026
2fdd20b
add rotor to display functions
ole-alb Feb 5, 2026
a4684f4
create DrawOptionsActions to collect the actions in one file and use …
ole-alb Feb 6, 2026
8fdd3f3
Merge branch 'display-options' into scene-graph-draw-options
ole-alb Feb 6, 2026
a3d6033
Merge branch 'display-options' into scene-graph-draw-options
ole-alb Feb 9, 2026
c1c3ca2
Merge remote-tracking branch 'origin' into scene-graph-draw-options
ole-alb Jun 2, 2026
f0c061e
fix merge errors
ole-alb Jun 2, 2026
62a43a0
Merge branch 'main' into scene-graph-draw-options
ole-alb Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions TIGLCreator/src/DrawOptionsActions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#include "DrawOptionsActions.h"
#include <QDebug>

// Forward declaration for example
void onColorChosen();


// WING actions
const std::vector<DrawOptionAction>& getWingDrawOptionsActions() {
static std::vector<DrawOptionAction> actions = {
{ "Show Wing", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWing(uid);} },
{ "Show Fused wing", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFusedWing(uid);} },
{ "Show Wing Shells", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingShells(uid); } },
{ "Show Wing Component segment", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingComponentSegment(uid); } },
{ "Show Wing Structure", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingStructure(uid);} },
{ "Show Wing triangulation", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingTriangulation(uid); } },
{ "Show Wing Profiles", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingProfiles(); } },
{ "Show Wing Guide curves", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingGuideCurves(uid);} },
{ "Show Wing Flaps", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingFlaps(uid);} },
{ "Show Wing Sample points", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingSamplePoints(uid);} },
{ "Show Wing Overlay profile points", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingOverlayProfilePoints(uid); } },
{ "Show Wing Component segment points", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawWingComponentSegmentPoints(uid);} }
};
return actions;
}

// FUSELAGE actions
const std::vector<DrawOptionAction>& getFuselageDrawOptionsActions() {
static std::vector<DrawOptionAction> actions = {
{ "Show Fuselage", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFuselage(uid);} },
{ "Show Fuselage Profiles", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFuselageProfiles(); } },
{ "Show Fuselage Guide Curves", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFuselageGuideCurves(uid); } },
{ "Show Fuselage triangulation", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFuselageTriangulation(uid); } },
{ "Show Fuselage Sample points", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFuselageSamplePoints(uid); } },
{ "Show Fuselage Sample points at angle", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFuselageSamplePointsAngle(uid); } },
{ "Show Fused fuselage", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFusedFuselage(uid); } }
};
return actions;
}

// PLANE actions
const std::vector<DrawOptionAction>& getPlaneDrawOptionsActions() {
static std::vector<DrawOptionAction> actions = {
{ "Show the complete aircraft", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawConfiguration(); } },
{ "Show the complete aircraft with duct cutouts", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawConfigurationWithDuctCutouts(); } },
{ "Show he complete aircraft fused (slow)", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFusedAircraft(); } },
{ "Show fused aircraft triangulation (slow)", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFusedAircraftTriangulation(); } },
{ "Show intersection line", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawIntersectionLine(); } },
{ "Draw Far Field", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFarField(); } },
{ "Draw Systems", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawSystems();} },
{ "Draw any Component", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawComponent(); } },
{ "Draw Control Point Net", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawControlPointNet(); } }
};
return actions;
}

// ROTORBLADE actions
const std::vector<DrawOptionAction>& getRotorBladeDrawOptionsActions() {
static std::vector<DrawOptionAction> actions = {
{ "Show Rotor Blade", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorBlade(uid); } },
{ "Show Rotor Blade Guide curves", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorBladeGuideCurves(); } },
{ "Show Rotor Blade overlay profile points", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorBladeOverlayProfilePoints(uid); } },
{ "Show Rotor Blade Triangulation", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorBladeTriangulation(uid); } },
{ "Show Sample Rotor Blade points", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorBladeSamplePoints(uid); } },
{ "Show Fused Rotor Blade", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawFusedRotorBlade(uid); } },
{ "Show Rotor Blade Component segment", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorBladeComponentSegment(uid); } },
{ "Show Rotor Blade Component segment points", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorBladeComponentSegmentPoints(uid); } },
{ "Show Rotor Blade Shells", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorBladeShells(uid); } },
{ "Show all Rotors, Wings and Fuselages", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawAllFuselagesAndWingsSurfacePoints(); } }
};
return actions;
}

// ROTOR actions
const std::vector<DrawOptionAction>& getRotorDrawOptionsActions() {
static std::vector<DrawOptionAction> actions = {
{ "Show Rotor", [](TIGLCreatorDocument* doc, const QString& uid){ doc->drawRotorByUID(uid);} },
{ "Show Rotor Disk", [](TIGLCreatorDocument* doc, const QString& uid){doc->drawRotorDisk(uid);} },
{ "Show Rotor Properties", [](TIGLCreatorDocument* doc, const QString& uid){ doc->showRotorProperties(uid);} }
};
return actions;
}
16 changes: 16 additions & 0 deletions TIGLCreator/src/DrawOptionsActions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once
#include <QString>
#include "TIGLCreatorDocument.h"

void handleDrawOption(const QString& actionName);

struct DrawOptionAction {
QString label; // User-facing label
std::function<void(TIGLCreatorDocument*, const QString& uid)> handler;
};

const std::vector<DrawOptionAction>& getWingDrawOptionsActions();
const std::vector<DrawOptionAction>& getFuselageDrawOptionsActions();
const std::vector<DrawOptionAction>& getPlaneDrawOptionsActions();
const std::vector<DrawOptionAction>& getRotorBladeDrawOptionsActions();
const std::vector<DrawOptionAction>& getRotorDrawOptionsActions();
9 changes: 5 additions & 4 deletions TIGLCreator/src/TIGLCreatorContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ Handle(AIS_Shape) TIGLCreatorContext::displayShape(const PNamedShape& pshape, bo
}

// Displays a point on the screen
void TIGLCreatorContext::displayPoint(const gp_Pnt& aPoint,
Handle(AIS_Shape) TIGLCreatorContext::displayPoint(const gp_Pnt& aPoint,
const char* aText,
Standard_Boolean UpdateViewer,
Standard_Real anXoffset,
Expand All @@ -419,16 +419,17 @@ void TIGLCreatorContext::displayPoint(const gp_Pnt& aPoint,
Standard_Real TextScale)
{
if (std::string(aText).empty()) {
displayShape(BRepBuilderAPI_MakeVertex(gp_Pnt(aPoint.X() + anXoffset, aPoint.Y() + anYoffset, aPoint.Z() + aZoffset)), UpdateViewer, Quantity_NOC_YELLOW);
return displayShape(BRepBuilderAPI_MakeVertex(gp_Pnt(aPoint.X() + anXoffset, aPoint.Y() + anYoffset, aPoint.Z() + aZoffset)), UpdateViewer, Quantity_NOC_YELLOW);
}
else {
Handle(ISession_Point) aGraphicPoint = new ISession_Point(aPoint.X(), aPoint.Y(), aPoint.Z());
myContext->Display(aGraphicPoint,UpdateViewer);
Handle(ISession_Text) aGraphicText = new ISession_Text(aText, aPoint.X() + anXoffset,
aPoint.Y() + anYoffset,
aPoint.Z() + aZoffset);
aPoint.Y() + anYoffset,
aPoint.Z() + aZoffset);
aGraphicText->SetScale(TextScale);
myContext->Display(aGraphicText,UpdateViewer);
return Handle(AIS_Shape)::DownCast(aGraphicPoint);
}

}
Expand Down
2 changes: 1 addition & 1 deletion TIGLCreator/src/TIGLCreatorContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class TIGLCreatorContext : public QObject

void setGridOffset (Standard_Real offset);

void displayPoint(const gp_Pnt& aPoint,
Handle(AIS_Shape) displayPoint(const gp_Pnt& aPoint,
const char* aText,
Standard_Boolean UpdateViewer,
Standard_Real anXoffset,
Expand Down
Loading
Loading