Skip to content
brep-conformancegithub

fillet

Blends · api.md § fillet · all operations

fillet(s: Solid, edges: list<Point3>, radius: Length) -> Solid

Rounds edges. Each named edge is replaced by the surface that a ball of radius sweeps as the ball rolls along the edge, touching both faces that meet there.

edges must name one edge or more, radius must be positive, and the ball must fit. The ball fits when its contact with each face stays on that face, except where the fillet swallows a face as described below. At a convex edge, the result is s less the material between the ball's sweep and the edge. At a concave edge, the result is s with the space between the ball's sweep and the edge filled. Where the two faces are planes, or surfaces of revolution meeting round a circle, the section across the edge is the circle of radius tangent to both faces' traces. s is left as it was.

A fillet swallows a face too narrow for its ball. Take a narrow face N between two faces A and B, with both of N's edges named: the edge N shares with A and the edge N shares with B. A small enough ball rolls along each edge in turn, touching A and N along the first edge and N and B along the second, and leaves a strip of N between two fillets. A ball too big for that cannot touch N at all. Resting against A and B at once, the ball bridges over N. The ball then rolls touching A and B alone, and makes one fillet from A to B. For this, A and B are each continued past the edge shared with N, as if N were not there. N lies wholly in the material the ball's sweep removes, so none of N is left. The result is the same as the result of fillet on the solid in which A and B run on to meet in a single edge, with that edge named. For example, a corner chamfered by a hair, with both edges of the chamfer filleted, gives the same result as the sharp corner filleted.

Where named convex edges meet at a corner, the corner is what the balls touching the edges' faces leave. Filleting every edge of a convex solid, or every convex edge of a prism whose concave edges all run along its axis, gives the union of the balls of radius inside s. A box with all twelve edges filleted by r is the box made r smaller on every side and then swelled by r. Other corners are not yet specified. Whatever closes such a corner, a fillet leaves no crease. Where the boundary of the result is not the boundary of s, the boundary of the result has a tangent plane, and shares that tangent plane with each face it meets. A fillet changes nothing farther than twice the radius from the named edges. Where a motion leaves s and the named edges as they were round a blend, the motion also leaves the result as it was there, within a thousandth of the radius.

Example. Solid 1 is a 10 × 20 × 30 mm box with one corner at the origin. The point names its vertical edge at the origin.

> {"cmd": "fillet", "s": 1, "edges": [[0, 0, 15]], "radius": 2}
< {"ok": 2}

An edge is named by a point on it. Each point names the edge of s that passes within 10·ε of the point, where ε is the suite's tolerance of 1e-7 mm. A call with a point that names no edge refuses. Naming an edge by a point does not depend on how any kernel numbers or labels its topology, and a test can compute such a point from the solid's definition.

A blend runs along the whole tangent chain of its edge. The chain is the named edge and every edge reached from it through vertices where the next edge leaves in the direction in which the last edge arrived. The top loop of a prism on a rounded rectangle is one chain, so a point on any edge of that loop blends the whole loop. Following the chain is the work of the function, and so of the kernel. An adapter passes on the edge the point names and no other edge.

FunctionFieldsReturns
fillets, edges, radiusSolid
fillet_radiis, edges, radiiSolid
fillet_variables, edge, from, r_from, r_toSolid
fillet_conics, edges, setback, rhoSolid
fillet_g2s, edges, offset, centerSolid
fillet_setbacks, edges, radius, setbackSolid
fillet_setback_g2s, edges, radius, setbackSolid
fillet_facess, face_a, face_b, radiusSolid
full_rounds, side_a, middle, side_bSolid
chamfers, edges, distanceSolid
chamfer_twos, edge, face, d1, d2Solid
chamfer_distancess, edges, distancesSolid