Commit Graph

310 Commits

Author SHA1 Message Date
Tom Hulton-Harrop
4a5d11548c add gsl span support 2023-04-23 19:19:54 +01:00
Jan Niklas Hasse
81612cb108
Merge pull request #43 from AndriyAndreyev/stability_fixes
Stability fixes
2022-05-20 15:46:44 +02:00
Jan Niklas Hasse
d6ecda3624
Merge pull request #47 from pierre-dejoue/pragma-once
Replace header guards by pragma once
2022-05-09 10:08:46 +02:00
Pierre Dejoue
505f63d85c Pragma once and for all 2022-05-08 19:26:22 +02:00
Jan Niklas Hasse
54af704954
Merge pull request #46 from pierre-dejoue/testbed-autozoom
QoL: Add auto-zoom feature to the testbed app
2022-05-06 07:56:47 +02:00
AndriyAndreyev
563239da07 Add unittest to check stack overflow crash
Signed-off-by: AndriyAndreyev <andriy.a.andreyev@gmail.com>
2022-05-06 00:52:07 +03:00
AndriyAndreyev
afee3269fa Merge remote-tracking branch 'upstream/master' 2022-05-06 00:50:55 +03:00
Pierre Dejoue
abdf448d09 Testbed autozoom feature 2022-05-05 23:43:21 +02:00
Pierre Dejoue
36e5514890 Testbed usage note 2022-05-05 23:37:48 +02:00
Pierre Dejoue
39a5f477ea Testbed: global config variable to set the window size 2022-05-05 23:35:55 +02:00
Pierre Dejoue
bdd6e3b29b Add to the testbed report the result of the Delaunay test 2022-05-05 19:19:27 +02:00
Jan Niklas Hasse
dbc52ace16
Merge pull request #42 from pierre-dejoue/dllexport
Rework on dllexport/dllimport definitions
2022-05-05 18:25:29 +02:00
AndriyAndreyev
15dfbc284a Merge remote-tracking branch 'upstream/master' 2022-05-05 01:11:12 +03:00
Jan Niklas Hasse
a8247ae387
Merge pull request #44 from pierre-dejoue/test-case-issue-10
Test polygons from issue #10
2022-05-03 08:57:24 +02:00
Pierre Dejoue
de70670221 Test polygons from issue #10 2022-05-02 09:35:51 +02:00
AndriyAndreyev
1bf8fad5a2 Add test case to check stack overflow crash
Without additional check is angle negative or not in the LargeHole_DontFill
function this test case leads to stack overflow.

Signed-off-by: AndriyAndreyev <andriy.a.andreyev@gmail.com>
2022-04-26 21:46:10 +03:00
AndriyAndreyev
64636de5af Сonsider that LargeHole_DontFill is true if angle is negative
Otherwise, a wrong triangle can be generated

Signed-off-by: AndriyAndreyev <andriy.a.andreyev@gmail.com>
2022-04-26 21:46:10 +03:00
Pierre Dejoue
49a12eb378 Set the API export symbols based on CMake BUILD_SHARED_LIBS
By default poly2tri is built as a static library.
2022-04-23 14:20:20 +02:00
Pierre Dejoue
7f5846b72d Retakes on dllexport/dllimport 2022-04-20 21:52:16 +02:00
Clifford Yapp
ad184c3810 Add dllexport/dllimport definitions. 2022-04-17 13:41:01 +02:00
Jan Niklas Hasse
3380f5c805 Apply even more clang-tidy fixes 2022-03-25 10:49:45 +01:00
Jan Niklas Hasse
dcdb7442a4 Apply several clang-tidy fixes 2022-03-25 09:56:30 +01:00
Jan Niklas Hasse
529470f1d0
Merge pull request #40 from roystgnr/no_collinearity_tolerance
Disable collinearity tolerance
2022-03-23 21:34:31 +01:00
Roy Stogner
30279f701c Use std::fpclassify for double==0 tests 2022-03-16 08:35:34 -05:00
Roy Stogner
19ec7c78a1 ConcaveBoundaryTest unit test
This is from the case I originally got to trigger the problem.  We could
probably boil it down to something smaller (by temporarily reverting the
Orient2d change to make sure the failure still occurs) but this doesn't
seem too bloated for a unit test as-is.
2022-03-15 20:37:14 -05:00
Roy Stogner
cc1e657107 NarrowQuadTest triangulation succeeds now 2022-03-15 20:36:53 -05:00
Roy Stogner
57b3039c05 Disable tolerance in Orient2d collinearity test
This fixes failures for me when trying to triangulate
concave-by-less-than-epsilon boundary polylines.
2022-03-15 19:16:40 -05:00
Jan Niklas Hasse
8b5fa15800
Merge pull request #34 from roystgnr/instructions_update
File naming, build/run instruction updates
2021-12-02 15:46:35 +01:00
Roy Stogner
4581f1fee8 Consistent executable path in README.md
These commands run (from the source directory; would commands as run
from the build directory be clearer?) for me as-is (after the testbed
executable has been built) now.
2021-12-01 17:38:53 -06:00
Roy Stogner
4fd0287f04 Fix, clarify build instructions
If we're in a build subdirectory, we need `..` to tell cmake where to
find the source directory.
2021-12-01 17:38:23 -06:00
Roy Stogner
cbc025a649 Note unit test dependencies
I already had most of Boost installed, but not enough.
2021-12-01 17:37:18 -06:00
Roy Stogner
ebf0c4d987 Rename testbed/testbed to testbed/p2t
That's what README.md has been referencing as the executable name, and
it's more meaningful.
2021-12-01 17:36:31 -06:00
Jan Niklas Hasse
136fa7acfc Move Point ctor into .cc file to hide shadowing from users
See #15 and #31.
2021-08-21 17:28:47 +02:00
Jan Niklas Hasse
7f0487a811
Merge pull request #29 from piotrkania-here/sanity_checks
Additional sanity checks for triangulate operation
2021-05-18 10:24:21 +02:00
Piotr Kania
905a765c0f Additional sanity checks for triangulate operation 2021-04-29 11:51:05 +02:00
Jan Niklas Hasse
4a323bf6d5
Merge pull request #28 from piotrkania-here/check_ptr
Check pointer before dereferencing it
2021-04-26 17:02:23 +02:00
Piotr Kania
af36bac4db Check pointer before dereferencing it 2021-04-26 10:25:12 +02:00
Jan Niklas Hasse
444ee57d87
Merge pull request #27 from piotrkania-here/fixed_point_operator
Fixed inequality operator for Point struct
2021-04-24 11:11:52 +02:00
Piotr Kania
b4534b3f97 Fixed inequality operator for Point struct 2021-04-23 14:32:39 +02:00
Jan Niklas Hasse
d949f3cd6f Add namespace comment 2021-01-16 18:43:00 +01:00
Jan Niklas Hasse
8b8e6cb249 Ignore .cache/ 2020-12-17 23:13:20 +01:00
Jan Niklas Hasse
4515f65f5b
Merge pull request #23 from pierre-dejoue/master
Improvement to the testbed application
2020-11-20 11:38:31 +01:00
Pierre Dejoue
8388a74a9f Improve testbed data file format
Data file format now has optional sections for holes polylines
and Steiner points identified with tokens "HOLE" and "STEINER".

Rework the data file dude.dat accordingly.

Add data file steiner.dat for an example with Steiner points.
2020-11-20 11:37:52 +01:00
Pierre Dejoue
cf5f95d4e9 Fix compilation warnings in testbed 2020-11-11 22:51:05 +01:00
Jan Niklas Hasse
83680d96bb Remove Waf build system, fix #14 2020-11-06 22:37:50 +00:00
Jan Niklas Hasse
e9938d9c68
Merge pull request #22 from pierre-dejoue/master
Add documentation and code patches for maintenability
2020-10-26 20:18:51 +00:00
Pierre Dejoue
718d687bae Add references section to README
The flipscan picture by Thomas Ahlen was found on those pages:
https://blackflux.wordpress.com/2014/03/01/meshing-in-voxel-engines-part-2/
https://groups.google.com/g/poly2tri/c/LNfxMtVyhqs
2020-10-26 20:58:49 +01:00
Pierre Dejoue
1054475eeb Triangle::NeighborAcross to return a pointer
Same as Triangle::NeighborCW and Triangle::NeighborCCW
2020-10-26 20:58:23 +01:00
Pierre Dejoue
35b2fa916a Patch inversion of head and tail in the advancing front initialization
No functional impact, the code is equivalent. We just assign
head_ to af_head_ and tail_ to af_tail_ as one would expect.
2020-10-26 12:07:45 +01:00
Pierre Dejoue
5aa0c22365 Add headers in project files generated by cmake 2020-10-26 12:07:44 +01:00