Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Cannot read my data file in off format

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Cannot read my data file in off format


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Cannot read my data file in off format
  • Date: Thu, 12 Sep 2019 22:26:38 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:Se2bLRzGIDp1lsjXCy+O+j09IxM/srCxBDY+r6Qd0uoTIvad9pjvdHbS+e9qxAeQG9mCsLQc1qGP7/+oGTRZp8rY6jZaKN0EfiRGoP1epxYnDs+BBB+zB9/RRAt+Iv5/UkR49WqwK0lfFZW2TVTTpnqv8WxaQU2nZkJ6KevvB4Hdkdm82fys9J3PeQVIgye2ba9vIBmsogjdq8cbjZF+JqsxxRfFv3RFduZLzm9sOV6fggzw68it8JJ96Shcp+4t+8tdWqjmYqo0SqBVAi47OG4v/s3rshfDTQqL5nQCV2gdjwRFDQvY4hzkR5n9qiT1uPZz1ymcJs32UKs7WS++4KdxSR/nkzkIOjgk+2zKkMNwjaZboBW8pxxjxoPffY+YOOZicq7bYNgXQ3dKUMRMWCxbGo6ycpUBD+QBM+hboYfyqVQBohmiCgejH+7v1jxFi2Xq0aEm3eksEwfL1xEgEdIUt3TUqc34OKkPX++r16bH1y7Db+9X2Tjj7ojDbxYvofaWXbJxdsrR1VQkGwfEgFqOrozlOi2a1vgXs2mb7+RvT/6gi3IgqwFrojmjw8kggZTOi4IOzlDE8j95wIcyJd2kUkJ7ZNqkHYBftyGfLYR2Q8ciT3t0tyY9z70LoJi2dzUExpQgwh7Qcf2Hc46Q7xLlTumeOix3hHZ7d76lmxmy9k2gxvXzVsmz11ZKoS5FncfWun8R0BzT79CLSvp7/ke72DaAzRrf6u9eIUwsmqrbKoIhwr4tlpUIq0jMAij2mEDwgaSLdUsk4vCl5/r7brjivJORNI95hhvgPqgwh8CzG+s1PhYWU2SF4+uwyKDv8EjnT7hEgfA7l7fWsJ7bKMsHo6O1HgBY3Z0/5xu6Dzqr0NUVkHgCIV9HZh6KjozkNlTUL/zkDvqznlGhkDlqyv3HOLDqH4/DIWLZkLj7eLZw805cxxQ3zdBY/59UD6sOIPP3WkPout3YFAI1PxW6w+voFtlxzIweWWWIAq+WNKPdr0WE6f4oI+mJfIMVuTD9JOY55/P2k3M1hVsQcbOq0JYXcny0AOpqL1iDbXfjnNsNCWIKsRA/TOzuhl2CSzlTZ3OqUqIn4jE7D5imDYbERoCxmrCB2SO7E4ZZZmBDEF+MEHPoe5+YVPcLbSKeOtVhnSAcVbi9V48h0gmjuxP1y7V9KurY4zAXtZP41Ndp+u3Tjgoy+CdvD8Wd1mGNV3t7knkJRz8wxqB/oFZyxk2N0ahi0LRlE8dO7aZJThsiLsybiPdrDsj7HAPHZNaADli8Bc63BCk4CdM3zdhJaEl0H5CujwvIwjGxUIMSwreEDZhx/qPH1GXqPO58zWzH3e8vlQoIWMxKYCedi6R27BTSCoiBt0KDlqG2PeQz0SnI+XuZ3ESHt11fSh8xG+2RRnQYfErRsZL84mvNSravDfIsNQ4Xmp3KEbdDdtC81QYOf/zkItmLOzvtyVf1Pg6Bw/a3VKSvY38UhXyPB00NkgRV9nGDZ1BnV3WR5lnGBTkrLmrBJkbl8O1wsnS+FxZmwASDbkkn3L2wqEdM2K6sDsgL17dBgx8P7jV5GFHngoDTAtuE4hV7JeBSPYl771BA2mbU8Qd6O874Ig==

I can't reproduce the issue with master and CGAL-4.13.

What version are you using?

Could you run the debugger and point to the line where the segfault occur?

Thanks,

Sebastien.

On 9/12/19 9:49 PM, Shrabani Ghosh wrote:
Thank You. Here it is.
output_newvolume_bones.off <https://drive.google.com/file/d/1UqJWdpvHaHYP7no2T3DW7vYUya3AtTs1/view?usp=drive_web>


On Thu, Sep 12, 2019 at 3:39 PM Sebastien Loriot (GeometryFactory) < <mailto:>> wrote:

The code looks correct. Can you share the input file?
(please upload it somewhere to avoid sending a large file
to all subscribers).

Sebastien.

On 9/12/19 9:13 PM, Shrabani Ghosh wrote:
> CGAL::Polygon_mesh_processing::orient_to_bound_a_volume(mesh);
//// this
> function is not working.
> {
>    const char* filename = (argc > 1) ? argv[1] :
> "../data/output_newvolume_bones.off";
>    std::ifstream input(filename);
>    std::vector<K::Point_3> points;
>    std::vector<std::vector<std::size_t> > polygons;
>    if(!input || !CGAL::read_OFF(input, points, polygons) ||
points.empty())
>    {
>      std::cerr << "Cannot open file " << std::endl;
>      return EXIT_FAILURE;
>    }
>    CGAL::Polygon_mesh_processing::orient_polygon_soup(points,
polygons);
>    Polyhedron mesh;
> CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points,
> polygons, mesh);
>    // Number the faces because 'orient_to_bound_a_volume' needs a
face
> <--> index map
>    int index = 0;
>    for(Polyhedron::Face_iterator fb=mesh.facets_begin(),
> fe=mesh.facets_end(); fb!=fe; ++fb)
>      fb->id() = index++;
>    if(CGAL::is_closed(mesh))
>      CGAL::Polygon_mesh_processing::orient_to_bound_a_volume(mesh);
>    std::ofstream out("../data/output_newvolume_bones_orient.off");
>    out << mesh;
>    out.close();
>    return EXIT_SUCCESS;
> }
>
> On Thu, Sep 12, 2019 at 3:03 PM Sebastien Loriot (GeometryFactory)
>
<

<mailto:>

<mailto:

<mailto:>>>
wrote:
>
>     What are you using precisely?
>
>     CGAL::Polygon_mesh_processing::reverse_face_orientations()?
>
>     How is the mesh read? You should post your code on
gist.github.com <http://gist.github.com>
>     <http://gist.github.com>
>     and the data set there, it would be easier to help you.
>
>     Sebastien.
>
>     On 9/12/19 5:48 PM, Shrabani Ghosh wrote:
>      > HI,
>      >
>      > I was able to use my surface mesh by changing the orientation.
>     But now I
>      > have a surface mesh which is a bigger one, and when I am
trying
>     to change
>      > the orientation, I am not able to do that. After some time, it
>     showing
>      > segmentation fault. How to solve this problem?
>      >
>      >
>      >
>      >
>      >
>      >
>      > --
>      > Sent from: http://cgal-discuss.949826.n4.nabble.com/
>      >
>
>     --
>     You are currently subscribed to cgal-discuss.
>     To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

-- You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss





Archive powered by MHonArc 2.6.18.

Top of Page