Skip to content

Document Sketch.arc overloads - #2120

Open
lucas-santos-f wants to merge 1 commit into
CadQuery:masterfrom
lucas-santos-f:sketch-arc-docs
Open

lucas-santos-f wants to merge 1 commit into
CadQuery:masterfrom
lucas-santos-f:sketch-arc-docs

Conversation

@lucas-santos-f

Copy link
Copy Markdown

Fixes #1663

Only the three-point form of Sketch.arc had a docstring, so the center/radius form shows up in the class reference with no hint of what a and da mean. This adds a docstring to each overload, the way Face.normalAt does it; the multimethod Sphinx extension joins them under a single entry since #1123. The first line stays the generic "Construct an arc.", since that's the summary in the API reference table (see #1088).

  • arc(p1, p2, p3): starts at p1, passes through p2, ends at p3
  • arc(p2, p3): same, starting at the end of the last edge
  • arc(c, r, a, da): a is the start angle in degrees from the x axis, da the angle spanned, counter-clockwise if positive; abs(da) >= 360 gives a full circle

Docstrings only, no code change. Checked locally (Linux, Python 3.13, pip install with cadquery-ocp 8.0.1.1):

  • docs build with Sphinx 9.1.0: same 12 warnings as master, none new; the text shows up under Sketch.arc in the class reference
  • black . --diff --check (cq fork): nothing to reformat
  • pytest -n 8 tests: 900 passed, 3 skipped (two gui tests that only run on Windows, one always skipped)
  • mypy cadquery: same 10 errors as master, all in occ_impl/solver.py (pip casadi)

Not touched here: for abs(da) >= 360 both a and the sign of da are ignored, since Edge.makeCircle builds a full circle without angle1/orientation. So arc((0, 0), 1, 90, 360) starts at (1, 0). I kept the docstring to "a full circle is made" for that case.

AI disclosure: this change was written with the help of Claude Code (Claude Opus 5.5). Happy to adjust anything if needed.

Describe the arguments of the three arc forms, in particular the start
angle and angular span of the center/radius form.

Fixes CadQuery#1663

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.81%. Comparing base (8178185) to head (3f32f76).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2120   +/-   ##
=======================================
  Coverage   95.81%   95.81%           
=======================================
  Files          30       30           
  Lines        9605     9605           
  Branches     1443     1443           
=======================================
  Hits         9203     9203           
  Misses        247      247           
  Partials      155      155           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is no sufficient document for Sketch's arc function.

1 participant