Skip to content

Triangulation_23: Enhance IO#3850

Closed
maxGimeno wants to merge 19 commits intoCGAL:masterfrom
maxGimeno:Triangulation_23-Enhance_IO-GF
Closed

Triangulation_23: Enhance IO#3850
maxGimeno wants to merge 19 commits intoCGAL:masterfrom
maxGimeno:Triangulation_23-Enhance_IO-GF

Conversation

@maxGimeno
Copy link
Copy Markdown
Contributor

@maxGimeno maxGimeno commented Apr 11, 2019

Summary of Changes

Add the possibility to use functions of the cell/face/vertex base, called read/write_data(), and that have access to the maps/vectors internal to the triangulation. This is used in the IO functions.

Release Management

…per vertex and cell, with access to the cells and vertices of the triangulation.
…a per vertex and cell, with access to the cells and vertices of the tds.
@maxGimeno
Copy link
Copy Markdown
Contributor Author

maxGimeno commented Apr 23, 2019

@sloriot @lrineau So I tried something to implement the edges in complex IO in .cgal format, but it requiered changing the signature of the Compact_mesh_cell_base_3, which changed the c3t3 type written in the header of the files. In concequences of which the demo is not able to read any of the existing "[.binary].cgal" files... I'd like thoughts on the matter.

@maxGimeno maxGimeno requested a review from lrineau April 23, 2019 12:00
@lrineau lrineau self-assigned this Jun 20, 2019
@lrineau lrineau added this to the 5.1-beta milestone Jun 20, 2019
@maxGimeno maxGimeno added the rm: not for next release Indicate to the release team that a PR should not be merged before the next release branch is forked label Jul 5, 2019
@maxGimeno
Copy link
Copy Markdown
Contributor Author

@sloriot @lrineau ping.
Should I remake all existing files (in tests and examples) to fit the new type or do you have a different solution to implement the edges in complex IO that does not require changing its type ? Or something about the IO that reads the type, anything ?

@lrineau lrineau removed the rm: not for next release Indicate to the release team that a PR should not be merged before the next release branch is forked label Nov 8, 2019
@sloriot
Copy link
Copy Markdown
Member

sloriot commented Mar 19, 2020

I'm a bit afraid that binary files are conflicting (for size reason). Were those files updated recently?

@maxGimeno
Copy link
Copy Markdown
Contributor Author

I did not touch this branch since april 19.

@lrineau
Copy link
Copy Markdown
Member

lrineau commented Mar 19, 2020

I'm a bit afraid that binary files are conflicting (for size reason). Were those files updated recently?

That is not really recently. The PR #4397 has changed the order of cells in a triangulation (given the sequence of points). That is why all the files have changed in master. I am surprised that this PR conflicts for the binary files, but not for the two corresponding ASCII files.

@maxGimeno
Copy link
Copy Markdown
Contributor Author

I have not yet cupdated all the c3t3 files in this branch, as I was waiting for an aswer to my question.

@maxGimeno
Copy link
Copy Markdown
Contributor Author

@maxGimeno maxGimeno added Tested and removed Tested labels Mar 31, 2020
@sloriot
Copy link
Copy Markdown
Member

sloriot commented Apr 2, 2020

Tested in CGAL-5.1-Ic-114

@sloriot
Copy link
Copy Markdown
Member

sloriot commented Apr 2, 2020

@lrineau are you done with your review?

@lrineau
Copy link
Copy Markdown
Member

lrineau commented Apr 2, 2020

@lrineau are you done with your review?

No, I have not reviewed the code, yet. And I will not probably do it soon.

From far, I do not really see how this PR solves #2359.

@maxGimeno
Copy link
Copy Markdown
Contributor Author

@lrineau are you done with your review?

No, I have not reviewed the code, yet. And I will not probably do it soon.

From far, I do not really see how this PR solves #2359.

Maybe I did not understand the issue then, as I thougt adding the edges in complex in the IO was the whole point.

@sloriot sloriot added the Not yet approved The feature or pull-request has not yet been approved. label Apr 6, 2020
@MaelRL
Copy link
Copy Markdown
Member

MaelRL commented Apr 16, 2020

@lrineau @maxGimeno Does this PR just get pushed to next release (that will deal with I/O of triangulations too anyway)?

@maxGimeno
Copy link
Copy Markdown
Contributor Author

I don't see why it should be delayed to next release, it already passed the testsuite once, and it is not a small feature. I'm just waiting for @lrineau to do his review to test it again and have it integrated. Unless he explains why it does not work or fix the issue, in which case everything will have to be re thought from the start.

Copy link
Copy Markdown
Member

@lrineau lrineau left a comment

Choose a reason for hiding this comment

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

I disagree strongly with the changes made to Mesh_3. Compact_mesh_cell_base gets that addition of six extra words, and two members functions set_curve_index/get_curve_index that are not in the concept MeshCellBase_3.

The first issue with that is:

  • information about edges are stored in each incident cells,
  • with the current code, the C3t3 implementation does not maintain the information.

More than ten years ago, I choose to implement the information about features edges
using a special map:

private:
// Type to store the edges:
// - a set of std::pair<Vertex_handle,Vertex_handle> (ordered at insertion)
// - which allows fast lookup from one Vertex_handle
// - each element of the set has an associated info (Curve_index) value
typedef boost::bimaps::bimap<
boost::bimaps::multiset_of<Vertex_handle>,
boost::bimaps::multiset_of<Vertex_handle>,
boost::bimaps::set_of_relation<>,
boost::bimaps::with_info<Curve_index> > Edge_map;

and I still think that is the good choice and should not be modified (the type of the map could be discussed and maybe optimized, but not the choice to store the information in a map of the c3t3 object).

So, correct I/O of C3t3 must serialize that map, and not modify the concept of MeshCellBase_3 and its models.

Maybe this PR should be split in two: one that solves the initial issue #861 (I/O of triangulations), and then another one about the I/O of C3t3 (#2359).

@sloriot
Copy link
Copy Markdown
Member

sloriot commented Aug 30, 2021

@maxGimeno is this replaced by #5145?

@maxGimeno
Copy link
Copy Markdown
Contributor Author

@maxGimeno is this replaced by #5145?

Not entirely, but if #5145 is dropped, then the second part of this PR is impossible to implement, IIRC

@lrineau
Copy link
Copy Markdown
Member

lrineau commented Aug 30, 2021

Replaced by #5145.

@lrineau lrineau closed this Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not yet approved The feature or pull-request has not yet been approved. Pkg::Triangulation_2 Pkg::Triangulation_3 Replaced

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mesh_3: Save/load c3t3 objects correctly I/O of Triangulation_2 or Triangulation_3, when the vertex or cell types have handles

4 participants