Skip to content

Conversation

@afabri
Copy link
Member

@afabri afabri commented Sep 18, 2025

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

@afabri afabri changed the title Stream support epeck gf Stream support: Fix for Epeck Sep 18, 2025
@afabri afabri requested a review from MaelRL September 18, 2025 08:22
@afabri afabri self-assigned this Sep 18, 2025
@afabri afabri added this to the 6.2-beta milestone Sep 18, 2025
@afabri afabri changed the base branch from master to main September 18, 2025 08:23
@MaelRL
Copy link
Member

MaelRL commented Sep 18, 2025

This is related to #7874.

There we said:

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.

Here that would mean adding the point map parameter to the named parameters of write_polygon_soup() rather than CGAL::to_double() + approximate_sqrt calls.

@afabri
Copy link
Member Author

afabri commented Sep 19, 2025

And with vertex you mean the index in the range of points.

@MaelRL
Copy link
Member

MaelRL commented Sep 19, 2025

Yes, here it's the point range's point map (like in Point_set_3 / Point_set_processing_3, etc.) whereas for the other PR, it's a vertex point map

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@github-actions
Copy link

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9072/v0/Manual/index.html

@MaelRL MaelRL added the TODO label Oct 9, 2025
@sloriot
Copy link
Member

sloriot commented Oct 17, 2025

Successfully tested in CGAL-6.2-Ic-20

@github-actions github-actions bot removed the Tested label Oct 21, 2025
@github-actions

This comment was marked as outdated.

Copy link
Member Author

@afabri afabri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes

@sloriot sloriot mentioned this pull request Oct 30, 2025
1 task
sloriot added a commit that referenced this pull request Nov 13, 2025
## 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
#7327
* License and copyright ownership:  unchanged
* upcoming integration, update #9072 and test it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

write_polygon_soup() fails to compile with EPEC Kernel

5 participants