DLR-SC / tigl

The TiGL Geometry Library to process aircraft geometries in pre-design.
https://dlr-sc.github.io/tigl/
Apache License 2.0
235 stars 60 forks source link

Consistent implementation for combining fuselage guide curves and kinks #1015

Closed svengoldberg closed 2 months ago

svengoldberg commented 3 months ago

Currently, the definition of (starting and end points of) fuselage guide curves is not consistent to user-defined parameterization for (e.g.) kinks. Those guide curve points are, up to now, defined based on the arc length of the start profile and end profile, respectively. While the user-defined parameterization can arbitrary differ from that (see issue #745).

This PR introduces the new CPACS nodes fromParameter and toParameter to account for this 'problem' to make it easier for users to sync guide curves with kinks. The node is implemented via a choice element and the old implementation is kept as the default case to not get in the way with existing code, CPACS files and tests. Since the CPACS scheme is changed, it has to be thought about a CPACS PR, as well.

TODO:

Fix issue #745

Checklist:

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 89.00000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 70.03%. Comparing base (8f02c5b) to head (967c6c1).

Files Patch % Lines
src/guide_curves/CCPACSGuideCurve.cpp 87.50% 4 Missing :warning:
src/wing/CCPACSWing.cpp 50.00% 2 Missing :warning:
src/fuselage/CCPACSFuselageSegments.cpp 80.00% 1 Missing :warning:
...fuselage/CTiglFuselageSegmentGuidecurveBuilder.cpp 85.71% 1 Missing :warning:
src/guide_curves/CCPACSGuideCurveAlgo.h 88.88% 1 Missing :warning:
src/wing/CCPACSWingSegment.cpp 0.00% 1 Missing :warning:
src/wing/CTiglWingSegmentGuidecurveBuilder.cpp 88.88% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015/graphs/tree.svg?width=650&height=150&src=pr&token=8b0i0TsOw6&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC)](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC) ```diff @@ Coverage Diff @@ ## master #1015 +/- ## ========================================== + Coverage 69.91% 70.03% +0.12% ========================================== Files 299 301 +2 Lines 24244 24312 +68 ========================================== + Hits 16949 17026 +77 + Misses 7295 7286 -9 ``` | [Flag](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC) | `70.03% <89.00%> (+0.12%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC) | Coverage Δ | | |---|---|---| | [src/common/tiglcommonfunctions.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Fcommon%2Ftiglcommonfunctions.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2NvbW1vbi90aWdsY29tbW9uZnVuY3Rpb25zLmNwcA==) | `74.92% <100.00%> (+0.21%)` | :arrow_up: | | [src/common/tiglcommonfunctions.h](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Fcommon%2Ftiglcommonfunctions.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2NvbW1vbi90aWdsY29tbW9uZnVuY3Rpb25zLmg=) | `100.00% <ø> (ø)` | | | [src/fuselage/CCPACSFuselageProfileGetPointAlgo.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Ffuselage%2FCCPACSFuselageProfileGetPointAlgo.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2Z1c2VsYWdlL0NDUEFDU0Z1c2VsYWdlUHJvZmlsZUdldFBvaW50QWxnby5jcHA=) | `92.10% <100.00%> (+3.64%)` | :arrow_up: | | [src/fuselage/CCPACSFuselageProfileGetPointAlgo.h](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Ffuselage%2FCCPACSFuselageProfileGetPointAlgo.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2Z1c2VsYWdlL0NDUEFDU0Z1c2VsYWdlUHJvZmlsZUdldFBvaW50QWxnby5o) | `100.00% <100.00%> (ø)` | | | [src/guide\_curves/CCPACSGuideCurves.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Fguide_curves%2FCCPACSGuideCurves.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2d1aWRlX2N1cnZlcy9DQ1BBQ1NHdWlkZUN1cnZlcy5jcHA=) | `66.66% <100.00%> (+1.96%)` | :arrow_up: | | [src/logging/CTiglLogging.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Flogging%2FCTiglLogging.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2xvZ2dpbmcvQ1RpZ2xMb2dnaW5nLmNwcA==) | `80.39% <100.00%> (+5.39%)` | :arrow_up: | | [src/wing/CCPACSWingProfileGetPointAlgo.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Fwing%2FCCPACSWingProfileGetPointAlgo.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL3dpbmcvQ0NQQUNTV2luZ1Byb2ZpbGVHZXRQb2ludEFsZ28uY3Bw) | `90.62% <100.00%> (ø)` | | | [src/wing/CCPACSWingProfileGetPointAlgo.h](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Fwing%2FCCPACSWingProfileGetPointAlgo.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL3dpbmcvQ0NQQUNTV2luZ1Byb2ZpbGVHZXRQb2ludEFsZ28uaA==) | `100.00% <100.00%> (ø)` | | | [src/fuselage/CCPACSFuselageSegments.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Ffuselage%2FCCPACSFuselageSegments.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2Z1c2VsYWdlL0NDUEFDU0Z1c2VsYWdlU2VnbWVudHMuY3Bw) | `81.92% <80.00%> (-0.36%)` | :arrow_down: | | [...fuselage/CTiglFuselageSegmentGuidecurveBuilder.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree&filepath=src%2Ffuselage%2FCTiglFuselageSegmentGuidecurveBuilder.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2Z1c2VsYWdlL0NUaWdsRnVzZWxhZ2VTZWdtZW50R3VpZGVjdXJ2ZUJ1aWxkZXIuY3Bw) | `88.37% <85.71%> (-1.38%)` | :arrow_down: | | ... and [5 more](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC) | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/DLR-SC/tigl/pull/1015/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC)
svengoldberg commented 3 months ago

The following example is taken from the CPACS file uploaded in the issue. Here, the first picture is copied from the issue for reference. The second one is built from the same CPACS file, but the nodes fromRelativeCircumference, toRelativeCircumference are replaced by the new fromParameter and toParameter. The kink is defined to be at parameter=0.3, while the guide curve's respective argument is set to 0.28. Nevertheless in the first picture, the guide curve appears after the kink on the profile. In the second picture, the positions change. The yellow crosses mark the parameters 0.28 and 0.3 on the profile curve and that is just what is expected before.

Picture_Issue

Kinks_and_GuideCurve
qCandyManp commented 2 months ago

Stabiler PR mein Bube!