Subtract two shapes.
(
s1: Shape,
s2: Shape,
tol: float = 0.0,
glue: GlueLiteral = None,
history: History | None = None,
name: str | None = None,
)
| 6697 | |
| 6698 | |
| 6699 | def cut( |
| 6700 | s1: Shape, |
| 6701 | s2: Shape, |
| 6702 | tol: float = 0.0, |
| 6703 | glue: GlueLiteral = None, |
| 6704 | history: History | None = None, |
| 6705 | name: str | None = None, |
| 6706 | ) -> Shape: |
| 6707 | """ |
| 6708 | Subtract two shapes. |
| 6709 | """ |
| 6710 | |
| 6711 | builder = BOPAlgo_BOP() |
| 6712 | builder.SetOperation(BOPAlgo_CUT) |
| 6713 | |
| 6714 | _set_glue(builder, glue) |
| 6715 | _set_builder_options(builder, tol) |
| 6716 | |
| 6717 | builder.AddArgument(s1.wrapped) |
| 6718 | builder.AddTool(s2.wrapped) |
| 6719 | |
| 6720 | builder.Perform() |
| 6721 | |
| 6722 | _update_history(history, name, [s1, s2], builder) |
| 6723 | |
| 6724 | return _compound_or_shape(builder.Shape()) |
| 6725 | |
| 6726 | |
| 6727 | def intersect( |