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

Implemented Fuselage Profile Type: Rectangle (Issue #909) #1005

Closed merakulix closed 1 month ago

merakulix commented 5 months ago

Description

Implementing the rectangle profile type as an element of the CPACS standard profile type covers one part of issue #909 on parametric profile types. This approach is based on point lists (std::vector) for approximation of curves, since the lofting algorithms don't support rational B-Splines yet.

Changes in tiglcommonfunctions.* :

Added new global functions:

Changes in CCPACSFuselageProfile.* :

Added new member function

Changed member function:

How Has This Been Tested?

Added Unit Tests:

a circle profile with kinks and a rectangle profile with and without corner radius, as shown in the image below

grafik grafik

circle profile, rectangle profile with and without corner radius given, and guide curves, as shown in the images below

grafik grafik

Checklist:

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 97.54601% with 4 lines in your changes missing coverage. Please review.

Project coverage is 70.19%. Comparing base (a334bd3) to head (571a2ef). Report is 73 commits behind head on master.

Files with missing lines Patch % Lines
src/fuselage/CCPACSFuselageProfile.cpp 94.73% 4 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/DLR-SC/tigl/pull/1005/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/1005?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 #1005 +/- ## ========================================== + Coverage 70.03% 70.19% +0.16% ========================================== Files 301 301 Lines 24312 24429 +117 ========================================== + Hits 17026 17148 +122 + Misses 7286 7281 -5 ``` | [Flag](https://app.codecov.io/gh/DLR-SC/tigl/pull/1005/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/1005/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC) | `70.19% <97.54%> (+0.16%)` | :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 with missing lines](https://app.codecov.io/gh/DLR-SC/tigl/pull/1005?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/1005?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==) | `76.84% <100.00%> (+1.92%)` | :arrow_up: | | [src/common/tiglcommonfunctions.h](https://app.codecov.io/gh/DLR-SC/tigl/pull/1005?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/geometry/CTiglPointsToBSplineInterpolation.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1005?src=pr&el=tree&filepath=src%2Fgeometry%2FCTiglPointsToBSplineInterpolation.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2dlb21ldHJ5L0NUaWdsUG9pbnRzVG9CU3BsaW5lSW50ZXJwb2xhdGlvbi5jcHA=) | `90.76% <100.00%> (+0.60%)` | :arrow_up: | | [src/fuselage/CCPACSFuselageProfile.cpp](https://app.codecov.io/gh/DLR-SC/tigl/pull/1005?src=pr&el=tree&filepath=src%2Ffuselage%2FCCPACSFuselageProfile.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC#diff-c3JjL2Z1c2VsYWdlL0NDUEFDU0Z1c2VsYWdlUHJvZmlsZS5jcHA=) | `83.22% <94.73%> (+3.06%)` | :arrow_up: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/DLR-SC/tigl/pull/1005/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DLR-SC)
merakulix commented 1 month ago

I updated the code to generate the profiles using the CFunctionToBSpline function. On my local machine unit-and integration tests ran successful.