Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] CGAL exception while reading CNOFF file
- Date: Fri, 31 Jan 2020 04:59:36 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:J96A8BzBCJx6COHXCy+O+j09IxM/srCxBDY+r6Qd2u0WIJqq85mqBkHD//Il1AaPAdyHrakVwLSO++C4ACpcuM3H6ChDOLV3FDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjeu8UMj4ZvLqk9xxrVrnBVf+ha2X5kKUickhrh6Mq85oJv/zhVt/k868NOTKL2crgiQ7dFFjomKWc15MPqtRnHUwSC42YXX3sVnBRVHQXL9Qn2UZjtvCT0sOp9wzSaMtbtTb8oQzSi7rxkRwHuhSwaKjM26mDXish3jKJGvBKsogF0zoDIbI2JMvd1Y6XQds4YS2VcRMZcTzFPDJ2yb4UPDOQPM+hXoIb/qFQSohWzHhWsCeD1xzNUmnP706833uI8Gg/GxgwgGNcOvWzaoNvoKqgdSvq6zLLUzTXCcfxW3yr25o7PchA7oPGMWq5wetfVxUcuCQzFiVCQppL5PzOP1uUDs3KU4PZ8VeKokW4mqwR9rjayzcorkYnJgoUVykrF9SV+3IY5P9i4SEpgbN6rFZtfrSCaN49sTsw+RGFovT83x7sbspC1eygKzY4oxx/Za/GfdIiI/wjjVP6LITd/hnJqZq6whwqo/Uin0O38WdG40FlLripZktnMq2sC2wbP5ciAT/tw+Fqq1zWX1w3L9O1IPUQ5mbDYJpMh2LI8i4QfvEfZEiL5mEj6lLGaeV849uS17unofKnqqYWZOoNqlg3yL6Ejl8OhDesmLgQDWmab9OSm27H/+ED0T7RHg/kqnaTcsZ3XIcUWpqC8DgJX3IYs9hmyAjG729oCh3YHNkhKeBefgojpJV7OJPf4AO+6g1u2kTdrw+nKP7PkApnQN3TDnrjscLZn505Tzwozyt9f55ZKBb0bPP3zXUrxuMTZDh8/LQO03/7qBMth2o4aQ26CAa+UPLnPvVOW5e8jOeaBaY8NtDb4Mfcl5vrujXEjmV8aeKmkxYAXaHS/HvR8IkWZZmbsjs0EEWcOpQc+Q+nqh0eDUT5XfXq9Q6U85jQjBIK8EYjDXpytgKCG3CqjApJWaXpJClSVHXj1doWEQOsDaD+JIs96iTEETrigS4o51R60rgP6yrxnLvDV+iICr57j2sJ1tKXvkkQ5+jVwSsicyGqQVHpcn2USRjZw0rosj1Z6zwLJ6qVyiudEFNFVr9dOSAY9Kdac4OF9Dt3uQBPvd9yVT0y3A5/uVSo1ScgwxMNIZkJVFNCrjxSF1C2vVexG34eXDYA5p/qPl0P6INxwni6fiPsRymI+S84KDlWIw7Zl/lGKVYHMmkSd0a2tcPZEhXOfxCK41WOL+XpgfktwXKHCBy1NY0LXqZHm4xqHQePzT7sgNQRFxIiJLa4YMoS432UDf+/qPZHlW0z0nm6xARiSwbbVNdjlfmwc2GPWD01Wyg0=
Created this issue to track the pb:
https://github.com/CGAL/cgal/issues/4499
Sebastien.
On 1/31/20 3:52 AM, J. Scheurich wrote:
Hi,
When i run the following program under Ubuntu 18.04 (X86_64)...
// compile: g++ -g -O0 readoff_vertexcolor.cpp -lCGAL
// test data: https://wdune.ourproject.org/examples/test.off
#include <CGAL/Simple_cartesian.h>
typedef CGAL::Simple_cartesian<double> Kernel;
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Polygon_mesh_processing/self_intersections.h>
#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
#include <CGAL/boost/graph/dijkstra_shortest_paths.h>
#include <CGAL/exceptions.h>
#include <CGAL/IO/Color.h>
#include <boost/graph/prim_minimum_spanning_tree.hpp>
#include <boost/foreach.hpp>
typedef Kernel::Point_3 Point;
typedef CGAL::Surface_mesh<Point> Surface;
typedef CGAL::Surface_mesh<Point> SurfaceMesh;
typedef CGAL::Color Color;
typedef Surface::Vertex_index vertex_index;
typedef boost::graph_traits<Surface>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Surface>::face_descriptor face_descriptor;
typedef boost::graph_traits<Surface>::halfedge_descriptor
halfedge_descriptor;
std::vector<Point> verts;
std::vector<Color> cols;
int main(int argc, char **argv)
{
const char *filename = "test.off";
std::ifstream input(filename);
SurfaceMesh *mesh = new SurfaceMesh();
if (!input || !(input >> *mesh)) {
perror(filename);
}
SurfaceMesh::Property_map<SurfaceMesh::Vertex_index, CGAL::Color>
vcolors =
mesh->property_map<SurfaceMesh::Vertex_index, CGAL::Color >
("v:color").first;
bool colorExists = mesh->property_map
<SurfaceMesh::Vertex_index, CGAL::Color>("v:color").second;
for (SurfaceMesh::Vertex_index vi : mesh->vertices()) {
verts.push_back(mesh->point(vi));
if (colorExists )
cols.push_back(vcolors[vi]);
}
}
I get:
$ ./a.out
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: n > 2
File: /usr/include/CGAL/boost/graph/Euler_operations.h
Line: 588
Aborted (core dumped)
What is wrong ?
so long
MUFTI
- [cgal-discuss] CGAL exception while reading CNOFF file, J. Scheurich, 01/31/2020
- Re: [cgal-discuss] CGAL exception while reading CNOFF file, Sebastien Loriot (GeometryFactory), 01/31/2020
- Re: [cgal-discuss] CGAL exception while reading CNOFF file, Maxime Gimeno, 01/31/2020
- Re: [cgal-discuss] CGAL exception while reading CNOFF file, J. Scheurich, 01/31/2020
- Re: [cgal-discuss] CGAL exception while reading CNOFF file, Maxime Gimeno, 01/31/2020
- Re: [cgal-discuss] CGAL exception while reading CNOFF file, J. Scheurich, 01/31/2020
- Re: [cgal-discuss] CGAL exception while reading CNOFF file, Maxime Gimeno, 01/31/2020
- Re: [cgal-discuss] CGAL exception while reading CNOFF file, Sebastien Loriot (GeometryFactory), 01/31/2020
Archive powered by MHonArc 2.6.18.