Geometry2D
polygon boolean operations still use old Clipper1 library
#90103
Labels
Milestone
Geometry2D
polygon boolean operations still use old Clipper1 library
#90103
Tested versions
4.3dev
System information
Windows 10
Issue description
I create this issue so the upgrade does not get forgotten again.
The
Geometry2D
class (and theSprite2D editor
as the only other user for that matter) still use olderClipper1
library for the polygon operations.Clipper2
is part of Godot since version 4.2 as it was needed for the 2D navigation mesh baking.According to the developer (and own testing) there is no reason to not upgrade:
Clipper2 is a lot faster and scales better with complexity than Clipper1 which means runtime Geometry2D ops are less likely to cause performance issues and have less errors.
Steps to reproduce
Replace Clipper1 code found in
core/math/geometry_2d.cpp
with Clipper2 functions and look out for regressions in the results.The functions that need the upgrade are
_polypaths_do_operation()
and_polypath_offset()
.Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: