MCPcopy
hub / github.com/CadQuery/cadquery / fuse

Function fuse

cadquery/occ_impl/shapes.py:6667–6696  ·  view source on GitHub ↗

Fuse at least two shapes.

(
    s1: Shape,
    s2: Shape,
    *shapes: Shape,
    tol: float = 0.0,
    glue: GlueLiteral = None,
    history: History | None = None,
    name: str | None = None,
)

Source from the content-addressed store, hash-verified

6665
6666
6667def fuse(
6668 s1: Shape,
6669 s2: Shape,
6670 *shapes: Shape,
6671 tol: float = 0.0,
6672 glue: GlueLiteral = None,
6673 history: History | None = None,
6674 name: str | None = None,
6675) -> Shape:
6676 """
6677 Fuse at least two shapes.
6678 """
6679
6680 builder = BOPAlgo_BOP()
6681 builder.SetOperation(BOPAlgo_FUSE)
6682
6683 _set_glue(builder, glue)
6684 _set_builder_options(builder, tol)
6685
6686 builder.AddArgument(s1.wrapped)
6687 builder.AddTool(s2.wrapped)
6688
6689 for s in shapes:
6690 builder.AddTool(s.wrapped)
6691
6692 builder.Perform()
6693
6694 _update_history(history, name, [s1, s2, *shapes], builder)
6695
6696 return _compound_or_shape(builder.Shape())
6697
6698
6699def cut(

Callers 4

test_siblingsFunction · 0.90
__add__Method · 0.85
test_operatorsFunction · 0.85
test_fuse_multiFunction · 0.85

Calls 4

_set_glueFunction · 0.85
_set_builder_optionsFunction · 0.85
_update_historyFunction · 0.85
_compound_or_shapeFunction · 0.85

Tested by 3

test_siblingsFunction · 0.72
test_operatorsFunction · 0.68
test_fuse_multiFunction · 0.68