Subject: CGAL users discussion list
List archive
- From: "J. Scheurich" <>
- To:
- Subject: Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp
- Date: Wed, 20 Jun 2018 10:05:48 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:8ImHZREwb6ZCJG4j972CQZ1GYnF86YWxBRYc798ds5kLTJ78o82wAkXT6L1XgUPTWs2DsrQY07eQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDqwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KOSMn/mHZisJ+j6xVrxyuqBN934Hab5qYNOZ8c67HYd8WWWRMU8ZXWidcAo28dYwPD+8ZMOpWq4fxvUYFowaiCgmsGuzv1yVIhn7q0q063egqDAbL3Ak9H9IArHTUrcj5OLoJXOG70qbH1i/PYO5I1jrk7oXDbx4vofaJXb1qcMrRz1EiFwzbgVWXrIzqIS+V1v4NsmiV9eVvSf6vi2k9qwBxuDSg2sAsiozPi4kIyV7E7T10zJgoKdGmUkJ3f8CoHZlKuy2HNYZ6WN4uT39wtCs1y7AKo562cDIXxJkm3RLTduCLfomO7xn+TuieOy14i2hgeL+nhxa970ygyurkW8mx11ZKszZFnsPCt38TzBPf8NWIReVl8keg3zaAyRzT5/laLUwpi6bXMYAtzqAym5YJrEjOHDX6lFjogKOOc0Ur4Omo6+DpYrX8oZ+cMpd5igTjMqQghsy/APk0PhUVUmmV5+uzz6fv8lDnT7lSlP05jrHZsIzGJcQcvqO2HwBV3Zwn6xqmEjim0c8YkmUaLFJeYxKKlJPpOlHLIPDgF/izmVWskDFxx/DHJLLtGJvNLmKQ2IvmKL1y4koZxAsoxs1E/LpVDKsAKbT9QBzfrtvdW1UbdUSPyObqFc983YNUETaKH6GFMfqLmUCF7KQjLr/fN8cupD/hJq19tLbVhngjlApFJPj77d4scHm9W89eDQCcaHvojM0GFDdYoQc0CuDn2gTbDWxjIk2qVqd53QkVTZq8BNeRWY2nxrCMjn/iQ89mI1teA1XJKk/GMoWJX/BVM3CXJdJ91CMJX/6tRt152A==
There must be something fishy here. See for example our test results here:
https://cgal.geometryfactory.com/CGAL/testsuite/results-4.13-I-34.shtml
You'll see that the line Surface_mesh_Examples where sm_circulators.cpp
is tested can be compiled and ran successfully on all our test platforms
(that includes some of yours).
Sorry for the table, it is misleading. sm_circulators.cpp failes only
under fedora 28 (not in the list of the tested systems) but i get
the exception of it under also under Debian and Arch Linux when i do
...
#include <CGAL/Surface_mesh.h>
typedef Kernel::Point_3 Point;
typedef CGAL::Surface_mesh<Point> Surface;
typedef Surface::Vertex_index vertex_index;
...
static void
build_mesh(Surface *meshOut, MyMesh *mesh, Matrix matrix)
{
Array<vertex_index> u;
for (int i = 0; i < mesh->getVertices()->getSFSize(); i++) {
Vec3f v = mesh->getVertices()->getVec(i);
v = matrix * v;
u.append(meshOut->add_vertex(Kernel::Point_3(v.x, v.y, v.z)));
}
MFInt32 *meshCoords = mesh->getCoordIndex();
int vert = 0;
vertex_index v1;
vertex_index v2;
vertex_index v3;
for (int i = 0; i < mesh->getSFSize(); i++) {
int face = meshCoords->getValue(i);
Vec3f v = mesh->getVertices()->getVec(face);
if (face > -1) {
switch (vert) {
case 0:
v1 = u[face];
break;
case 1:
v2 = u[face];
break;
case 2:
v3 = u[face];
break;
}
if (vert++ == 2) {
vert = 0;
meshOut->add_face(v1, v2, v3);
}
}
}
}
Array is a std::vector like, mesh->getVertices() are the vertices of the
mesh, meshCoords is a numVertex1, numVertex2, numVertex2, -1 List as in
X3D.
Is this a valid way to fill a CGAL::Surface_mesh ?
It works on Ubuntu and OpenSuse.
Note also that in your compilation line with gcc you are missing -frounding-math but that should not be responsible for the issue you have.
This is often missing in CGAL compiled by Linux distributors.
This fails valgrind to run on programs with CGAL linked, it throws a
other exception 8-(
Can't you add -frounding-math to the default cmake ?
Could you indicate the gcc version with which sm_circulators.cpp is
failing?
$ g++ --version
g++ (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
so long
MUFTI
- [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, J. Scheurich, 06/19/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, Sebastien Loriot (GeometryFactory), 06/19/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, J. Scheurich, 06/19/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, J. Scheurich, 06/19/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, Sebastien Loriot (GeometryFactory), 06/20/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, J. Scheurich, 06/20/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, Laurent Rineau (CGAL/GeometryFactory), 06/20/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, J. Scheurich, 06/20/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, Sebastien Loriot (GeometryFactory), 06/20/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, J. Scheurich, 06/19/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, J. Scheurich, 06/19/2018
- <Possible follow-up(s)>
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, j. scheurich, 06/21/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, Laurent Rineau (CGAL/GeometryFactory), 06/21/2018
- Re: [cgal-discuss] exception in Surface_mesh_2sm_circulators_8cpp, Sebastien Loriot (GeometryFactory), 06/19/2018
Archive powered by MHonArc 2.6.18.