star-cpr

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

commit 75448a6615b0153519dd5ccdf65e3ed3f8f3f11b
parent 2835f6ee3193cd1914f71daa53780630fc1b0f34
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue,  4 Oct 2022 18:39:13 +0200

Improve polygon comparison

Diffstat:
Msrc/scpr_polygon.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/scpr_polygon.c b/src/scpr_polygon.c @@ -346,7 +346,14 @@ scpr_polygon_eq *is_eq = 0; goto exit; } + if(!d2_eq(polygon1->lower, polygon2->lower) + || !d2_eq(polygon1->upper, polygon2->upper)) + { + *is_eq = 0; + goto exit; + } + /* Check actual coordinates */ matched = (char*)calloc(sz, sizeof(*matched)); FOR_EACH(i, 0, sz) { if(!one_path_is_eq(&polygon1->paths, &polygon2->paths.at(i), matched)) {