Replies: 3 comments
-
I used EPECK. Now I tried the same Minkowski sum with EPICK, and it crashes even when I don't use Valgrind. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Remember my issue with the centroid? It crashed with EPECK and not with EPICK. But with Valgrind, it didn't crash with EPECK. Looks like 'lazyExact' is identical to 'double' for Valgrind. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here is the EPICK version, which crashes for me. cube.off.txt #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Kernel/global_functions.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h>
#include <CGAL/minkowski_sum_3.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point3;
typedef CGAL::Surface_mesh<Point3> Mesh3;
typedef CGAL::Nef_polyhedron_3<K> Nef3;
namespace PMP = CGAL::Polygon_mesh_processing;
int main() {
// cube mesh
Mesh3 mesh_cube;
const bool ok1 = PMP::IO::read_polygon_mesh(
"cube.off", mesh_cube, CGAL::parameters::verbose(true)
);
if(!ok1) {
std::cout << "Reading failure (cube).";
std::exit(1);
}
if(!PMP::triangulate_faces(mesh_cube)) {
std::cout << "Triangulation failure (cube).";
std::exit(1);
}
// octahedron mesh
Mesh3 mesh_octahedron;
const bool ok2 = PMP::IO::read_polygon_mesh(
"octahedron.off", mesh_octahedron, CGAL::parameters::verbose(true)
);
if(!ok2) {
std::cout << "Reading failure (octahedron).";
std::exit(1);
}
if(!PMP::triangulate_faces(mesh_octahedron)) {
std::cout << "Triangulation failure (octahedron).";
std::exit(1);
}
// conversions to nef polyhedra
Nef3 nef1(mesh_cube);
Nef3 nef2(mesh_octahedron);
// Minkowski sum
std::cout << "Minkowski sum\n";
Nef3 nef = CGAL::minkowski_sum_3(nef1, nef2);
std::cout << "Convert nef to mesh\n";
Mesh3 mesh;
CGAL::convert_nef_polyhedron_to_polygon_mesh(nef, mesh, true);
//
return 0;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
There's a segfault with Valgrind when
minkowski_sum_3
is executed:Beta Was this translation helpful? Give feedback.
All reactions