ansys/pyansys-geometry

``sketch.arc(...)`` and ``Arc`` have different signatures - should align

Closed this issue · 0 comments

Detected by @voglster

sketch.arc(...)'s signature is as follows: (i.e. start, end, center)

image

Whereas the Arc class constructor is defined as: (i.e. center, start, end)

image

We should align both of them so that they do not create confusion since we were testing the following and it failed:

def test_sketch_pyconus2024_voglster():
    """Test sketching error observed in PyConUS 2024 by @voglster."""

    sketch = Sketch()
    # User expected API to be center, start, end... whereas it was really start, end, center
    sketch.arc(Point2D([0, 0]), Point2D([1, 0]), Point2D([-1, 0]))

Both APIs should have the same order of arguments to avoid confusion.

Thanks again @voglster for reporting!!