From 69eff066910a8b419fab40084364717a745580eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 13 Jan 2014 19:08:30 +0100 Subject: [PATCH] add a default constructor to Primitive_vertex to make it work with Lazy also add a test showing the issue --- .../CGAL/Partition_2/Partitioned_polygon_2.h | 6 +++ ...e_approx_convex_partition_2_test_EPECK.cpp | 49 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_EPECK.cpp diff --git a/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h b/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h index 4c20eaed07a..24f5f17dacc 100644 --- a/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h +++ b/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h @@ -305,6 +305,12 @@ class Partition_vertex : public Traits_::Point_2 typedef std::list Diagonal_list; typedef typename Diagonal_list::iterator Diagonal_iterator; + //default constructor added for EPECK + Partition_vertex(): Base_point() + { + current_diag = diag_endpoint_refs.end() ; + } + Partition_vertex(Base_point p) : Base_point(p) { diff --git a/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_EPECK.cpp b/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_EPECK.cpp new file mode 100644 index 00000000000..c290abc3811 --- /dev/null +++ b/Partition_2/test/Partition_2/greene_approx_convex_partition_2_test_EPECK.cpp @@ -0,0 +1,49 @@ +// ============================================================================ +// +// Copyright (c) 2000 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------------- +// +// release : $CGAL_Revision $ +// release_date : $CGAL_Date $ +// +// file : include/CGAL/greene_approx_convex_partiton_2_test_EPECK.cpp +// package : $CGAL_Package: Partition_2 1.0 (27 Jul 2000) $ +// chapter : Planar Polygon Partitioning +// +// revision : $Id$ +// revision_date : $Date$ +// +// author(s) : Susan Hert +// maintainer : Susan Hert +// +// coordinator : MPI (Susan Hert ) +// +// implementation: Testing of convex partitioning functions +// ============================================================================ + +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_exact_constructions_kernel K; +typedef K::Point_2 Point_2; +typedef std::list Container; +typedef CGAL::Polygon_2 Polygon_2; + +#include "convex_test_polys.h" + +#include "test_greene_approx_convex.h" + +int main(void) +{ + test_greene_approx_convex(); + + return 0; +}