Commit Graph

160 Commits

Author SHA1 Message Date
Laurent Rineau d46d51d08e partial fix for Thingi 243014 2024-01-30 22:54:33 +01:00
Laurent Rineau e8f6b60350 Add debug_missing_region() at runtime 2024-01-30 14:51:38 +01:00
Laurent Rineau d6ac147b4d cosmetic renaming of a parameter (during code review with Jane)
plus use of `tr.vertices(Edge)` instead of home-made function.
2024-01-30 14:50:32 +01:00
Laurent Rineau 3cfa54ce1a proper class encapsulation for CDT_vb_3 2024-01-30 14:50:24 +01:00
Laurent Rineau bbc45c01fa rename to polygon_border_vertices 2024-01-29 09:34:31 +01:00
Laurent Rineau a5cf779795 debug debugging of missing faces from cavities 2024-01-26 16:36:31 +01:00
Laurent Rineau 37c5f131ac add an cmdline option to debug Steiner points
That replaces debug macros.
2024-01-26 16:35:52 +01:00
Laurent Rineau f753446633 oformat(x, tag) passed the tag value to the Output_rep
That allows to pass an integral offset to the displayed time stamps.

The goal is to set it to -1, to display vertices IDs that are identical to the input vertices indices of `the Surface_mesh`.
2024-01-15 09:45:25 +01:00
Laurent Rineau c6ac1e890d Add timestamps to base classes 2024-01-14 20:40:30 +01:00
Laurent Rineau f422541cb8 faster visitor implementation during the conforming 2024-01-09 17:26:20 +01:00
Laurent Rineau de6c5f2895 change the loop pattern when there are PLC errors
That gave a direct improvement for the four PLC error case from Thingi:

```
            name status       time     error new status   new time new error
Thingi10K_104400 FAILED   1.710520 PLC_error     FAILED   1.243950 PLC_error
Thingi10K_162100 FAILED   1.970900 PLC_error     passed   1.018690
Thingi10K_285604 FAILED  13.096400 PLC_error     FAILED   4.543940 PLC_error
Thingi10K_464846 FAILED 321.774000 PLC_error     FAILED  16.658500 PLC_error
```

One case `Thingi10K_162100` passed. And the other three got runtime
improvement before they reach the error.
2024-01-05 16:59:55 +01:00
Laurent Rineau c25f443368 fix a regression in speed 2024-01-04 18:17:31 +01:00
Laurent Rineau 7d9e84e685 dump region in case of a fatal PLC error 2024-01-04 14:49:31 +01:00
Laurent Rineau 87f6a352d1 factorize a lambda function 2024-01-04 14:47:45 +01:00
Laurent Rineau 62e3e8dc12 port back to C++17
The lack of `std::set::contains` is a real pain! Using `count()`
instead reduces the readability of the code.
2023-12-13 16:56:03 +01:00
Laurent Rineau 0b9133fba3 reduce timings in cases of PLC errors 2023-12-13 14:57:27 +01:00
Laurent Rineau 3f42717b5a remove a spurious assertion 2023-12-08 16:05:07 +01:00
Laurent Rineau 934e65cd35 fix the assertion `v->nb_of_incident_constraints < 0` 2023-12-07 11:33:55 +01:00
Laurent Rineau 0c8697168f detect small distances 2023-12-05 13:20:46 +01:00
Laurent Rineau 223454ab57 Merge remote-tracking branch 'cgal/master' into Triangulation_3-CDT_3-lrineau 2023-11-16 16:01:01 +01:00
Laurent Rineau 5a5a5618f8 [_, inserter] = set.insert... Use .second instead
That addresses a TODO from Jane's review.
2023-11-16 11:40:42 +01:00
Laurent Rineau bbf2e8da31 simplify those lines 2023-11-16 11:38:29 +01:00
Laurent Rineau a31fed66f1 construct_cavities: turn into vectors 2023-11-16 11:35:05 +01:00
Laurent Rineau 446d842586 insert_in_CDT_3: mirror facets directly
Facets are pushed directly as mirror facets, on the border of the cavity
so that they are seen from the exterior of the cavity.

That avoids a copy of a vector of facets.
2023-11-16 11:26:13 +01:00
Laurent Rineau 06e630287b another fix
Now it seems to work!
2023-11-16 10:32:14 +01:00
Laurent Rineau 1f75f30ab2 WIP: more fix 2023-11-16 10:32:14 +01:00
Laurent Rineau cc98a40424 WIP : fix 2023-11-16 10:32:14 +01:00
Laurent Rineau c9540b13c5 WIP: add insert_in_cdt_3 2023-11-16 10:32:14 +01:00
Laurent Rineau 4f50a45374 Extract inner_map_of_cavity to a member function 2023-11-16 10:32:14 +01:00
Laurent Rineau 569aeb33f4 fix a bug?
The code review found that as a bug, but it never showed.
2023-11-16 10:32:14 +01:00
Laurent Rineau 16171923c7 extract the lambda register_facet_to_be_constrained
to a member function
2023-11-16 10:32:14 +01:00
Laurent Rineau dc95d1ac59 fix typos (detected by spell-checker) 2023-11-16 10:32:14 +01:00
Laurent Rineau f46654ef8c more a function
Now the two functions are adjacent:
- `try_to_insert_circumcenter_in_face_or_return_encroached_edge` and
- `insert_mid_point_in_constrained_edge`
2023-11-09 19:39:47 +01:00
Laurent Rineau 255178644d `inner_map_of_cavity` uses `this` as const and nothing else
That means it could be replaced by a const member function
2023-11-09 19:38:46 +01:00
Laurent Rineau d1c513ac0d result of the review with Jane 2023-11-09 19:38:01 +01:00
Laurent Rineau 92aabb00ad use std::invoke (C++17) for IILE
*Immediately Invoked Lambda Expression*

Now that CGAL can use C++17 , switch to `std::invoke`
that is more readable that the two small characters `()`
hidden somewhere a few lines below.

With `std::invoke`, we understand straight away that the lambda is
called immediately.

Ref:

https://www.cppstories.com/2016/11/iife-for-complex-initialization/
2023-11-09 19:36:53 +01:00
Laurent Rineau 5997b70327 `triangulate_cavity` is a fct without side effect
(but the debug outputs)
2023-11-08 16:39:56 +01:00
Laurent Rineau 4d7a2fee64 Extract map_cavity_vertices_to_ambient_vertices
- make it const,
 - and simplify the reuse of the API.
2023-11-08 15:52:20 +01:00
Laurent Rineau eb1ab88c04 Adapt triangulate_cavity
that will allows its reuse by the function `insert(Point)`
2023-10-24 11:39:58 +02:00
Laurent Rineau afce4db325 commit more debug code 2023-10-17 18:06:18 +02:00
Laurent Rineau 0186e9add9 add another option
this one is to dump the input surface with the extra Steiner points
of the conforming.

And add a --help option as well.
2023-10-17 16:05:35 +02:00
Laurent Rineau 4380273203 fix the number of added vertices in a cavity 2023-10-13 16:50:30 +02:00
Laurent Rineau d1e76c2099 fix typo 2023-10-13 16:48:48 +02:00
Laurent Rineau 265d3ba8fe reimplement brute_force_border_3_of_region 2023-10-04 16:16:33 +02:00
Laurent Rineau 634992dc9b Replace ERROR by NOTE because those were not errors 2023-10-02 11:46:10 +02:00
Laurent Rineau 2d87d4172d fix code when CGAL_NDEBUG or NDEBUG is defined 2023-09-26 15:34:17 +02:00
Laurent Rineau a1ac93b529 fix a warning 2023-09-26 15:33:44 +02:00
Laurent Rineau 0cdb022027 fix a bug in dimension 2
There was a warning:
```
Triangulation_3/include/CGAL/Constrained_Delaunay_triangulation_3.h:1841:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
[build]  1841 |     } // dim 2
[build]       |     ^
```
and for once that was a warning about a real bug!
2023-09-26 12:50:56 +02:00
Laurent Rineau 5bc5ec4f46 fix cheese18 --merge-facets
The explanation of the bug:
`split_graph_into_polylines` can reverse the orientation of a polygon
2023-09-25 17:58:03 +02:00
Laurent Rineau 188f99ff97 code to detriangulate facets 2023-09-13 09:25:04 +02:00