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

Function chamfer

cadquery/occ_impl/shapes.py:6883–6903  ·  view source on GitHub ↗

Chamfer selected edges in a given shell or solid.

(
    s: Shape,
    edges: Shape,
    d: float,
    history: History | None = None,
    name: str | None = None,
)

Source from the content-addressed store, hash-verified

6881
6882
6883def chamfer(
6884 s: Shape,
6885 edges: Shape,
6886 d: float,
6887 history: History | None = None,
6888 name: str | None = None,
6889) -> Shape:
6890 """
6891 Chamfer selected edges in a given shell or solid.
6892 """
6893
6894 builder = BRepFilletAPI_MakeChamfer(_get_one(s, ("Shell", "Solid")).wrapped,)
6895
6896 for el in _get_edges(edges.edges()):
6897 builder.Add(d, el.wrapped)
6898
6899 builder.Build()
6900
6901 _update_history(history, name, [s, edges], builder)
6902
6903 return _compound_or_shape(builder.Shape())
6904
6905
6906def extrude(

Callers 1

test_chamferFunction · 0.85

Calls 5

_get_oneFunction · 0.85
_get_edgesFunction · 0.85
_update_historyFunction · 0.85
_compound_or_shapeFunction · 0.85
edgesMethod · 0.45

Tested by 1

test_chamferFunction · 0.68