Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4f2e17b
deleted obsolete classes
merakulix Mar 20, 2025
c73ac60
update generated files
merakulix Mar 20, 2025
c7a2215
removed duplicates
merakulix Mar 20, 2025
b0fa5b8
deleted obsolete classes
merakulix Mar 20, 2025
3ea0bb5
removed deleted classes
merakulix Mar 20, 2025
9d1e96a
delete obsolete classes
merakulix Mar 20, 2025
6e8a4fa
update include statements for deleted classes
merakulix Mar 20, 2025
b7ca6b7
update tests includes
merakulix Apr 8, 2025
d4db9b4
update generated files
merakulix Apr 8, 2025
7c51b4c
update functions in customized classes
merakulix Apr 8, 2025
2e4c766
update functions in customized classes
merakulix Apr 8, 2025
7da9ba9
update includes
merakulix Apr 8, 2025
7f9f42e
update includes
merakulix Apr 8, 2025
649ecba
fix building python internal
merakulix May 5, 2025
f957d9d
add test for newly generated getter functions
merakulix May 7, 2025
4e26dba
use typedef
merakulix May 12, 2025
3df7e6f
removed typedef
merakulix May 12, 2025
80faedf
uncomment test
merakulix May 13, 2025
427d714
removed include
merakulix May 13, 2025
456c86b
Merge branch 'master' into update_code_gen
merakulix May 13, 2025
eaf7e31
fix merge conflicts
merakulix Jun 24, 2025
e4b78dc
solve conflicts with Tanks PR
merakulix Jul 7, 2025
90f91ed
update codgen submodule to DLR-SC repo
merakulix Jul 7, 2025
ed21acb
merge master
merakulix Jul 10, 2025
87fa088
fix merge conflicts
merakulix Jul 10, 2025
aaaae14
update submodule
merakulix Jul 10, 2025
9b8a640
update getters and error messages for code_gen_update
merakulix Jul 10, 2025
3f2af6d
update ChangeLog.md for cpacs_gen update
merakulix Jul 10, 2025
4496abe
update for vessels/fueltanks
merakulix Jul 10, 2025
8d9aba8
update for vessels/fueltanks
merakulix Jul 10, 2025
3649286
fix includes
merakulix Jul 14, 2025
630b606
remove duplicate code
merakulix Jul 14, 2025
5176282
update function name
merakulix Jul 14, 2025
5501e4c
updated class types
merakulix Jul 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "thirdparty/cpacs_gen"]
path = thirdparty/cpacs_gen
url = https://github.com/RISCSoftware/cpacs_tigl_gen.git
url = https://github.com/DLR-SC/cpacs_tigl_gen.git
branch = master
ignore = dirty
10 changes: 9 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ Changelog

Changes since last release
-------------

10/07/2025
- General changes
- Updated TiGL to new Version of [cpacs_tigl_Gen](https://github.com/DLR-SC/cpacs_tigl_gen) which is a fork from [RISCSoftware/cpacs_tigl_gen](https://github.com/RISCSoftware/cpacs_tigl_gen)

- Fixes
- [#59](https://github.com/RISCSoftware/cpacs_tigl_gen/issues/59)
Getters by index and uID are generated now for all Elements in CPACS with Attribute: maxOccur = "unbounded". This gives users quick
access to elements and eliminates the need for TIGL developers to customize classes for this purpose.

08/02/2025

- General changes:
Expand Down
21 changes: 11 additions & 10 deletions TIGLViewer/src/TIGLViewerDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#include "CCPACSEnginePylon.h"
#include "generated/CPACSTrailingEdgeDevices.h"
#include "CCPACSTrailingEdgeDevice.h"
#include "CCPACSFuselage.h"

#define max(a,b) ((a) > (b) ? (a) : (b))

Expand Down Expand Up @@ -600,7 +601,7 @@ QString TIGLViewerDocument::dlgGetFuselageSelection()
tigl::CCPACSConfiguration& config = GetConfiguration();
int fuselageCount = config.GetFuselageCount();
for (int i = 1; i <= fuselageCount; i++) {
tigl::CCPACSFuselage& fuselage = config.GetFuselage(i);
auto& fuselage = config.GetFuselage(i);
std::string name = fuselage.GetUID();
if (name.empty()) {
name = "Unknown fuselage";
Expand All @@ -626,7 +627,7 @@ QString TIGLViewerDocument::dlgGetFuselageSegmentSelection()
tigl::CCPACSConfiguration& config = GetConfiguration();
int fuselageCount = config.GetFuselageCount();
for (int i = 1; i <= fuselageCount; i++) {
tigl::CCPACSFuselage& fuselage = config.GetFuselage(i);
auto& fuselage = config.GetFuselage(i);
for (int j = 1; j <= fuselage.GetSegmentCount(); ++j) {
tigl::CCPACSFuselageSegment& segment = fuselage.GetSegment(j);
std::string name = segment.GetUID();
Expand Down Expand Up @@ -874,7 +875,7 @@ void TIGLViewerDocument::drawFuselageGuideCurves()
}

START_COMMAND()
const tigl::CCPACSFuselage& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
const auto& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
const TopoDS_Compound& guideCurves = fuselage.GetSegments().GetGuideCurveWires();

TopoDS_Iterator anIter(guideCurves);
Expand Down Expand Up @@ -1027,7 +1028,7 @@ void TIGLViewerDocument::drawFuselage()
}

START_COMMAND()
tigl::CCPACSFuselage& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
auto& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());

app->getScene()->deleteAllObjects();

Expand Down Expand Up @@ -1059,7 +1060,7 @@ void TIGLViewerDocument::drawFuselageTriangulation()
}

START_COMMAND()
tigl::CCPACSFuselage& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
auto& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());

//clear screen
app->getScene()->deleteAllObjects();
Expand Down Expand Up @@ -1093,7 +1094,7 @@ void TIGLViewerDocument::drawFuselageSamplePoints()
}

START_COMMAND()
tigl::CCPACSFuselage& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
auto& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());

for (int segmentIndex = 1; segmentIndex <= fuselage.GetSegmentCount(); segmentIndex++) {

Expand Down Expand Up @@ -1132,7 +1133,7 @@ void TIGLViewerDocument::drawFuselageSamplePointsAngle()
double x, y, z;

app->getScene()->deleteAllObjects();
tigl::CCPACSFuselage& fuselage = GetConfiguration().GetFuselage(fuselageIndex);
auto& fuselage = GetConfiguration().GetFuselage(fuselageIndex);

// Draw the fuselage
for (int i = 1; i <= fuselage.GetSegmentCount(); i++) {
Expand Down Expand Up @@ -1199,7 +1200,7 @@ void TIGLViewerDocument::drawAllFuselagesAndWingsSurfacePoints()

// Draw all fuselages
for (int fuselageIndex = 1; fuselageIndex <= GetConfiguration().GetFuselageCount(); fuselageIndex++) {
tigl::CCPACSFuselage& fuselage = GetConfiguration().GetFuselage(fuselageIndex);
auto& fuselage = GetConfiguration().GetFuselage(fuselageIndex);

app->getScene()->displayShape(fuselage.GetLoft(), true, getDefaultShapeColor());

Expand Down Expand Up @@ -1749,7 +1750,7 @@ void TIGLViewerDocument::exportFuselageCurvesBRep()
}

START_COMMAND()
tigl::CCPACSFuselage& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
auto& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
QString baseName = QDir(std::string(dirname.toStdString() + "/" + fuselage.GetUID()).c_str()).absolutePath();

TopoDS_Compound profiles;
Expand Down Expand Up @@ -1788,7 +1789,7 @@ void TIGLViewerDocument::drawFusedFuselage()

START_COMMAND()
app->getScene()->deleteAllObjects();
tigl::CCPACSFuselage& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
auto& fuselage = GetConfiguration().GetFuselage(fuselageUid.toStdString());
app->getScene()->displayShape(fuselage.GetLoft(), true, getDefaultShapeColor());
}

Expand Down
4 changes: 2 additions & 2 deletions bindings/python_internal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if (TIGL_BINDINGS_PYTHON_INTERNAL)
endif()

include(tiglmacros)

# Ensure the correct Python version is picked up by specifying the Python_EXECUTABLE
# Ensure the correct Python version is picked up by specifying the Python_EXECUTABLE
if (DEFINED ENV{CONDA_PREFIX})
if (WIN32)
set(Python3_EXECUTABLE "$ENV{CONDA_PREFIX}/python.exe")
Expand Down
52 changes: 29 additions & 23 deletions bindings/python_internal/configuration.i
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@
#include "CCPACSConfiguration.h"
#include "CCPACSConfigurationManager.h"
#include "CTiglFusePlane.h"
#include "CCPACSFuselage.h"
#include "generated/CPACSFuselageProfiles.h"
#include "CCPACSFuselageProfiles.h"
#include "CCPACSWingProfile.h"
#include "generated/CPACSStandardProfile.h" //TODO: Replace with CCPACSStandardProfile, once it exists.
#include "generated/CPACSFuselageSections.h"
#include "CCPACSFuselageSection.h"
#include "CCPACSExternalObject.h"
#include "CTiglShapeCache.h"
Expand Down Expand Up @@ -81,7 +85,7 @@
#include "generated/CPACSTrailingEdgeDevice.h"
#include "CTiglControlSurfaceTransformation.h"
#include "CCPACSTrailingEdgeDevice.h"
#include "CCPACSEnginePylons.h"
#include "generated/CPACSTrailingEdgeDevices.h"
#include "CCPACSEnginePylon.h"
#include "CCPACSEnginePosition.h"
#include "generated/CPACSLateralCap_placement.h"
Expand All @@ -100,18 +104,29 @@
#include "CCPACSDucts.h"
#include "CCPACSDuctAssembly.h"
#include "CCPACSDuct.h"
#include "CCPACSNacelleSections.h"
#include "CCPACSRotationCurve.h"
#include "CCPACSNacelleCenterCowl.h"
#include "generated/CPACSNacelleCowl.h"
#include "CCPACSNacelleCowl.h"
#include "generated/CPACSEngine.h"
#include "generated/CPACSEngineNacelle.h"
#include "generated/CPACSNacelleGuideCurves.h"
#include "CCPACSNacelleGuideCurves.h"
#include "CCPACSPositionings.h"
#include "generated/CPACSProfiles.h"
#include "generated/CPACSFuelTanks.h"
#include "generated/CPACSFuelTank.h"
#include "generated/CPACSFuelTankVolume.h"
#include "CCPACSFuelTanks.h"
#include "CCPACSFuelTank.h"
#include "generated/CPACSVessels.h"
#include "CCPACSVessels.h"
#include "generated/CPACSVessel.h"
#include "CCPACSVessel.h"
#include "generated/CPACSVesselStructure.h"
#include "CCPACSVesselStructure.h"
#include "CCPACSFuelTank.h"
#include "CCPACSFrame.h"

%}

%feature("autodoc", "3");
Expand Down Expand Up @@ -159,10 +174,10 @@
%boost_optional(tigl::CCPACSWingCells)
%boost_optional(tigl::generated::CPACSAlignmentCrossBeam)
%boost_optional(tigl::generated::CPACSDoorAssemblyPosition_doorType)
%boost_optional(tigl::CCPACSWingSections)
%boost_optional(tigl::generated::CPACSWingSections)
%boost_optional(tigl::CCPACSWingSegments)
%boost_optional(tigl::CCPACSPositionings)
%boost_optional(tigl::CCPACSEnginePylons)
%boost_optional(tigl::generated::CPACSEnginePylons)
%boost_optional(tigl::CCPACSWingProfiles)
%boost_optional(tigl::CCPACSFuselageProfiles)
%boost_optional(tigl::CCPACSRotorProfiles)
Expand Down Expand Up @@ -213,7 +228,7 @@
%include "CCPACSWallSegment.h"

// ----------------- Engines ---------------------------//
%boost_optional(tigl::CCPACSEngines)
%boost_optional(tigl::generated::CPACSEngines)
%boost_optional(tigl::generated::CPACSEngineNacelle)
%boost_optional(tigl::CCPACSNacelleCowl)
%boost_optional(tigl::CCPACSNacelleCenterCowl)
Expand All @@ -238,7 +253,6 @@ namespace tigl {
%include "CCPACSNacelleCowl.h"
%include "generated/CPACSEngine.h"
%include "generated/CPACSEngines.h"
%include "CCPACSEngines.h"

// ---------------- Control surfaces ------------------ //
%boost_optional(tigl::generated::CPACSControlSurfaceTrackType_trackSubType)
Expand All @@ -256,7 +270,7 @@ namespace tigl {
%boost_optional(tigl::generated::CPACSLeadingEdgeHollow)
%boost_optional(tigl::generated::CPACSCutOutControlPoints)
%boost_optional(tigl::generated::CPACSControlSurfaceSkinCutOutBorder)
%boost_optional(tigl::CCPACSTrailingEdgeDevices)
%boost_optional(tigl::generated::CPACSTrailingEdgeDevices)
%boost_optional(tigl::CCPACSControlSurfaces)
%boost_optional(tigl::CPACSControlSurfaceWingCutOut)
%boost_optional(tigl::generated::CPACSControlSurfaceTracks)
Expand Down Expand Up @@ -303,7 +317,6 @@ namespace tigl
%ignore ComponentSegment(CCPACSTrailingEdgeDevice&);
%include "CCPACSTrailingEdgeDevice.h"
%include "generated/CPACSTrailingEdgeDevices.h"
%include "CCPACSTrailingEdgeDevices.h"
%include "generated/CPACSControlSurfaces.h"
%include "CCPACSControlSurfaces.h"

Expand Down Expand Up @@ -338,7 +351,7 @@ namespace tigl
%include "generated/CPACSSkin.h"
%include "generated/CPACSFuselageStructure.h"
%include "CCPACSFuselageStructure.h"

%include "generated/CPACSFuselageSections.h"

%include "generated/CPACSWingSkin.h"
%include "CPACSRotor_type.h"
Expand All @@ -348,14 +361,15 @@ namespace tigl
%include "CPACSRotorHubHinge_type.h"

// --------------- Fuselage tanks -----------------//
%boost_optional(tigl::generated::CPACSVessels)
%boost_optional(tigl::CCPACSVessels)
%boost_optional(tigl::generated::CPACSFuelTanks)
%boost_optional(tigl::CCPACSFuelTanks)
%boost_optional(tigl::generated::CPACSFuelTankVolume)
%boost_optional(tigl::CCPACSVesselStructure)

namespace tigl {
class CCPACSFuselageSegments;
class CCPACSVessels;
}

%include "generated/CPACSIsotensoidDome.h"
Expand All @@ -364,18 +378,16 @@ class CCPACSVessels;
%include "generated/CPACSDomeType.h"
%include "generated/CPACSVesselStructure.h"
%include "CCPACSVesselStructure.h"
%include "generated/CPACSFuelTanks.h"
%include "generated/CPACSFuelTankVolume.h"
%include "generated/CPACSFuelTank.h"
%include "CTiglFuselageConnection.h"
%include "CCPACSFuselageSegment.h"
%include "CCPACSFuselageSegments.h"
%include "CCPACSFuelTanks.h"
%include "CCPACSFuelTank.h"
%include "generated/CPACSFuelTankVolume.h"
%include "generated/CPACSVessels.h"
%include "CCPACSVessels.h"
%include "generated/CPACSVessel.h"
%include "CCPACSVessel.h"
%include "generated/CPACSFuelTanks.h"
%include "generated/CPACSFuelTank.h"
%include "CCPACSFuelTank.h"

// -------------------- Wing Structure -------------------//

Expand Down Expand Up @@ -482,9 +494,6 @@ class CCPACSWingRibsPositioning;
%include "generated/CPACSFuselageSection.h"
%include "CCPACSFuselageSection.h"
%include "generated/CPACSWingSections.h"
%include "CCPACSWingSections.h"
%include "generated/CPACSFuselageSections.h"
%include "CCPACSFuselageSections.h"
%include "generated/CPACSWingElements.h"
%include "CCPACSWingSectionElements.h"
%include "generated/CPACSFuselageElements.h"
Expand Down Expand Up @@ -525,11 +534,9 @@ class CCPACSWingRibsPositioning;
%include "generated/CPACSRotors.h"
%include "CCPACSRotors.h"
%include "generated/CPACSFuselageProfiles.h"
%include "CCPACSFuselageProfiles.h"
%include "generated/CPACSFuselage.h"
%include "CCPACSFuselage.h"
%include "generated/CPACSFuselages.h"
%include "CCPACSFuselages.h"
%include "TiglFarFieldType.h"
%include "generated/CPACSCellPositioningSpanwise.h"
%include "generated/CPACSCellPositioningChordwise.h"
Expand All @@ -553,7 +560,6 @@ class CCPACSWingRibsPositioning;
%include "generated/CPACSEnginePylon.h"
%include "CCPACSEnginePylon.h"
%include "generated/CPACSEnginePylons.h"
%include "CCPACSEnginePylons.h"

// ---------------- Ducts ------------------ //

Expand Down
15 changes: 1 addition & 14 deletions cpacs_gen_input/CustomTypes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ CPACSRotorHub_type TiglRotorHubType
// classes
CPACSAircraftModel CCPACSAircraftModel
CPACSRotorcraftModel CCPACSRotorcraftModel
CPACSProfiles CCPACSProfiles
CPACSMaterialDefinition CCPACSMaterialDefinition
CPACSFarField CCPACSFarField
CPACSGuideCurve CCPACSGuideCurve
CPACSGuideCurves CCPACSGuideCurves
CPACSGuideCurveProfileGeometry CCPACSGuideCurveProfile
CPACSGuideCurveProfiles CCPACSGuideCurveProfiles
CPACSPositioning CCPACSPositioning
CPACSPositionings CCPACSPositionings
CPACSPoint CCPACSPoint
Expand All @@ -39,12 +37,10 @@ CPACSGenericSystems CCPACSGenericSystems
CPACSGenericSystem CCPACSGenericSystem

CPACSFuselage CCPACSFuselage
CPACSFuselages CCPACSFuselages
CPACSFuselageProfiles CCPACSFuselageProfiles
CPACSFuselageSegment CCPACSFuselageSegment
CPACSFuselageSegments CCPACSFuselageSegments
CPACSFuselageSection CCPACSFuselageSection
CPACSFuselageSections CCPACSFuselageSections
CPACSFuselageElement CCPACSFuselageSectionElement
CPACSFuselageElements CCPACSFuselageSectionElements

Expand All @@ -64,7 +60,6 @@ CPACSWingRibsPositioning CCPACSWingRibsPositioning
CPACSWingElement CCPACSWingSectionElement
CPACSWingElements CCPACSWingSectionElements
CPACSWingSection CCPACSWingSection
CPACSWingSections CCPACSWingSections
CPACSWingComponentSegmentStructure CCPACSWingCSStructure
CPACSWingShell CCPACSWingShell
CPACSWingSegment CCPACSWingSegment
Expand Down Expand Up @@ -92,14 +87,11 @@ CPACSRotorHubHinges CCPACSRotorHinges

// fuselage structure
CPACSDoorAssemblyPosition CCPACSDoorAssemblyPosition
CPACSDoors CCPACSDoors
CPACSPressureBulkhead CCPACSPressureBulkhead
CPACSPressureBulkheadAssembly CCPACSPressureBulkheadAssembly
CPACSPressureBulkheadAssemblyPosition CCPACSPressureBulkheadAssemblyPosition
CPACSPressureBulkheads CCPACSPressureBulkheads
CPACSProfileBasedStructuralElement CCPACSProfileBasedStructuralElement
CPACSSheetList CCPACSSheetList
CPACSStructuralProfiles CCPACSStructuralProfiles
CPACSCrossBeamAssemblyPosition CCPACSCrossBeamAssemblyPosition
CPACSCargoCrossBeamsAssembly CCPACSCargoCrossBeamsAssembly
CPACSCrossBeamStrutAssemblyPosition CCPACSCrossBeamStrutAssemblyPosition
Expand All @@ -123,19 +115,16 @@ CPACSWalls CCPACSWalls
// control surfaces
CPACSControlSurfaces CCPACSControlSurfaces
CPACSControlSurfaceBorderTrailingEdge CCPACSControlSurfaceBorderTrailingEdge
CPACSTrailingEdgeDevices CCPACSTrailingEdgeDevices
CPACSTrailingEdgeDevice CCPACSTrailingEdgeDevice
CPACSControlSurfaceOuterShapeTrailingEdge CCPACSControlSurfaceOuterShapeTrailingEdge
CPACSControlSurfaceWingCutOut CCPACSControlSurfaceWingCutOut

// Pylons
CPACSEnginePylon CCPACSEnginePylon
CPACSEnginePylons CCPACSEnginePylons

// Engines
CPACSEnginePositions CCPACSEnginePositions
CPACSEnginePosition CCPACSEnginePosition
CPACSEngines CCPACSEngines
CPACSNacelleCowl CCPACSNacelleCowl
CPACSNacelleSections CCPACSNacelleSections
CPACSNacelleSection CCPACSNacelleSection
Expand All @@ -152,7 +141,5 @@ CPACSDucts CCPACSDucts

// Tanks
CPACSVessel CCPACSVessel
CPACSVessels CCPACSVessels
CPACSFuelTank CCPACSFuelTank
CPACSFuelTanks CCPACSFuelTanks
CPACSVesselStructure CCPACSVesselStructure
CPACSVesselStructure CCPACSVesselStructure
Loading