From a8a8e5396e4aacabb7291fac3f96c0eca6409f4e Mon Sep 17 00:00:00 2001 From: Pranjal Bhatia <233476158+pranjalbhatia710@users.noreply.github.com> Date: Sat, 5 Sep 2026 19:57:07 +0400 Subject: [PATCH] docs: mention selector chaining --- doc/selectors.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/selectors.rst b/doc/selectors.rst index 323826cd0..979760547 100644 --- a/doc/selectors.rst +++ b/doc/selectors.rst @@ -38,6 +38,21 @@ Selectors can be combined logically, currently defined operators include **and** result = cq.Workplane("XY").box(2, 2, 2).edges("|Z and >Y").chamfer(0.2) +Selector methods can also be chained. Each selector runs against the objects selected by +the previous step, which is useful when the selection needs to move across shape types. +For example, this selects the top face first and then selects the positive-Y edge of +that face before applying a chamfer: + +.. cadquery:: + + result = ( + cq.Workplane("XY") + .box(2, 2, 2) + .faces(">Z") + .edges(">Y") + .chamfer(0.2) + ) + Much more complex expressions are possible as well: .. cadquery::