Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh_3/SMDS_3: Fix reading of .mesh files #7971

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

lrineau
Copy link
Member

@lrineau lrineau commented Jan 10, 2024

With a .mesh containing Triangles in a comment, like that one:

MeshVersionFormatted 1

Dimension
3

# Set of mesh vertices
Vertices
121
-10.0402  -10.0402  -10.0402    0
-10  10  10    0
10  10  10    0
[...]
# Set of Triangles
Triangles
609
   98     76     65    0
   98     81     76    0
   65     81     98    0
[...]
# Set of Tetrahedra
Tetrahedra
244
   81     65     76     98  0
   28      1     37     34  0
   69     25     70     94  0
[...]
End

then the code failed. It read Triangles in the second comment as the beginning of the triangles section.

This PR use std::getline() to read the comments and the keywords:

  • Vertices
  • Triangles
  • Tetrahedra

Release Management

  • Affected package(s): SMDS_3
  • License and copyright ownership: maintenance by GF

@lrineau lrineau added this to the 6.0-beta milestone Jan 10, 2024
@sloriot sloriot added Batch_2 Second Batch of PRs under testing Under Testing and removed Batch_2 Second Batch of PRs under testing labels Jan 10, 2024
@lrineau lrineau closed this Jan 11, 2024
With a `.mesh` containing `Triangles` in a comment, like that one:

```
MeshVersionFormatted 1

Dimension
3

Vertices
121
-10.0402  -10.0402  -10.0402    0
-10  10  10    0
10  10  10    0
[...]
Triangles
609
     98     76     65    0
     98     81     76    0
     65     81     98    0
Tetrahedra
244
     81     65     76     98  0
     28      1     37     34  0
     69     25     70     94  0
[...]
End
```

then the code failed. It read `Triangles` as the beginning of the triangles section.

The commit use `std::getline()` to read the comments and the keywords:
- `Vertices`
- `Triangles`
- `Tetrahedra`
@lrineau lrineau reopened this Jan 11, 2024
@lrineau lrineau changed the base branch from master to 5.6.x-branch January 11, 2024 10:37
@lrineau lrineau modified the milestones: 6.0-beta, 5.6.1 Jan 11, 2024
@lrineau
Copy link
Member Author

lrineau commented Jan 11, 2024

@sloriot This PR has been reimplemented, after a code-review session with Jane. It is also now based on 5.6.x-branch instead of master.

@afabri
Copy link
Member

afabri commented Jan 19, 2024

Seems to fail in this testsuite

@lrineau
Copy link
Member Author

lrineau commented Jan 19, 2024

Seems to fail in this testsuite

A stupid bug, fixed in 885647f.

@sloriot
Copy link
Member

sloriot commented Jan 24, 2024

Successfully tested in CGAL-6.0-Ic-156

@lrineau lrineau self-assigned this Jan 24, 2024
@lrineau lrineau added rm only: ready for master For the release team only: that indicates that a PR is about to be merged in 'master' rm only: ready for release branch For the release team only: that indicates that a PR is about to be merged in a release branch labels Jan 24, 2024
@lrineau lrineau merged commit f7b4ecd into CGAL:5.6.x-branch Jan 24, 2024
8 checks passed
lrineau added a commit that referenced this pull request Jan 24, 2024
Mesh_3/SMDS_3: Fix reading of .mesh files
@lrineau lrineau removed rm only: ready for master For the release team only: that indicates that a PR is about to be merged in 'master' rm only: ready for release branch For the release team only: that indicates that a PR is about to be merged in a release branch labels Jan 24, 2024
@lrineau lrineau deleted the SMDS_3-fix_read_MEDIT-GF branch January 24, 2024 15:21
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.

3 participants