Overview

Apath2D would sometimes return incorrect or inconsistent results when asking whether it contains a point or not.

It has been updated to have fewer errors and more consistent behavior when the point lies on the edge of it. This may in rare cases cause issues in code that relied on the incorrect behavior. Fixing these issues should lead to CET having fewer unexpected issues overall.

Compile Time Changes

class APath2D

The area method in APath2D has now been implemented.

public double area() {

Therefore, this approximate area method has been removed.

Removed: extend public double area(angle arcResolution=15 deg, double deviationTol=0.1) {

Runtime/Behavior Changes

public int insideCount(point2D dp, vector2D direction, double r=0) { is used to determine whether a point2D lies inside or outside the shape. Previously it would in rare cases indicate that it was inside while clearly outside and vise versa. It would also not return consistent results when the point was on the edge of the shape.

For example, a pyramid-shaped triangle with its tip pointing to the right would consider a point one meter to the right of its tip to be inside of the triangle. This is no longer the case.

This change is not likely to cause issues in common use cases. However, it can be good to smoke test functionality that heavily relies on APath2D or its derivatives.