star-cpr

Clip 2D meshes with 2D polygons
git clone git://git.meso-star.fr/star-cpr.git
Log | Files | Refs | README | LICENSE

commit 4c04a188297bd619f00b542cbafbe98a110888f8
parent ae39107e71b68f3f701c943580d96ae8ea74357b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon,  6 May 2024 16:18:11 +0200

Update the README file

Add "Requirements" and complete rewrite the installation section
regarding the use of a POSIX Makefile and no longer CMake as the first
build system.

Finally wrap the text in 72 columns. This matches the convention of
plain text e-mails. So, it can be sent as a publication announcement
e-mail without being reformatted.

Diffstat:
MREADME.md | 78++++++++++++++++++++++++++++++++++++++++++------------------------------------
1 file changed, 42 insertions(+), 36 deletions(-)

diff --git a/README.md b/README.md @@ -1,24 +1,26 @@ # Star-CliPpeR -This library clips triangulated 2D meshes against 2D polygons. Two clipping -operations between the mesh and the clipping region are provided: the -subtraction and the intersection. The former removes the clipping region from -the original mesh while the latter keeps only the mesh part that intersects the -clipping polygon. - -## How to build - -The library uses [CMake](http://www.cmake.org) and the -[RCMake](https://gitlab.com/vaplv/rcmake/#tab-readme) package to build. It also -depends on the -[Clipper2](https://github.com/AngusJohnson/Clipper2), -[Polygon](https://gitlab.Com/vaplv/polygon/#tab-readme) and -[RSys](https://gitlab.com/vaplv/rsys/#tab-readme) libraries. - -First ensure that CMake is installed on your system. Then install the RCMake -package as well as all the aforementioned prerequisites. Then generate the -project from the `cmake/CMakeLists.txt` file by appending to the -`CMAKE_PREFIX_PATH` variable the install directories of its dependencies. +This library clips triangulated 2D meshes against 2D polygons. Two +clipping operations between the mesh and the clipping region are +provided: the subtraction and the intersection. The former removes the +clipping region from the original mesh while the latter keeps only the +mesh part that intersects the clipping polygon. + +## Requirements + +- C++ compiler (C++17) +- POSIX make +- pkg-config +- [Clipper2](https://github.com/AngusJohnson/Clipper2), +- [Polygon](https://gitlab.com/vaplv/polygon) +- [RSys](https://gitlab.com/vaplv/rsys) +- C compiler (optional for tests) + +## Installation + +Edit config.mk as needed, then run: + + make clean install ## Release notes @@ -28,17 +30,18 @@ project from the `cmake/CMakeLists.txt` file by appending to the ### Version 0.4 -- Add scpr_is_vertex_in_component, scpr_is_component_in_component and - scpr_get_vertex_in_component to check for polygons inclusion. -- Add scpr_polygon_is_component_cw and scpr_polygon_reverse_component API calls - to manage polygon orientation. +- Add `scpr_is_vertex_in_component`, `scpr_is_component_in_component` + and `scpr_get_vertex_in_component` to check for polygons inclusion. +- Add `scpr_polygon_is_component_cw` and + `scpr_polygon_reverse_component` API calls to manage polygon + orientation. - Fix OBJ output. ### Version 0.3 - Add functions to detect polygons intersections. At this stage, only - intersections of segments ares detected (neither "vertex on a segment", nor - "polygons sharing a vertex" are detected). + intersections of segments ares detected (neither "vertex on a + segment", nor "polygons sharing a vertex" are detected). - Add a device to hold library settings; this breaks the whole API. - Change internals to use integer representation for polygons. - Improve out-of-range detection. @@ -46,22 +49,24 @@ project from the `cmake/CMakeLists.txt` file by appending to the ### Version 0.2 -- Switch Clipper library to Clipper2. This increases requirements on compiler to - C++17. -- Allow complex polygons (polygons with multiple components, defining holes). +- Switch Clipper library to Clipper2. This increases requirements on + compiler to C++17. +- Allow complex polygons (polygons with multiple components, defining + holes). - Add a function to offset polygons. -- Make constraints on coordinates explicit: limited range and limited precision. +- Make constraints on coordinates explicit: limited range and limited + precision. ### Version 0.1.3 -- Sets the CMake minimum version to 3.1: since CMake 3.20, version 2.8 has - become obsolete. +- Sets the CMake minimum version to 3.1: since CMake 3.20, version 2.8 + has become obsolete. - Fix compilation warnings detected by gcc 11. ### Version 0.1.2 -Update CMake module of the Clipper library: on GNU/Linux, make optional the -debug version of the library. +Update CMake module of the Clipper library: on GNU/Linux, make optional +the debug version of the library. ### Version 0.1.1 @@ -70,7 +75,8 @@ Update the version of the RSys dependency to 0.6: replace the deprecated ## License -Copyright (C) 2016-2018, 2021 |Meso|Star> (<contact@meso-star.com>). -Star-CliPpeR is free software released under the GPL v3+ license: GNU GPL -version 3 or later. You are welcome to redistribute it under certain +Copyright (C) 2016-2018, 2021 |Meso|Star> (contact@meso-star.com) + +Star-CliPpeR is free software released under the GPL v3+ license: GNU +GPL version 3 or later. You are welcome to redistribute it under certain conditions; refer to the COPYING file for details.