Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3D Delaunay cell dual error

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3D Delaunay cell dual error


Chronological Thread 
  • From: "Wesley Smith" <>
  • To:
  • Subject: Re: [cgal-discuss] 3D Delaunay cell dual error
  • Date: Fri, 26 Oct 2007 23:36:19 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dTpqCBb3eeOfARqQWzqwsAKnQSb2t4FPN+g0fHJkeoberD0RGfb2i/2vWxEtKYt0WGk18MsvnBbPUQnsLarJ0NS4o44UbDdhf0Vk+6uOENsFlAbiut9IqaicXR53qxLSZsFnvHbL9Ambbf4HHA+k5kWLBopUSg6KbuxJRcT5Hxk=

I think you need to pass in a Cell_handle instead of a Cell *. You
can actually just pass in the iterator to the function as it converts
to a handle automatically. See the TriangulationDataStructure_3 docs
(
http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/TriangulationDS_3_ref/Concept_TriangulationDataStructure_3.html#Cross_link_anchor_986
) for more info on iterator/circulator conversions.

wes

On 10/26/07, Ashwin Nanjappa
<>
wrote:
> Hi,
>
> I'm getting a run-time error when I try to get the dual of 3D Delaunay
> cells. Note that obtaining dual of 3D Delaunay facets works fine without
> any error. Anyone knows if I'm doing something wrong?
>
> Sample code is given below:
>
> /////////////////////////////////////////////////////////////
> typedef CGAL::Exact_predicates_exact_constructions_kernel K;
> typedef CGAL::Point_3<K> Point_3;
> typedef CGAL::Delaunay_triangulation_3<K> Delaunay_3;
>
> int main()
> {
> // 4 sample points
> Point_3 p[4];
> p[0] = Point_3(0, 0, 0);
> p[1] = Point_3(2, 0, 0);
> p[2] = Point_3(1, 3, 1);
> p[3] = Point_3(2, 2, 0);
>
> // Create Delaunay triangulation
> Delaunay_3 d;
> for (unsigned int i = 0; i < 4; ++i)
> d.insert(p[i]);
>
> // Sanity check on triangulation
> d.is_valid(true);
>
> // Iterate through delaunay cells
> for (Delaunay_3::Finite_cells_iterator i = d.finite_cells_begin();
> i != d.finite_cells_end(); ++i)
> {
> Delaunay_3::Cell c = *i;
> Point_3 vvp = d.dual(&c); // dual() call causes error!!!
> }
>
> return 0;
> }
>
> /////////////////////////////////////////////////////////////
>
> Regards,
> ~ash
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>



Archive powered by MHonArc 2.6.16.

Top of Page