Commit Graph
1042 Commits
Author SHA1 Message Date
Sebastien Loriot f60daf05e4 Mesh_2: fix degenerate cases (#9290)
## Summary of Changes

This PR fixes the error reported in issue #781. The main two changes
are:

- in `Refine_edges.h`: allow the refinement point of a constrained edge
to be an existing close encroaching vertex,
- in `Refine_faces.h`: skip tiny bad faces when their bbox are smaller
than a few ulp.

## Release Management

* Affected package(s): Triangulation_2, Mesh_2
* Issue(s) solved (if any): fix #781
* Feature/Small Feature (if any):
* Link to compiled documentation (obligatory for small feature) [*wrong
link name to be changed*](httpssss://wrong_URL_to_be_changed/Manual/Pkg)
* License and copyright ownership: maintenance by GeometryFactory, now
copyright change
2026-02-12 15:01:59 +01:00
Andreas Fabri aad557cf69 Add overload of read_OBJ() 2026-02-02 15:12:34 +00:00
Mael Rouxel-Labbé 92a58dfe25 Add .obj polyline reading to CGALlab 2026-02-02 14:46:08 +00:00
Laurent Rineau 75dd678a35 new API for make_color_guards 2026-01-29 16:31:39 +01:00
Laurent Rineau eff3b1b315 fix nested color guards 2026-01-29 15:18:56 +01:00
Laurent Rineau 313bcf6b1c use variadic templates for multiple colors 2026-01-29 15:18:21 +01:00
Laurent Rineau dafcd62608 fix included headers 2026-01-21 10:42:41 +01:00
Laurent Rineau 4b1a7d5871 fix merge conflicts with cgal/main 2026-01-12 17:39:39 +01:00
Laurent Rineau 860001f6f1 apply suggestions 2026-01-12 17:37:23 +01:00
Sébastien Loriot b9916cbb58 Merge remote-tracking branch 'cgal/6.1.x-branch' into 'cgal/main' 2026-01-09 15:53:29 +01:00
Sébastien Loriot 08b27d3db1 Merge remote-tracking branch 'cgal/6.0.x-branch' into 'cgal/6.1.x-branch' 2026-01-09 15:51:04 +01:00
Sebastien Loriot 237f7500e9 Fix various typos in comments, documentation, and internal variables (#9230)
## Summary of Changes

This PR fixes various typos across multiple packages. The changes
include:
* **Variable Names:** Corrected local variable names (e.g.,
`list_lenght` → `list_length`, `inital_nb_pts` → `initial_nb_pts`) in
CMake scripts and C++ headers.
* **Header Guards:** Fixed a typo in the header guard for
`Edge_length_cost.h` to match the filename.
* **Documentation & Comments:** Fixed spelling errors in comments,
string literals, and documentation files (e.g., `dimensionnal` →
`dimensional`, `explicitelty` → `explicitly`).

## Release Management

* Affected package(s): Installation, Point_set_3,
Polygon_mesh_processing, Surface_mesh_simplification, SMDS_3,
STL_Extension, Stream_support, TDS_2, Triangulation_2, Triangulation_3
* Issue(s) solved (if any):
* Feature/Small Feature (if any):
* Link to compiled documentation (obligatory for small feature):
* License and copyright ownership:
2026-01-09 15:39:35 +01:00
Andreas Fabri 70d463b13a Fix Stream_support 2026-01-08 08:45:57 +00:00
albert-github c834c61cdc Incorrect preprocessor directive
The preprocessor directive is misspelled and will normally not be used, corrected.
2026-01-06 17:18:13 +01:00
Laurent Rineau 70522b3b6e Fix doubled word typos in various header and documentation files (#9220)
## Summary of Changes

Fixed common doubled word typos (e.g., "to to", "of of") in comments and
documentation strings across various packages. These changes are purely
cosmetic and do not affect code logic.

## Release Management

Affected package(s): Algebraic_foundations, Algebraic_kernel_d,
Arrangement_on_surface_2, BGL, Bounding_volumes, Convex_hull_2,
Kernel_23, Minkowski_sum_2, Nef_3, Orthtree, Polygon_mesh_processing,
Polyhedron, Polytope_distance_d, Spatial_searching, Stream_support,
TDS_3.

Issue(s) solved (if any):

Feature/Small Feature (if any):

Link to compiled documentation:

License and copyright ownership: I agree to the transfer of the license
and copyright of my contribution to the CGAL project.
2026-01-06 11:33:27 +01:00
Attaullah Ansari 9dd424409b Fix typos in comments, documentation, and strings 2026-01-04 18:04:10 +05:30
SOUHARDYA TOLA f103593626 Fix doubled word typos in documentation and comments 2025-12-31 15:40:29 +00:00
Sébastien Loriot 6c61eab9b3 Merge remote-tracking branch 'cgal/main' into 'afabri/Stream_support-test_VTK-GF' 2025-12-29 17:13:36 +01:00
Sebastien Loriot 62a006b736 Fix writing 64 bits integer into PLY files (#9175)
## Summary of Changes

The PLY file format does not support 64 bits (signed/unsigned) integers.

In the overload of the writer specific to `Surface_mesh`, we try to
write all property maps with value types compatible with the PLY file
format (char, uchar, etc.).

We also tolerate 64 bits signed / unsigned integers, but used to cast it
to int32 / uint32:

```cpp
    {
      Int64_map pmap;
      boost::tie(pmap, okay) = sm.template property_map<Simplex,boost::int64_t>(prop[i]);
      if(okay)
      {
        os << "property int " << name << std::endl;
        printers.push_back(new internal::Simple_property_printer<Simplex,Int64_map,boost::int32_t>(pmap));
        continue;
      }
    }
```

In https://github.com/CGAL/cgal/pull/6575, the code was factorized, but
the conversion to 32 bits was accidentally lost
(https://github.com/CGAL/cgal/commit/aa9f5215c4afa79d29cc5491d1d690cd2ed7a142).
Hence, we were writing 8 bytes values (while announcing 4 bytes values)
and writing a property map with value type a 64 bits integers (or a
range of 64 bits integers) would make the file unreadable.

The PR re-introduces the conversions, and also removes the recursion of
the function.

The bug is from CGAL 5.5, but we have recent changes to PLY I/O
introducing named parameters and whatnot that make it a little tedious
to backport so I will wait to see if there is a need.

## Release Management

* Affected package(s): `Surface_mesh`
* Issue(s) solved (if any): -
* Feature/Small Feature (if any): -
* License and copyright ownership: no change
2025-12-26 12:10:15 +01:00
Sébastien Loriot 69d6cdd151 Merge remote-tracking branch 'cgal/6.1.x-branch' into 'cgal/main' 2025-12-19 17:37:15 +01:00
Laurent Rineau 332cc960e9 add missing inline keywords in 6.1.x-branch 2025-12-18 16:19:26 +01:00
Mael Rouxel-Labbé 6edac17fd3 Fix a warning
/mnt/testsuite/include/CGAL/IO/PLY/PLY_writer.h:296:30: warning:
loop variable 'v' of type 'const unsigned int&' binds to a temporary
constructed from type 'const long unsigned int' [-Wrange-loop-construct]
  296 |       for(const ElementType& v : vec)

This is because ElementType is not the value type of the vector,
but the data type that we write, and for 64 bits integer,
we convert to 32 bits. So in that case, we can't cast yet.
2025-12-17 12:33:40 +01:00
Andreas Fabri a2e8b67fa4 fix macro name 2025-12-15 10:55:53 +00:00
Andreas Fabri 1bb2a2b20f Stream_support: const& for write_WKT() 2025-12-10 12:09:21 +00:00
albert-github 323a7cd09d Spelling correction
Spelling correction
2025-12-03 12:20:10 +01:00
Sebastien Loriot be305f320f [Small Feature] VTK IO support for Linear_cell_complex (#8998)
## Summary

This small feature adds the ability to read and write `.vtk` files
(legacy ASCII)
for 3D Linear_cell_complex (dimension 3, ambient dimension 3). 

It supports per-vertex and per-volume scalar fields and handles various
VTK cell types.

## Motivation

Enable import/export of mesh structures and scalar fields between CGAL
and VTK-based visualization tools
(ParaView, VisIt, etc.). Simplifies debugging and integration into
scientific pipelines.

## API Changes

- New functions in `Linear_cell_complex_vtk_io.h`:
  - `read_lcc_from_vtk()`
  - `write_lcc_to_vtk()`

Header-only implementation, no external dependency.

## Included

- Full implementation in `Linear_cell_complex_vtk_io.h` (merged `.impl`)
- Minimal example with `.3map` and `.vtk` files
- Unit test with scalar field preservation and structure comparison

## Maintainers

Feel free to suggest naming adjustments or style corrections. The
feature is scoped cleanly and does not affect other packages.


* Feature/Small Feature (if any):
[Read_write_vtk_for_LCC](https://cgalwiki.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Read_write_vtk_for_LCC)
2025-12-03 11:50:01 +01:00
Laurent Rineau 88fea191ec Merge remote-tracking branch 'cgal/main' into Stream_support-color_and_indenting_streams-lrineau
# Conflicts:
#	Installation/CHANGES.md
2025-11-26 10:07:04 +01:00
Andreas Fabri 92a896abb9 Fix anchor 2025-11-25 16:39:10 +00:00
Laurent Rineau 2d1da34beb fix getenv_s for Windows 2025-11-25 16:29:43 +01:00
Andreas Fabri 1b3556184a Fix warning in read_las_points.h 2025-11-25 07:35:10 +00:00
Andreas Fabri 884e9fc4ee Document a @param 2025-11-20 14:02:31 +00:00
Andreas Fabri cee9effe09 Document a @param 2025-11-20 13:56:43 +00:00
Andreas Fabri 970f16913b Merge remote-tracking branch 'cgal/main' into Point_set-reduce_dependencies-GF 2025-11-20 10:14:49 +00:00
Sebastien Loriot bf25dd27b8 Stream support: Fix for Epeck (#9072)
## Summary of Changes

For file formats that expect floating point coordinates we convert on
the fly so that `CGAL::io::write_polygon_soup()` also works for polygon
soups with ` FT` which are non-float/double, e.g.
`Exact_predicates_exact_constructions_kernel`.
Additionally, we document the named parameter `point_map` as it was
missing.

## Release Management

* Affected package(s): Stream_support
* Issue(s) solved (if any): fix #9071
* License and copyright ownership: unchanged 
* upon integration update and test #9109
2025-11-20 10:27:33 +01:00
Sébastien Loriot f98d968ed0 Merge remote-tracking branch 'cgal/6.1.x-branch' into 'cgal/main' 2025-11-19 14:46:33 +01:00
Sébastien Loriot 9bd1705bf8 Merge remote-tracking branch 'cgal/6.0.x-branch' into 'cgal/6.1.x-branch' 2025-11-19 14:45:21 +01:00
Andreas Fabri 1dc39039e9 merge cgal/main 2025-11-13 08:48:43 +00:00
Sebastien Loriot 1673cd0f9e Fix OBJ loader crashing the demo on reading failure (#9128)
## Release Management

* Affected package(s): `Lab`
* Issue(s) solved (if any): a few entries in #6690 
* Feature/Small Feature (if any): n/a
* License and copyright ownership: no change
2025-11-13 09:40:07 +01:00
Sebastien Loriot dfc5fb5065 IO: write_PLY() for Epeck (#7874)
## Summary of Changes

As reported in #7868 the function `CGAL::IO::write_PLY()` used in binary
mode does not correctly write the coordinates if the points are from a
kernel with exact constructions.
~~This PR applies `to_double()" to the coordinates.~~

~~After a discussion with @MaelRL we decided that the user is in charge
to pass a `vertex_point_map` as named parameter that does the
conversion. This is straightforward as we offer the
[`Cartesian_converter_property_map`](https://doc.cgal.org/latest/Property_map/structCGAL_1_1Cartesian__converter__property__map.html).~~

Moving back to the previous proposal: hardcode some to_double and
to_float casts such that we meet the requirements of the file format,
whatever the input.

As the problem is the same for the vertex normals we add a named
parameter `vertex_normal_map`.

### Todo
- [x] Fix the generic function `write_polygon_mesh()`. Currently it is
fixed for `Surface_mesh`

## Release Management

* Affected package(s): Stream_support
* Issue(s) solved (if any): fix #7868 and fix
https://github.com/CGAL/cgal/issues/7327
* License and copyright ownership:  unchanged
* upcoming integration, update #9072 and test it
2025-11-13 09:38:55 +01:00
Laurent Rineau 77bac5866b address Andreas' comment about the using-declaration 2025-11-12 15:51:28 +01:00
Mael Rouxel-Labbé 333a15584f Handle (invalid) zero vertex index in face 2025-11-07 22:02:20 +01:00
Mael Rouxel-Labbé 3ef43324bb Fix bad 'if' condition & warning 2025-11-07 17:05:21 +01:00
Guillaume Damiand 6f2c3d819e Merge branch 'main' into Small_feature/read_write_vtk_for_LCC 2025-11-06 09:38:10 +01:00
Laurent Rineau 175b7b9241 Merge branch 'main' into Stream_support-color_and_indenting_streams-lrineau 2025-11-05 09:32:07 +01:00
Laurent Rineau e74cd68cfb add backticks 2025-11-05 09:14:11 +01:00
Andreas Fabri 25844edf50 examples/tests/demo 2025-10-31 16:47:53 +01:00
Andreas Fabri 6bd5ec4f8b Move guards in low level file 2025-10-31 13:08:07 +01:00
Andreas Fabri eaa25c500b fix CI 2025-10-31 12:39:55 +01:00
Andreas Fabri 64e33bd6cb fix links 2025-10-31 12:25:24 +01:00
Andreas Fabri f28e643ed0 move read_points.h 2025-10-31 10:54:27 +01:00