Intersect two shapes.
(
s1: Shape,
s2: Shape,
tol: float = 0.0,
glue: GlueLiteral = None,
history: History | None = None,
name: str | None = None,
)
| 6725 | |
| 6726 | |
| 6727 | def intersect( |
| 6728 | s1: Shape, |
| 6729 | s2: Shape, |
| 6730 | tol: float = 0.0, |
| 6731 | glue: GlueLiteral = None, |
| 6732 | history: History | None = None, |
| 6733 | name: str | None = None, |
| 6734 | ) -> Shape: |
| 6735 | """ |
| 6736 | Intersect two shapes. |
| 6737 | """ |
| 6738 | |
| 6739 | builder = BOPAlgo_BOP() |
| 6740 | builder.SetOperation(BOPAlgo_COMMON) |
| 6741 | |
| 6742 | _set_glue(builder, glue) |
| 6743 | _set_builder_options(builder, tol) |
| 6744 | |
| 6745 | builder.AddArgument(s1.wrapped) |
| 6746 | builder.AddTool(s2.wrapped) |
| 6747 | |
| 6748 | builder.Perform() |
| 6749 | |
| 6750 | _update_history(history, name, [s1, s2], builder) |
| 6751 | |
| 6752 | return _compound_or_shape(builder.Shape()) |
| 6753 | |
| 6754 | |
| 6755 | def split( |