Skip to main content

chamfer_edges_with

Function chamfer_edges_with 

Source
pub fn chamfer_edges_with(
    model: &mut Model,
    solid: &Shape,
    specs: &[(Shape, Chamfer)],
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

Bevel several edges of a solid as one operation, each with its own chamfer.

The whole request is read on the solid as it stands before the call, so the result is the same for every order of specs. Where two bevels meet at a vertex they mitre along the line their planes share, with neither a step nor a cap, at a face’s reflex corner as at a convex one. Where three or more meet, the vertex is closed by the facet through the points where their contact lines cross on the faces round it (ChamferCorner::Facet); the mitre of their planes is chamfer_edges_cornered with ChamferCorner::Point.

A solid bounded by planes is chamfered by the blend engine in one pass: every face set back from its bevelled edges, every bevel the plane between its two setback lines, every vertex of three bevels its facet. A request past what its faces hold (a face its setbacks consume), and any other solid, are chamfered by wedges built on the solid as given and applied together, mitred where bevels meet.

A seam is no edge of the part’s form: an edge between two faces of one shell lying on one surface facing one way (ogeom_heal::same_domain), as a boolean leaves where it joined two flats, the surface running on across it and the material on one side. Mainstream CAD merges such faces after the boolean, so the edge cannot be picked; here a spec naming one names nothing and is passed over, and a request naming nothing but seams returns the solid as it is. A solid holding seams is read by the blend engine with them dissolved, as ogeom_heal::unify_same_domain and ogeom_heal::merge_edges merge them: the faces on one plane come out one face, the pieces of an edge split along its length one bevel, and the history tells of the solid as given (each face modified into the face holding it, each seam and each vertex the seams left inside an edge deleted). Coplanar faces facing opposite ways, the material changing side across the edge between them, meet at a real edge.

What solid shares with other shapes is copied before it is worked on (ogeom_algo::on_own_nodes), which leaves them as they are.

§Errors

As chamfer_edge, chamfer_edge_distances and chamfer_edge_angle per edge, judged on the solid as it stands before the call; and OgeomError::Construction if no edges are given.