Upd 09/08/25
Both bugs present in 14.3.0.0/Windows.
Bug 2:
Sometimes, WindingPolygon inverts the result.
w = 1.75; pts = Reverse@{{-3, -3}, {-w, -3}, {-w, 3}, {-3, 3}, {-3, w}, {3, w}, {3, 3}, {w, 3}, {w, -3}, {3, -3}, {3, -w}, {-3, -w}}; tstPts = .5 {{0, 0}, {-3 - w, -3 - w}, {3 + w, -3 - w}, {3 + w, 3 + w}, {-3 - w, 3 + w}}; WindingCount[Line@Append[pts, pts[[1]]], tstPts] Show[ Graphics@Line@Append[pts, pts[[1]]], Graphics@WindingPolygon[pts, "PositiveRule"], Graphics@{Red, PointSize[Large], Point@tstPts} ] This looks just as expected:
However, for w=1.25 (and for any w <=1.5), WindingPolygon inverts the result:
Notice that WindingCount is the same and correct in both cases.
Tested in WM 14.1 and 14.2 // Windows.
Is there a workaround?
Bug 1:
WindingPolygon over a self-intersection contour with intersecting collinear segments
Consider this self-intersecting polygon:
pts = {{0, -550}, {827, -550}, {1188, -188}, {800, 200}, {411, -188}, {772, -550}, {2150, -550}, {2150, 1150}, {150, 1150}}; Show[ Graphics@Line@Append[pts, pts[[1]]], MapThread[Callout, {pts, Range[9]}] // ListPlot ] Notice that segments 1-2 and 6-7 are collinear and intersecting.
Graphics@WindingPolygon[pts] produces a bug: 
Tested in 14.2, 14.1, 13.3.1 Windows 10 and 14.2 mac.
Question: Is there a workaround?




pts+=RandomReal[10^-12 {-1, 1}, {9, 2}]but it appears to be a bug. please report to Wolfram. $\endgroup$