-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made Lofting algorithm throw Exception when side caps are invalid #999
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in principle. One unit tests triggers the new exception, see here. We should investigate and make sure that all unit tests succeed before we merge.
As per our chat on MM: Let's make sure that this doesn't affect the TiGL performance too much. One option could be to activate the test only in debug mode (and optionally: If we have the check in debug mode only, we could use simple assertions rather than exceptions. I believe this is common for checks that are only performed in debug mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a simple test where this exception is thrown? We can use the same preprocessor directive in the test that only checks if the lofter throws in debug mode.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #999 +/- ##
==========================================
- Coverage 70.03% 70.02% -0.01%
==========================================
Files 301 301
Lines 24312 24316 +4
==========================================
+ Hits 17026 17028 +2
- Misses 7286 7288 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I am sorry, could you please have another look at the coverage report? |
NVM, the uncovered lines are in a fallback implementation for non-planar profiles, which are not supported by TiGL anyway. Constructing a unit test for this exotic case just for the sake of code coverage seems like too much work. Let's merge |
Description
Throwing an exception while building the shells, using invalid side caps, prevents TiGL to build invalid solid shapes.
How Has This Been Tested?
Added test in testFuselageStandardProfileRectangle.cpp that checks for exception if side caps are invalid. If rectangular profile wires are built that cannot be used to create valid side caps, the exception is thrown.
Screenshots, that help to understand the changes(if applicable):
This solid (created by a rectangle profile with too large corner radius) is not valid. Building side caps from its closed, but entangled profile wire is not possible. Solids like this will not be built and used mistakenly, if exception is thrown.
Checklist: