mirror of https://github.com/CGAL/cgal
Add package 2D Polygon Repair
This commit is contained in:
parent
c36d6df775
commit
98ae089d10
|
|
@ -31,6 +31,7 @@
|
||||||
\cgalPackageSection{PartPolygons,Polygons}
|
\cgalPackageSection{PartPolygons,Polygons}
|
||||||
|
|
||||||
\package_listing{Polygon}
|
\package_listing{Polygon}
|
||||||
|
\package_listing{Polygon_repair_2}
|
||||||
\package_listing{Boolean_set_operations_2}
|
\package_listing{Boolean_set_operations_2}
|
||||||
\package_listing{Nef_2}
|
\package_listing{Nef_2}
|
||||||
\package_listing{Nef_S2}
|
\package_listing{Nef_S2}
|
||||||
|
|
|
||||||
|
|
@ -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_REPAIR_2_H
|
||||||
|
#define CGAL_LICENSE_POLYGON_REPAIR_2_H
|
||||||
|
|
||||||
|
#include <CGAL/config.h>
|
||||||
|
#include <CGAL/license.h>
|
||||||
|
|
||||||
|
#ifdef CGAL_POLYGON_REPAIR_2_COMMERCIAL_LICENSE
|
||||||
|
|
||||||
|
# if CGAL_POLYGON_REPAIR_2_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 Repair package.")
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef CGAL_LICENSE_ERROR
|
||||||
|
# error "Your commercial license for CGAL does not cover this release \
|
||||||
|
of the 2D Polygon Repair package. \
|
||||||
|
You get this error, as you defined CGAL_LICENSE_ERROR."
|
||||||
|
# endif // CGAL_LICENSE_ERROR
|
||||||
|
|
||||||
|
# endif // CGAL_POLYGON_REPAIR_2_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE
|
||||||
|
|
||||||
|
#else // no CGAL_POLYGON_REPAIR_2_COMMERCIAL_LICENSE
|
||||||
|
|
||||||
|
# if defined(CGAL_LICENSE_WARNING)
|
||||||
|
CGAL_pragma_warning("\nThe macro CGAL_POLYGON_REPAIR_2_COMMERCIAL_LICENSE is not defined."
|
||||||
|
"\nYou use the CGAL 2D Polygon Repair package under "
|
||||||
|
"the terms of the GPLv3+.")
|
||||||
|
# endif // CGAL_LICENSE_WARNING
|
||||||
|
|
||||||
|
# ifdef CGAL_LICENSE_ERROR
|
||||||
|
# error "The macro CGAL_POLYGON_REPAIR_2_COMMERCIAL_LICENSE is not defined.\
|
||||||
|
You use the CGAL 2D Polygon Repair 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_REPAIR_2_COMMERCIAL_LICENSE
|
||||||
|
|
||||||
|
#endif // CGAL_LICENSE_POLYGON_REPAIR_2_H
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS}
|
||||||
|
PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - 2D Polygon Repair"
|
||||||
|
INPUT = ${CMAKE_SOURCE_DIR}/Polygon_repair_2/doc/Polygon_repair_2/ \
|
||||||
|
${CMAKE_SOURCE_DIR}/Polygon_repair_2/include
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
// PRETTY PACKAGE NAME should equal the project title in Doxyfile.in
|
||||||
|
|
||||||
|
/// \defgroup PkgPolygonRepair2 2D Polygon Repair Reference
|
||||||
|
/// \defgroup PkgPolygonRepair2Concepts Concepts
|
||||||
|
/// \ingroup PkgPolygonRepair2
|
||||||
|
|
||||||
|
/// \defgroup PkgPolygonRepair2AlgorithmClasses Algorithm Classes
|
||||||
|
/// \ingroup PkgPolygonRepair2
|
||||||
|
|
||||||
|
/// \defgroup PkgPolygonRepair2TraitsClasses Traits Classes
|
||||||
|
/// \ingroup PkgPolygonRepair2
|
||||||
|
|
||||||
|
/// \defgroup PkgPolygonRepair2Miscellaneous Miscellaneous
|
||||||
|
/// \ingroup PkgPolygonRepair2
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\addtogroup PkgPolygonRepair2
|
||||||
|
\todo check generated documentation
|
||||||
|
|
||||||
|
\cgalPkgDescriptionBegin{2D Polygon Repair,PkgPolygonRepair2}
|
||||||
|
\cgalPkgPicture{Polygon_repair_2-small.png}
|
||||||
|
|
||||||
|
\cgalPkgSummaryBegin
|
||||||
|
\cgalPkgAuthors{Ken Arroyo Ohori}
|
||||||
|
\cgalPkgDesc{The package provides algorithms to repair 2D polygons. }
|
||||||
|
\cgalPkgManuals{Chapter_2D_Polygon_repair,PkgPolygonRepair2}
|
||||||
|
\cgalPkgSummaryEnd
|
||||||
|
|
||||||
|
\cgalPkgShortInfoBegin
|
||||||
|
\cgalPkgSince{6.0}
|
||||||
|
\cgalPkgDependsOn{\ref PkgDEPENDENCY}
|
||||||
|
\cgalPkgBib{cgal:x-x}
|
||||||
|
\cgalPkgLicense{\ref licensesGPL "GPL"}
|
||||||
|
\cgalPkgDemo{DEMO 1,demo1.zip}
|
||||||
|
\cgalPkgDemo{DEMO 2,demo2.zip}
|
||||||
|
\cgalPkgShortInfoEnd
|
||||||
|
|
||||||
|
\cgalPkgDescriptionEnd
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
namespace CGAL {
|
||||||
|
/*!
|
||||||
|
|
||||||
|
\mainpage User Manual
|
||||||
|
\anchor Chapter_2D_Polygon_repair
|
||||||
|
|
||||||
|
\cgalAutoToc
|
||||||
|
\author Ken Arroyo Ohori
|
||||||
|
|
||||||
|
This chapter describes the ...
|
||||||
|
|
||||||
|
\section SectionPolygonRepair2_Definitions Definitions
|
||||||
|
|
||||||
|
Section on definitions here ...
|
||||||
|
|
||||||
|
\section SectionPolygonRepair2_Examples Examples
|
||||||
|
|
||||||
|
\subsection SubsectionPolygonRepair2_FirstExample First Example
|
||||||
|
|
||||||
|
The following example shows ...
|
||||||
|
|
||||||
|
\cgalExample{Polygon_repair_2/repair_polygon_2.cpp}
|
||||||
|
|
||||||
|
\cgalFigureBegin{figPck,bench.png}
|
||||||
|
Left: ...
|
||||||
|
\cgalFigureEnd
|
||||||
|
|
||||||
|
*/
|
||||||
|
} /* namespace CGAL */
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
Manual
|
||||||
|
Kernel_23
|
||||||
|
STL_Extension
|
||||||
|
Algebraic_foundations
|
||||||
|
Circulator
|
||||||
|
Stream_support
|
||||||
|
Polygon
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
/*!
|
||||||
|
\example Polygon_repair_2/repair_polygon_2.cpp
|
||||||
|
*/
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,16 @@
|
||||||
|
# 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_repair_2_Examples)
|
||||||
|
|
||||||
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
|
# 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()
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
#include <CGAL/Polygon_2.h>
|
||||||
|
#include <CGAL/Polygon_with_holes_2.h>
|
||||||
|
#include <CGAL/Polygon_repair_2/repair.h>
|
||||||
|
#include <CGAL/IO/WKT.h>
|
||||||
|
|
||||||
|
|
||||||
|
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||||
|
typedef CGAL::Polygon_2<K> Polygon_2;
|
||||||
|
typedef CGAL::Polygon_with_holes_2<K> Polygon_with_holes_2;
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
std::ifstream ifs( (argc==1)?"data/polygon.wkt":argv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
// Copyright (c) 2023 GeometryFactory. All rights reserved.
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org).
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
|
//
|
||||||
|
// Author(s) : Ken Arroyo Ohori
|
||||||
|
//
|
||||||
|
#ifndef CGAL_POLYGON_REPAIR_2_REPAIR_H
|
||||||
|
#define CGAL_POLYGON_REPAIR_2_REPAIR_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Polygon_repair_2.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Polygon_repair_2 {
|
||||||
|
|
||||||
|
} // namespace Polygon_repair_2
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
GeometryFactory (France)
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Package Polygon_repair_2 provides functions to repair polygons.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
GPL (v3 or later)
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
GeometryFactory
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
# 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_repair_2_Examples)
|
||||||
|
|
||||||
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
|
# 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()
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
#include <CGAL/Polygon_2.h>
|
||||||
|
#include <CGAL/Polygon_with_holes_2.h>
|
||||||
|
#include <CGAL/Polygon_repair_2/repair.h>
|
||||||
|
#include <CGAL/IO/WKT.h>
|
||||||
|
|
||||||
|
|
||||||
|
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||||
|
typedef CGAL::Polygon_2<K> Polygon_2;
|
||||||
|
typedef CGAL::Polygon_with_holes_2<K> Polygon_with_holes_2;
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
std::ifstream ifs( (argc==1)?"data/polygon.wkt":argv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue