Subject: CGAL users discussion list
List archive
- From: Hamid G <>
- To:
- Subject: [cgal-discuss] Outputting results from an exact kernel
- Date: Fri, 03 Dec 2010 18:29:01 -0500
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=oxH8jMiJpDgSw6gXDaOGx7GVtAYkh066YQ2JmH62N5ad/7dPotqeg/X6X6DjArO/AN wZAt0SJKRl5dqDLaFiX3XzhEZKOs/YiXWoDh0dnqBmiN1ASR+kV447C6KWnlhrn+dD2S iecPmDKjIZwSYx58uUbOK47j+bNcQl5austVU=
Hi
What method would you suggest to use in order to write coordinates of points from an exact kernel to a file on hard disk so that when we read it later on we won't use any precision/information ?
I am using different modules from CGAL that don't support a common kernel. So after using each module I write the results to a .OFF file using provided iostream methods. And then I read that file in the next module.
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
CGAL::Polyhedron_3<Kernel> shell;
ofstream fid("out.off")
fid << shell;
I am getting random assertion failures here and there in the modules I am using, similar to this:
terminate called after throwing an instance of 'CGAL::Precondition_exception'
what(): CGAL ERROR: precondition violation!
Expr: ! k.is_degenerate_3_object()(t)
File: /home/hamid/local/include/CGAL/Triangle_3_Segment_3_do_intersect.h
This doesn't happen all the time for the same input and settings!
So I am guessing assertion failures are somehow related to rounding off the coordinates in file I/O operations.
This is a general view of which modules I am using from CGAL:
1- Surface_mesh with gray scale image as input (not sure which kernel 'Surface_mesh_default_triangulation_3' is using)
2- Then the resulting surface mesh from 1 is used in Nef_3 for a subtraction boolean operation with another surface mesh. (here I use 'Exact_predicates_exact_constructions_kernel')
3- The resulting surface mesh from 2 is refined using Exact_predicates_inexact_constructions_kernel in 'Subdivision_method_3'
4- The resulting surface from 3 is then fed to tetrahedral mesh generator which uses Exact_predicates_inexact_constructions_kernel with 'Robust_intersection_traits_3'
Am I using the right kernel ? Any suggestion about which kernels are better fit for this workflow assuming that I am using file I/O to send the data between these modules.
thanks in advance,
Hamid G
- [cgal-discuss] Outputting results from an exact kernel, Hamid G, 12/04/2010
- Re: [cgal-discuss] Outputting results from an exact kernel, Sebastien Loriot (GeometryFactory), 12/06/2010
- Re: [cgal-discuss] Outputting results from an exact kernel, Hamid G, 12/09/2010
- Re: [cgal-discuss] Outputting results from an exact kernel, Sebastien Loriot (GeometryFactory), 12/09/2010
- Re: [cgal-discuss] Outputting results from an exact kernel, Hamid G, 12/09/2010
- Re: [cgal-discuss] Outputting results from an exact kernel, Hamid G, 12/09/2010
- Re: [cgal-discuss] Outputting results from an exact kernel, Sebastien Loriot (GeometryFactory), 12/06/2010
Archive powered by MHonArc 2.6.16.