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

Function imprint

cadquery/occ_impl/shapes.py:6774–6799  ·  view source on GitHub ↗

Imprint arbitrary number of shapes.

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

Source from the content-addressed store, hash-verified

6772
6773
6774def imprint(
6775 *shapes: Shape,
6776 tol: float = 0.0,
6777 glue: GlueLiteral = "full",
6778 history: History | None = None,
6779 name: str | None = None,
6780) -> Shape:
6781 """
6782 Imprint arbitrary number of shapes.
6783 """
6784
6785 builder = BOPAlgo_Builder()
6786
6787 _set_glue(builder, glue)
6788 _set_builder_options(builder, tol)
6789
6790 for s in shapes:
6791 builder.AddArgument(s.wrapped)
6792
6793 builder.Perform()
6794
6795 # fill history if provided
6796 _update_history(history, name, [*shapes], builder)
6797 _update_images(history, builder)
6798
6799 return _compound_or_shape(builder.Shape())
6800
6801
6802def clean(s: Shape) -> Shape:

Callers 3

test_imprintFunction · 0.50
test_imprint_errorFunction · 0.50
test_history_boolFunction · 0.50

Calls 5

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

Tested by 3

test_imprintFunction · 0.40
test_imprint_errorFunction · 0.40
test_history_boolFunction · 0.40