You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function clip_polyline_with_polygon gives inconsistent results regarding the position of the polyline and the polygon involved in the clipping.
When the triangle is above the horizontal line and they cross exactly at one point the clipping results in 2 lines. Which is good.
Whereas the result is 0 (no clipping/no crossing) when the triangle is below the horizontal line even though they cross at exactly one point.
Steps to reproduce
The MRP set up a simple scene with 2 polygons and 2 lines where polygons and lines cross. In one situation the clipping works but not in the other one.
Prints display points informations to show the inconsistency where both clipping result should be 2.
Thanks for the clear MRP! Updating Clipper1 to Clipper2 as in #90153 fixes the direction of the clipped lines, and it makes the clipping of the line by the lower triangle result in one line, the original line. So it still doesn't fix this issue, but it's a small step in the right direction.
Tested versions
System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz (4 Threads)
Issue description
The function clip_polyline_with_polygon gives inconsistent results regarding the position of the polyline and the polygon involved in the clipping.
When the triangle is above the horizontal line and they cross exactly at one point the clipping results in 2 lines. Which is good.
Whereas the result is 0 (no clipping/no crossing) when the triangle is below the horizontal line even though they cross at exactly one point.
Steps to reproduce
The MRP set up a simple scene with 2 polygons and 2 lines where polygons and lines cross. In one situation the clipping works but not in the other one.
Prints display points informations to show the inconsistency where both clipping result should be 2.
Minimal reproduction project (MRP)
TestClipPolyline.zip
The text was updated successfully, but these errors were encountered: