Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Point precision

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Point precision


Chronological Thread 
  • From: Pol Monsó Purtí Helimap <>
  • To:
  • Subject: Re: [cgal-discuss] Point precision
  • Date: Thu, 26 Nov 2015 14:04:49 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:vwBTzR/E75Eqt/9uRHKM819IXTAuvvDOBiVQ1KB80+4cTK2v8tzYMVDF4r011RmSDdidu6oP17GempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lR8iC14/rjKibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYhvQ66sQVUbnmZ79qCvtDHTE+OiY04tfqvF/NV0yU934EWyIXlBRPRAPK5RW/UpbquTbhrblB33yRMsTyCLw1Qj+/9LxDSRnyiS5BOSRq3nvQj5lIi6ZshRWnvIdI+5POfASiFPd6f6bUZZtOXW1FGMNWUTdGKoOxa4oKBvJHNuYO/Nq1nEcHsRbrXVrkP+jo0DId3nI=

You nailed it Sebastien, thanks.

On Thu, Nov 26, 2015 at 2:02 PM, Pol Monsó Purtí Helimap <> wrote:
It was a much silly thing,

outstream << std::fixed << setprecision(4);
fixes it.

I guess the debugger, as well, was using the wrong precision for display. It's still a mistery why the z was displayed correctly.

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







Archive powered by MHonArc 2.6.18.

Top of Page