Skip to content

Commit

Permalink
Merge branch 'SLS-API_fixes-GF' into SLS-API_fixes-6.0.x-GF
Browse files Browse the repository at this point in the history
  • Loading branch information
MaelRL committed Jan 20, 2025
2 parents 2a93bed + 79d6f4c commit bba9db1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
#include <CGAL/Straight_skeleton_2/IO/print.h>
#include <CGAL/Timer.h>

#include <memory>
#include <CGAL/use.h>

#include <boost/shared_ptr.hpp>

#include <cassert>
#include <iostream>
#include <memory>
#include <string>
#include <vector>

Expand Down Expand Up @@ -1128,6 +1131,7 @@ void test_kernel()
std::cerr.precision(17);

void (*dummy_ptr)() = &test_API<K>;
CGAL_USE(dummy_ptr);

// Artificial data
test_offset_square<K>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ void Straight_skeleton_traits_external_trace(std::string m)
#include <CGAL/Polygon_2.h>
#include <CGAL/draw_polygon_2.h>

#include <memory>
#include <CGAL/use.h>

#include <boost/shared_ptr.hpp>

#include <cassert>
#include <iostream>
#include <memory>
#include <set>
#include <string>
#include <vector>
Expand Down Expand Up @@ -222,6 +225,7 @@ void test_kernel()
// CGAL_STSKEL_TRAITS_ENABLE_TRACE

void (*dummy_ptr)() = &test_API<K>;
CGAL_USE(dummy_ptr);

test_skeleton<K>("data/pseudo_split_0.poly", 13, 40, 8);
test_skeleton<K>("data/pseudo_split_1.poly", 21, 68, 12);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <CGAL/Polygon_with_holes_2.h>
#include <CGAL/Straight_skeleton_2/IO/print.h>

#include <CGAL/use.h>

#include <boost/shared_ptr.hpp>

#include <cassert>
Expand Down Expand Up @@ -271,6 +273,7 @@ template <typename K>
void test_kernel()
{
void (*dummy_ptr)() = &test_API<K>;
CGAL_USE(dummy_ptr);
}

int main(int, char**)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <CGAL/create_weighted_offset_polygons_2.h>
#include <CGAL/extrude_skeleton.h>

#include <CGAL/use.h>

#include <boost/shared_ptr.hpp>

#include <iostream>
Expand Down Expand Up @@ -62,7 +64,6 @@ void test_kernel(const int polygon_nv, CGAL::Random& rnd)
{
using FT = typename K::FT;
using Point_2 = typename K::Point_2;
using Vector_2 = typename K::Vector_2;
using Point_3 = typename K::Point_3;

using Polygon_2 = CGAL::Polygon_2<K>;
Expand All @@ -73,6 +74,7 @@ void test_kernel(const int polygon_nv, CGAL::Random& rnd)
using Mesh = CGAL::Surface_mesh<Point_3>;

void (*dummy_ptr)() = &test_API<K>;
CGAL_USE(dummy_ptr);

typedef CGAL::Random_points_in_square_2<Point_2> Point_generator;
Polygon_2 pol;
Expand All @@ -92,7 +94,7 @@ void test_kernel(const int polygon_nv, CGAL::Random& rnd)

CGAL::draw(pol);

auto ss_ptr = CGAL::create_interior_weighted_straight_skeleton_2(pol, weights);
Straight_skeleton_2_ptr ss_ptr = CGAL::create_interior_weighted_straight_skeleton_2(pol, weights, K());
assert(ss_ptr);
if(!ss_ptr)
{
Expand All @@ -102,7 +104,7 @@ void test_kernel(const int polygon_nv, CGAL::Random& rnd)

CGAL::draw(*ss_ptr);

ss_ptr = CGAL::create_exterior_weighted_straight_skeleton_2(0.1, pol, weights);
ss_ptr = CGAL::create_exterior_weighted_straight_skeleton_2(0.1, pol, weights, K());
assert(ss_ptr);
if(!ss_ptr)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void test_kernel(const int hole_n, const int hole_nv, CGAL::Random& rnd)
typedef CGAL::Random_points_in_square_2<Point_2> Point_generator;

Polygon_2 poly;
CGAL::random_polygon_2(10, std::back_inserter(poly), Point_generator(0.25, rnd));
CGAL::random_polygon_2(hole_nv, std::back_inserter(poly), Point_generator(0.25, rnd));
return poly;
};

Expand Down Expand Up @@ -113,7 +113,7 @@ void test_kernel(const int hole_n, const int hole_nv, CGAL::Random& rnd)

// CGAL::draw(pwh);

auto ss_ptr = CGAL::create_interior_weighted_straight_skeleton_2(pwh, weights);
Straight_skeleton_2_ptr ss_ptr = CGAL::create_interior_weighted_straight_skeleton_2(pwh, weights, K());
assert(ss_ptr);
if(!ss_ptr)
{
Expand Down

0 comments on commit bba9db1

Please sign in to comment.