8 Commits

Author SHA1 Message Date
Jan Bařtipán
2b01d14f7b Catch2 updated to v3.8, all tests migrated 2025-02-06 15:55:09 +01:00
Martin Šach
e8064cdb14 Refactor: SupportSpotsGenerator integrals implementation improvements.
Split Integrals constructor to accept polygon and polygons.
Add operator+(Integrals, Integrals).
Make sure extrusion extraction for integral calculation throws in invalid case.
2023-12-01 09:28:21 +01:00
Martin Šach
782fa47791 Remove usage of polygons_covered_by_width.
In SupportSpotsGenerator there is a need to compute integral over
extrusions.
The mentioned function is slow for this use case. As it solves a harder
problem.
It is better to iterate the extrusion lines directly.
2023-12-01 09:28:21 +01:00
Martin Šach
b45e9d2830 Fix: Give more space for a rounding error to a supports spots generator test.
There was a test that relied on randomness and also checked the result
with very hight precision. That led to a failed test once upon a time.
Now the checking is more benevolent (it should be, as the code is
not expected to be precise) and also the randomness is removed.
2023-10-20 10:27:28 +02:00
Martin Šach
003232dfb6 Add tests for SupportSpotsGenerator::ObjectPart construction.
Ensuring that ObjectParts in SupportSpotsGenerator are properly
generated from slice is crucial for any further computations.
2023-09-26 16:11:19 +02:00
Martin Šach
13579fff45 Move definitons to header in the SupportSpotsGenerator.
Moving the definitions to a header file will enable testing the
functions involved.
2023-09-26 16:11:19 +02:00
Lukas Matena
11273b29ac Fixed compiler warnings 2023-09-26 14:24:23 +02:00
Martin Šach
6164051d60 Use proper formula for second moment of area.
SupportSpotsGenerator originally used a heuristic formula. Current
formula is properly derived using known properties of
second moment of area. Several tests of this formula are added.
2023-09-22 13:30:05 +02:00