Subject: CGAL users discussion list
List archive
- From: Daniel Duque <>
- To: cgal-discuss <>
- Subject: Re: [cgal-discuss] Point precision
- Date: Thu, 26 Nov 2015 14:08:49 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:v6+O5BC47p51YuEH+A3hUyQJP3N1i/DPJgcQr6AfoPdwSP/4osbcNUDSrc9gkEXOFd2CrakU1qyG6+u8AiQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTqkbDqsMGIKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46FppIZ9V77ndfE4UaBAF2ZhdHsk4dXi8xjFVwqGoHUGFX4HlwJBRAnD4ha9VZj4tm72t/F2xTKBbvHxGLs7UDDn46ZwQwLzk29TPDEw9CTbi9d7kblAiBOnvR12hYDONtKvOeJ6b5/aKN8TQ2tMWoBdSjVcD6uhd45JAvFSE/xfqtzRrl0PoB/2KRS1Ge6nnjNBgH772es2zv08HCnbxAlmEslY4yecl8n8KKpHCbP996LP1ziWN/4=
Hi,
I have had issues with precision at the stream before. I usually include lines like the third one when writing on a file:
std::ofstream matrices;
matrices.open("matrices.m");
matrices.precision(15);
matrices << "x = [" << endl;
for(F_v_it vit=T.finite_vertices_begin();
vit != T.finite_vertices_end();
vit++)
matrices << vit->point().x() << endl;
matrices << "];" << endl;
This is part of a code which prints out stuff in matlab / octave format. The precision is there, it just doesn't get printed in full.
Best,
Daniel
On Thu, Nov 26, 2015 at 1:54 PM, Sebastien Loriot (GeometryFactory) <> wrote:
I don't think there is anything specific to CGAL according to the
typedefs you shown. Maybe first check that after inserting a vertex
the coordinates are what you expect. Also make sure the precision
of the stream is good enough.
Sebastien.--
On 11/26/2015 01:29 PM, Pol Monsó Purtí Helimap wrote:
I am retrieving the coordinates x,y,z from a xyz file to compute a
delaunay. The values have double precision.
If I print or save the values of a point, x and y have no longer double
precision, but the z does. I've debugged the program and if I add a
watch _expression_ as *(double*)<address of the x> I get the original,
correct double value.
I've tried casting point().x() to *(double*) but of course x() returns a
double, not a double*. Somehow, the precision is lost when retrieved.
Any clue?
I am using
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Projection_traits_xy_3<K> Gt;
typedef CGAL::Triangulation_vertex_base_2<Gt> Vb;
typedef CGAL::Delaunay_mesh_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
typedef CGAL::Constrained_Delaunay_triangulation_2<Gt, Tds> CDT;
Thanks!
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Point precision, Pol Monsó Purtí Helimap, 11/26/2015
- Re: [cgal-discuss] Point precision, Sebastien Loriot (GeometryFactory), 11/26/2015
- Re: [cgal-discuss] Point precision, Pol Monsó Purtí Helimap, 11/26/2015
- Re: [cgal-discuss] Point precision, Pol Monsó Purtí Helimap, 11/26/2015
- Re: [cgal-discuss] Point precision, Daniel Duque, 11/26/2015
- Re: [cgal-discuss] Point precision, Pol Monsó Purtí Helimap, 11/26/2015
- Re: [cgal-discuss] Point precision, Sebastien Loriot (GeometryFactory), 11/26/2015
Archive powered by MHonArc 2.6.18.