doc: sketch constraint example uses "Fixed", which the constraint table below it does not list

Open Beginner friendly
#2,077 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Open doc/sketch.rst and inspect the "constraint-based sketching" section, its worked example, and the following constraint table. Confirm the documented spelling and argument form against the example, then make the example and table consistent in the direction maintainers choose. Verify the rendered Sketch documentation and example wording afterward.

Written by the indexing model from the issue text.

Description

Where

The Sketch chapter, "constraint-based sketching" section (doc/sketch.rst, rendered at https://cadquery.readthedocs.io/en/stable/sketch.html). Observed on the stable build (v2.8.0, commit fb4c6d4).

The inconsistency

The worked example constrains with "Fixed":

result = (
    cq.Sketch()
    .segment((0, 0), (0, 3.0), "s1")
    .arc((0.0, 3.0), (1.5, 1.5), (0.0, 0.0), "a1")
    .constrain("s1", "Fixed", None)
    .constrain("s1", "a1", "Coincident", None)
    .constrain("a1", "s1", "Coincident", None)
    .constrain("s1", "a1", "Angle", 45)
    .solve()
    .assemble()
)

Two paragraphs below, the "Following constraints are implemented" table lists FixedPoint, Coincident, Angle, Length, Distance, Radius, Orientation, ArcAngleFixed is not in the table, and FixedPoint's documented argument (None for arc center or a 0..1 float) is not what the example passes.

A reader can't tell whether Fixed is an undocumented alias, a distinct constraint the table omits, or something deprecated that the example should stop using.

Measured on 2.8.0 (this is how the inconsistency was found)

Running the example verbatim on cadquery 2.8.0 / Python 3.12: it executes successfullysolve() converges and assemble() returns a usable face (extrudes to a valid solid). So the example's "Fixed" form is real, working API that the table doesn't document.

Suggestion

Either add a Fixed row to the constraint table (arity 1, argument None, "entity is fully fixed"), or — if FixedPoint is the intended public spelling — update the example to use it with its documented argument form. Happy to PR whichever direction maintainers prefer.

Dominant language
Python
Stars
5.8k
Forks
544
Avg merge
3d 2h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CadQuery/cadquery

All issues in CadQuery/cadquery

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.