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

Polyhedron demo : C3t3 binary I/O do not deal with complex edges #4583

Closed
janetournois opened this issue Mar 18, 2020 · 2 comments
Closed

Polyhedron demo : C3t3 binary I/O do not deal with complex edges #4583

janetournois opened this issue Mar 18, 2020 · 2 comments

Comments

@janetournois
Copy link
Member

Issue Details

I am facing the following issue :

  • generate a tetrahedral mesh with Mesh_3 in the demo, and save the mesh with the binary file format *.binary.cgal.
  • load the file, and run the code below on the C3t3
  • the output file is empty, complex edges have not been loaded (or not saved?)

@lrineau did you notice that already?
@maxGimeno can you please take a look while you are working on I/Os?

Source Code

    template<typename C3T3>
    void dump_edges_in_complex(const C3T3& c3t3, const char* filename)
    {
      typename C3T3::Triangulation::Geom_traits::Construct_point_3 pt =
         c3t3.triangulation().geom_traits().construct_point_3_object();

      std::ofstream ofs(filename);
      ofs.precision(17);
      for (typename C3T3::Edges_in_complex_iterator eit = c3t3.edges_in_complex_begin();
        eit != c3t3.edges_in_complex_end(); ++eit)
      {
        const typename C3T3::Edge& e = *eit;
        ofs << "2 "
          << point(e.first->vertex(e.second)->point()) << " "
          << point(e.first->vertex(e.third)->point()) << "\n";
      }
      ofs.close();
    }

Environment

  • Operating system (Windows/Mac/Linux, 32/64 bits): Windows 64 bits
  • Compiler: msvc 2019
  • Release or debug mode: both
  • CGAL version: master
@janetournois janetournois changed the title Polyhedron demo : C3t3 binary IO does not deal with complex edges Polyhedron demo : C3t3 binary I/O do not deal with complex edges Mar 18, 2020
@maxGimeno
Copy link
Contributor

I guess it is related to this PR : #3850

@janetournois
Copy link
Member Author

Right! Actually it is the same issue as #2359
I hope it is fixed soon :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants