Skip to content

docs: explain Workplane tag and end usage#2044

Open
pranjalbhatia710 wants to merge 3 commits into
CadQuery:masterfrom
pranjalbhatia710:docs/tag-end-workplane-666
Open

docs: explain Workplane tag and end usage#2044
pranjalbhatia710 wants to merge 3 commits into
CadQuery:masterfrom
pranjalbhatia710:docs/tag-end-workplane-666

Conversation

@pranjalbhatia710

Copy link
Copy Markdown

Closes #666.

This adds a small Workplane docs section for the two stack helpers called out in the issue:

  • explains how end() returns to the parent Workplane after a selection
  • explains how tag() stores a stable Workplane reference in the modelling context
  • shows a short example that tags mating-style faces, returns to the base part, and later selects from the tagged Workplanes with the selector tag argument

Validation:

  • python3 AST parse of the added code snippets
  • git diff --check

I could not run the full Sphinx docs build locally because the checkout does not currently have CadQuery's runtime/doc dependencies installed (import cadquery fails on missing runtype).

@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.70%. Comparing base (9633409) to head (d8e7cef).
⚠️ Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2044      +/-   ##
==========================================
+ Coverage   95.64%   95.70%   +0.05%     
==========================================
  Files          30       30              
  Lines        8962     9447     +485     
  Branches     1328     1406      +78     
==========================================
+ Hits         8572     9041     +469     
- Misses        240      252      +12     
- Partials      150      154       +4     

☔ 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.

@jmwright

jmwright commented Jul 9, 2026

Copy link
Copy Markdown
Member

@pranjalbhatia710 Thanks for taking this on.

To fully close #666 two more pieces are needed in the docs:

  1. end(n) with a count - end takes an integer, and the issue mentions wanting to walk back through a multi-step selection with something like .end(3).
  2. workplaneFromTagged - Where a tag is used to create a new workplane.

This could be merged as-is without closing #666 but it would be nice to have mentions/examples of those two items.

The section titled Chaining is right after your section, but it conceptually introduces tags in its last sentence. That would be a nice transition into your section, so I would suggest moving your section directly after Chaining.

@pranjalbhatia710

Copy link
Copy Markdown
Author

Thanks for the review — I pushed f70dee7 to cover both remaining pieces from #666:

  • notes that end(n) can walk back multiple parents, with an .end(3) example
  • adds a workplaneFromTagged("right_face") example showing how to start another feature from a tagged workplane

Validation:

git diff --check
# no output

I kept this in the existing Tagging Workplanes section so it does not expand the separate Chaining section further.

@pranjalbhatia710

Copy link
Copy Markdown
Author

Thanks — I pushed d8e7cef to apply the placement suggestion as well. The Chaining overview now stays first, and the Tagging Workplanes section follows it directly as the transition into tags/end/workplaneFromTagged examples.

Validation:

git diff --check
# no output

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.

Cover end and tag in docs

2 participants