star-cpr

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

README.md (2821B)


      1 # Star-CliPpeR
      2 
      3 This library clips triangulated 2D meshes against 2D polygons. Two
      4 clipping operations between the mesh and the clipping region are
      5 provided: the subtraction and the intersection. The former removes the
      6 clipping region from the original mesh while the latter keeps only the
      7 mesh part that intersects the clipping polygon.
      8 
      9 ## Requirements
     10 
     11 - C++ compiler (C++17)
     12 - POSIX make
     13 - pkg-config
     14 - [Clipper2](https://github.com/AngusJohnson/Clipper2),
     15 - [Polygon](https://gitlab.com/vaplv/polygon)
     16 - [RSys](https://gitlab.com/vaplv/rsys)
     17 - C compiler (optional for tests)
     18 
     19 ## Installation
     20 
     21 Edit config.mk as needed, then run:
     22 
     23     make clean install
     24 
     25 ## Release notes
     26 
     27 ### Version 0.5.1
     28 
     29   - Upgrade Clipper2 dependency to 1.4.0
     30     Move to the make build system reverted Clipper2 to obsolete 1.1.1
     31 
     32 ### Version 0.5
     33 
     34 - Replace CMake with POSIX make as build system.
     35 - Provide a pkg-config file to link the library as an external
     36   dependency.
     37 - Add compiler and linker flags to increase the security and robustness
     38   of the generated library.
     39 
     40 ### Version 0.4.1
     41 
     42 - Upgrade Clipper2 dependency to 1.3.0.
     43 
     44 ### Version 0.4
     45 
     46 - Add `scpr_is_vertex_in_component`, `scpr_is_component_in_component`
     47   and `scpr_get_vertex_in_component` to check for polygons inclusion.
     48 - Add `scpr_polygon_is_component_cw` and
     49   `scpr_polygon_reverse_component` API calls to manage polygon
     50   orientation.
     51 - Fix OBJ output.
     52 
     53 ### Version 0.3
     54 
     55 - Add functions to detect polygons intersections. At this stage, only
     56   intersections of segments ares detected (neither "vertex on a
     57   segment", nor "polygons sharing a vertex" are detected).
     58 - Add a device to hold library settings; this breaks the whole API.
     59 - Change internals to use integer representation for polygons.
     60 - Improve out-of-range detection.
     61 - Upgrade Clipper2 to 1.2.0
     62 
     63 ### Version 0.2
     64 
     65 - Switch Clipper library to Clipper2. This increases requirements on
     66   compiler to C++17.
     67 - Allow complex polygons (polygons with multiple components, defining
     68   holes).
     69 - Add a function to offset polygons.
     70 - Make constraints on coordinates explicit: limited range and limited
     71   precision.
     72 
     73 ### Version 0.1.3
     74 
     75 - Sets the CMake minimum version to 3.1: since CMake 3.20, version 2.8
     76   has become obsolete.
     77 - Fix compilation warnings detected by gcc 11.
     78 
     79 ### Version 0.1.2
     80 
     81 Update CMake module of the Clipper library: on GNU/Linux, make optional
     82 the debug version of the library.
     83 
     84 ### Version 0.1.1
     85 
     86 Update the version of the RSys dependency to 0.6: replace the deprecated
     87 `[N]CHECK` macros by the new macro `CHK`.
     88 
     89 ## License
     90 
     91 Copyright (C) 2016-2018, 2021-2024 |Méso|Star> (contact@meso-star.com)
     92 
     93 Star-CliPpeR is free software released under the GPL v3+ license: GNU
     94 GPL version 3 or later. You are welcome to redistribute it under certain
     95 conditions; refer to the COPYING file for details.