Subject: CGAL users discussion list
List archive
- From: Danyang Su <>
- To:
- Cc:
- Subject: [cgal-discuss] fatal error: CGAL/Surface_mesh.h: No such file or directory
- Date: Wed, 20 Jan 2016 23:38:46 +0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:l1C8yR1M/dKoYkCCsmDT+DRfVm0co7zxezQtwd8ZsegSKvad9pjvdHbS+e9qxAeQG96LtbQd07Od7fGocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC0YLuj7n5pcybSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6Lpyv/JHBK71dqB9Qb1DByk9KEg04tfqvF/NV1ih/HwZB0kflAtBBQeN1wyyCpv4tDrzsOU7wzSyMsj/TLRyUjOnufQ4ACT0gTsKYmZquFrcjdZ92fpW
Hi Jane,
Sorry for the late reply. Thanks for your suggestion and it works if I use an triangulated surface mesh.
Now i have another question regarding the surface mesh generation.
I got the following error when compile the demo codes. The code and make command are attached.
fatal error: CGAL/Surface_mesh.h: No such file or directory
#include <CGAL/Surface_mesh.h>
Is any compiling flags missing in the sh file?
Thanks and regards,
Danyang
On 16-01-04 11:45 PM, Jane Tournois wrote:
Hi Danyang,
your input polyhedron should be triangulated.
You can do this using the function
CGAL::Polygon_mesh_processing::triangulate_faces() [1]
I called it on your input and attach the triangulated version to this
email.
Your code works perfectly on it!
Regards,
Jane.
[1]
http://doc.cgal.org/latest/Polygon_mesh_processing/group__PkgPolygonMeshProcessing.html#ga78da163452ce0675288191bcab1dedc8
Le 03/01/2016 16:43, Danyang Su a écrit :
Hi All,
I am new to CGAL and has a question regarding 3D mesh generation from
a specific domain. The code file cgal_mesh.cc is attached with two
data files included. If I use fandisk.off data file as the domain, it
works fine. But if I use T3d_rec.off as the domain, it crashes with
error information as below.
terminate called after throwing an instance of
'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: !r_tr_.is_infinite(*cell_it)
File: /usr/include/CGAL/Mesh_3/Refine_cells_3.h
Line: 385
Aborted
The latter data file T3d_rec.off is just a simple hexahedron with
similar scale as fandisk.off.
Could anyone let me know what is wrong with the code, especially the
mesh criteria.
Thanks and regards,
Danyang
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Surface_mesh.h> #include <CGAL/boost/graph/graph_traits_Surface_mesh.h> #include <CGAL/Polygon_mesh_processing/triangulate_faces.h> #include <fstream> typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point; typedef CGAL::Surface_mesh<Point> Surface_mesh; int main(int argc, char* argv[]) { const char* filename = (argc > 1) ? argv[1] : "data/P.off"; std::ifstream input(filename); Surface_mesh mesh; if (!input || !(input >> mesh) || mesh.is_empty()) { std::cerr << "Not a valid off file." << std::endl; return 1; } CGAL::Polygon_mesh_processing::triangulate_faces(mesh); std::ofstream cube_off("P_tri.off"); cube_off << mesh; cube_off.close(); return 0; }
Attachment:
triangulate_faces_example.sh
Description: application/shellscript
- [cgal-discuss] CGAL ERROR: assertion violation, Danyang Su, 01/03/2016
- Re: [cgal-discuss] CGAL ERROR: assertion violation, Jane Tournois, 01/04/2016
- [cgal-discuss] fatal error: CGAL/Surface_mesh.h: No such file or directory, Danyang Su, 01/20/2016
- Re: [cgal-discuss] fatal error: CGAL/Surface_mesh.h: No such file or directory, Sebastien Loriot (GeometryFactory), 01/20/2016
- [cgal-discuss] fatal error: CGAL/Surface_mesh.h: No such file or directory, Danyang Su, 01/20/2016
- Re: [cgal-discuss] CGAL ERROR: assertion violation, Jane Tournois, 01/04/2016
Archive powered by MHonArc 2.6.18.