tigl
tigl copied to clipboard
Implement tiglCrossSectionArea
Fixes #763
Description
The new function calcuates the intersection wires of the fused aircraft with the plane and sums the area of each closed wire in the intersection. There are some cases where this might fail:
- If a cross section cuts an engine nacelles in the y-z-plane this will return a wrong result: The intersection result would contain two concentric circles for the fan and core cowl and one circle for the center cowl.
- If the airplane has inlets or "dimples". To work correctly, we would need to calculate not intersection wires, but intersection faces from cutting a solid with a plane.
How Has This Been Tested?
New unit tests have been added
Screenshots, that help to understand the changes(if applicable):
Checklist:
- [x] A test for the new functionality was added.
- [ ] All tests run without failure.
- [x] The new code complies with the TiGL style guide.
- [ ] New classes have been added to the Python interface.
- [x] API changes were documented properly in tigl.h.
I think the function would be more versatile, if the user can provide a uID. This uID could be either a geometrical component or even the whole aircraft (which then requires fusing).
Okay. According to @ErwinMoerland , the function is okay from the API as it is. There is though the test case GetCrossSectionAreaSimple.sanity_values
which still fails.
@rainman110, this is still WIP, I think we need to adapt our intersection algorithm to het a robust section with a reasonable notion of what is inside and outside. I just haven't found the time for this yet.
EDIT: As soon as I find the time, I will open a new PR that calculates the intersection of solid components with planes. I will close this PR then.
Closing in favour of #921