Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] convex_hull_3 generates polyhedron with equal points

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] convex_hull_3 generates polyhedron with equal points


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] convex_hull_3 generates polyhedron with equal points
  • Date: Wed, 24 Sep 2014 20:00:25 +0200
  • Organization: GeometryFactory


Just increase the precision.

std::cout.precision(17);
before you write the points to the stream.

http://www.cplusplus.com/reference/iomanip/setprecision/

best,

andreas

On 24/09/2014 19:09, Илья Палачев wrote:
Hi,
I'm using convex_hull_3 with Exact_predicates_inexact_constructions_kernel.
The function returns polyhedron with the following vertices:
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#0: (-8.660254e-01, -5.000000e-01, 0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#1: (-8.660254e-01, -5.000000e-01, -0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#2: (-0.000000e+00, -0.000000e+00, 1.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#3: (-0.000000e+00, -0.000000e+00, -1.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#4: (-0.000000e+00, -1.000000e+00, -0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#5: (-8.660254e-01, 5.000000e-01, -0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#6: (-8.660254e-01, 5.000000e-01, -0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#7: (8.660254e-01, 5.000000e-01, -0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#8: (8.660254e-01, 5.000000e-01, 0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#9: (8.660254e-01, -5.000000e-01, -0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#10: (-0.000000e+00, 1.000000e+00, -0.000000e+00)
[Polyhedron_3 convexHullCGAL(CGALpointsSet): 594]: convex hull's point
#11: (8.660254e-01, -5.000000e-01, -0.000000e+00)
As you can see some of points are equal, and this makes its analysis
complex.
Is there any setting in convex_hull_3 that can help to avoid such situation?
Best regards,
Ilya Palachev

--
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912 skype: andreas.fabri



Archive powered by MHonArc 2.6.18.

Top of Page