mirror of https://github.com/CGAL/cgal
Move extrude_skeleton.h to its own package
This commit is contained in:
parent
ede4de77e0
commit
8b15d03b50
|
|
@ -0,0 +1,54 @@
|
|||
// Copyright (c) 2016 GeometryFactory SARL (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org)
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
// Author(s) : Andreas Fabri
|
||||
//
|
||||
// Warning: this file is generated, see include/CGAL/license/README.md
|
||||
|
||||
#ifndef CGAL_LICENSE_POLYGON_EXTRUSION_H
|
||||
#define CGAL_LICENSE_POLYGON_EXTRUSION_H
|
||||
|
||||
#include <CGAL/config.h>
|
||||
#include <CGAL/license.h>
|
||||
|
||||
#ifdef CGAL_POLYGON_EXTRUSION_COMMERCIAL_LICENSE
|
||||
|
||||
# if CGAL_POLYGON_EXTRUSION_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE
|
||||
|
||||
# if defined(CGAL_LICENSE_WARNING)
|
||||
|
||||
CGAL_pragma_warning("Your commercial license for CGAL does not cover "
|
||||
"this release of the 2D Polygon Extrusion package.")
|
||||
# endif
|
||||
|
||||
# ifdef CGAL_LICENSE_ERROR
|
||||
# error "Your commercial license for CGAL does not cover this release \
|
||||
of the 2D Polygon Extrusion package. \
|
||||
You get this error, as you defined CGAL_LICENSE_ERROR."
|
||||
# endif // CGAL_LICENSE_ERROR
|
||||
|
||||
# endif // CGAL_POLYGON_EXTRUSION_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE
|
||||
|
||||
#else // no CGAL_POLYGON_EXTRUSION_COMMERCIAL_LICENSE
|
||||
|
||||
# if defined(CGAL_LICENSE_WARNING)
|
||||
CGAL_pragma_warning("\nThe macro CGAL_POLYGON_EXTRUSION_COMMERCIAL_LICENSE is not defined."
|
||||
"\nYou use the CGAL 2D Polygon Extrusion package under "
|
||||
"the terms of the GPLv3+.")
|
||||
# endif // CGAL_LICENSE_WARNING
|
||||
|
||||
# ifdef CGAL_LICENSE_ERROR
|
||||
# error "The macro CGAL_POLYGON_EXTRUSION_COMMERCIAL_LICENSE is not defined.\
|
||||
You use the CGAL 2D Polygon Extrusion package under the terms of \
|
||||
the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR."
|
||||
# endif // CGAL_LICENSE_ERROR
|
||||
|
||||
#endif // no CGAL_POLYGON_EXTRUSION_COMMERCIAL_LICENSE
|
||||
|
||||
#endif // CGAL_LICENSE_POLYGON_EXTRUSION_H
|
||||
|
|
@ -45,6 +45,7 @@ Point_set_2 2D Range and Neighbor Search
|
|||
Point_set_3 3D Point Set
|
||||
Point_set_processing_3 Point Set Processing
|
||||
Poisson_surface_reconstruction_3 Poisson Surface Reconstruction
|
||||
Polygon_extrusion 2D Polygon Extrusion
|
||||
Polygon_mesh_processing Polygon Mesh Processing
|
||||
Polygon_mesh_processing/Compute_normal Polygon Mesh Processing - Normal Computation
|
||||
Polygon_mesh_processing/connected_components Polygon Mesh Processing - Connected Components
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@
|
|||
// Author(s) : Mael Rouxel-Labbé
|
||||
//
|
||||
|
||||
#ifndef CGAL_SLS_EXTRUDE_SKELETON_H
|
||||
#define CGAL_SLS_EXTRUDE_SKELETON_H
|
||||
#ifndef CGAL_POLYGON_EXTRUSION_EXTRUDE_SKELETON_H
|
||||
#define CGAL_POLYGON_EXTRUSION_EXTRUDE_SKELETON_H
|
||||
|
||||
#include <CGAL/license/Straight_skeleton_2.h>
|
||||
#include <CGAL/license/Polygon_extrusion.h>
|
||||
|
||||
#include <CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h>
|
||||
#include <CGAL/create_weighted_offset_polygons_2.h>
|
||||
|
|
@ -1105,4 +1105,4 @@ bool extrude_skeleton(const PolygonWithHoles& pwh,
|
|||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_SLS_EXTRUDE_SKELETON_H
|
||||
#endif // CGAL_POLYGON_EXTRUSION_EXTRUDE_SKELETON_H
|
||||
|
|
@ -0,0 +1 @@
|
|||
GeometryFactory (France)
|
||||
|
|
@ -0,0 +1 @@
|
|||
Given a 2D stricly simple polygon, possibly with weights, and a set of angles associated to edges, construct the extruded polygon using a straight skeleton.
|
||||
|
|
@ -0,0 +1 @@
|
|||
GPL (v3 or later)
|
||||
|
|
@ -0,0 +1 @@
|
|||
GeometryFactory (France)
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.23)
|
||||
project(Polygon_extrusion_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Qt5 Core)
|
||||
|
||||
include_directories(BEFORE "include")
|
||||
|
||||
# create a target per cppfile
|
||||
file(
|
||||
GLOB cppfiles
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
foreach(cppfile ${cppfiles})
|
||||
create_single_source_cgal_program("${cppfile}")
|
||||
endforeach()
|
||||
|
||||
if(CGAL_Qt5_FOUND)
|
||||
target_link_libraries(test_sls_extrude PUBLIC CGAL::CGAL_Basic_viewer)
|
||||
endif()
|
||||
|
|
@ -244,29 +244,29 @@ int main(int argc, char** argv)
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
test("data/extrusion/polygon_000.dat", "data/extrusion/angles_000.dat", 6, 162.37987499999997);
|
||||
test("data/extrusion/polygon_001.dat", "data/extrusion/angles_001.dat", 6, 761.76899999999989);
|
||||
test("data/extrusion/polygon_002.dat", "data/extrusion/angles_002.dat", 22, 15667.658890389464);
|
||||
test("data/extrusion/polygon_003.dat", "data/extrusion/angles_003.dat", 12, 105.79864291299999);
|
||||
test("data/extrusion/polygon_004.dat", "data/extrusion/angles_004.dat", 12, 3119.9357499857151);
|
||||
test("data/extrusion/polygon_005.dat", "data/extrusion/angles_005.dat", 12, 1342.9474791424002);
|
||||
test("data/extrusion/polygon_006.dat", "data/extrusion/angles_006.dat", 12, 249.41520000000008);
|
||||
test("data/extrusion/polygon_007.dat", "data/extrusion/angles_007.dat", 12, 7344.8312073148918);
|
||||
test("data/extrusion/polygon_008.dat", "data/extrusion/angles_008.dat", 12, 7240.6890039677555);
|
||||
test("data/extrusion/polygon_009.dat", "data/extrusion/angles_009.dat", 10, 3704.0787987580375);
|
||||
test("data/extrusion/polygon_010.dat", "data/extrusion/angles_010.dat", 40, 29306.453333333335);
|
||||
test("data/extrusion/polygon_011.dat", "data/extrusion/angles_011.dat", 40, 375866.54633629462);
|
||||
test("data/extrusion/polygon_012.dat", "data/extrusion/angles_012.dat", 12, 4560.0268861722925);
|
||||
test("data/extrusion/polygon_013.dat", "data/extrusion/angles_013.dat", 12, 2221.3622594712501);
|
||||
test("data/extrusion/polygon_014.dat", "data/extrusion/angles_014.dat", 12, 4534.0568515270861);
|
||||
test("data/extrusion/polygon_015.dat", "data/extrusion/angles_015.dat", 12, 1565.5667825255343);
|
||||
test("data/extrusion/polygon_016.dat", "data/extrusion/angles_016.dat", 311, 2518611984.6277928);
|
||||
test("data/extrusion/polygon_017.dat", "data/extrusion/angles_017.dat", 50, 7729166.666666667);
|
||||
test("data/extrusion/polygon_018.dat", "data/extrusion/angles_018.dat", 50, 354166.66666666663);
|
||||
test("data/extrusion/polygon_019.dat", "data/extrusion/angles_019.dat", 311, 92570921.033775225);
|
||||
test("data/extrusion/polygon_020.dat", "data/extrusion/angles_020.dat", 70, 1550161.8131298050);
|
||||
test("data/extrusion/polygon_021.dat", "data/extrusion/angles_021.dat", 70, 37631800.885042846);
|
||||
test("data/extrusion/polygon_022.dat", "data/extrusion/angles_022.dat", 20, 7702444.2118858183);
|
||||
test("data/polygon_000.dat", "data/angles_000.dat", 6, 162.37987499999997);
|
||||
test("data/polygon_001.dat", "data/angles_001.dat", 6, 761.76899999999989);
|
||||
test("data/polygon_002.dat", "data/angles_002.dat", 22, 15667.658890389464);
|
||||
test("data/polygon_003.dat", "data/angles_003.dat", 12, 105.79864291299999);
|
||||
test("data/polygon_004.dat", "data/angles_004.dat", 12, 3119.9357499857151);
|
||||
test("data/polygon_005.dat", "data/angles_005.dat", 12, 1342.9474791424002);
|
||||
test("data/polygon_006.dat", "data/angles_006.dat", 12, 249.41520000000008);
|
||||
test("data/polygon_007.dat", "data/angles_007.dat", 12, 7344.8312073148918);
|
||||
test("data/polygon_008.dat", "data/angles_008.dat", 12, 7240.6890039677555);
|
||||
test("data/polygon_009.dat", "data/angles_009.dat", 10, 3704.0787987580375);
|
||||
test("data/polygon_010.dat", "data/angles_010.dat", 40, 29306.453333333335);
|
||||
test("data/polygon_011.dat", "data/angles_011.dat", 40, 375866.54633629462);
|
||||
test("data/polygon_012.dat", "data/angles_012.dat", 12, 4560.0268861722925);
|
||||
test("data/polygon_013.dat", "data/angles_013.dat", 12, 2221.3622594712501);
|
||||
test("data/polygon_014.dat", "data/angles_014.dat", 12, 4534.0568515270861);
|
||||
test("data/polygon_015.dat", "data/angles_015.dat", 12, 1565.5667825255343);
|
||||
test("data/polygon_016.dat", "data/angles_016.dat", 311, 2518611984.6277928);
|
||||
test("data/polygon_017.dat", "data/angles_017.dat", 50, 7729166.666666667);
|
||||
test("data/polygon_018.dat", "data/angles_018.dat", 50, 354166.66666666663);
|
||||
test("data/polygon_019.dat", "data/angles_019.dat", 311, 92570921.033775225);
|
||||
test("data/polygon_020.dat", "data/angles_020.dat", 70, 1550161.8131298050);
|
||||
test("data/polygon_021.dat", "data/angles_021.dat", 70, 37631800.885042846);
|
||||
test("data/polygon_022.dat", "data/angles_022.dat", 20, 7702444.2118858183);
|
||||
|
||||
std::cout << "OK" << std::endl;
|
||||
|
||||
Loading…
Reference in New Issue