Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bool docs #2808

Merged
merged 2 commits into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions gdsfactory/boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ def boolean(
) -> Component:
"""Performs boolean operations between 2 Component/Reference/list objects.

``operation`` should be one of {'not', 'and', 'or', 'xor', 'A-B', 'B-A', 'A+B'}.
Note that 'A+B' is equivalent to 'or', 'A-B' is equivalent to 'not', and
'B-A' is equivalent to 'not' with the operands switched

You can also use gdsfactory.drc.boolean_klayout
``operation`` should be one of {'not', 'and', 'or', 'xor', '-', '&', '|', '^'}.
Note that '|' is equivalent to 'or', '-' is equivalent to 'not',
'&' is equivalent to 'and', and '^' is equivalent to 'xor'.

Args:
A: Component(/Reference) or list of Component(/References).
B: Component(/Reference) or list of Component(/References).
operation: {'not', 'and', 'or', 'xor', 'A-B', 'B-A', 'A+B'}.
operation: {'not', 'and', 'or', 'xor', '-', '&', '|', '^'}.
layer1: Specific layer to get polygons.
layer2: Specific layer to get polygons.
layer: Specific layer to put polygon geometry on.
Expand All @@ -40,9 +38,10 @@ def boolean(

Notes:
-----
- 'A+B' is equivalent to 'or'.
- 'A-B' is equivalent to 'not'.
- 'B-A' is equivalent to 'not' with the operands switched.
- '|' is equivalent to 'or'.
- '-' is equivalent to 'not'.
- '&' is equivalent to 'and'.
- '^' is equivalent to 'not'.

.. plot::
:include-source:
Expand Down
Loading