Skip to main content

round_vertex_setback_sharp

Function round_vertex_setback_sharp 

Source
pub fn round_vertex_setback_sharp(
    model: &mut Model,
    solid: &Shape,
    vertex: &Shape,
    sharp: &Shape,
    radius: f64,
    setbacks: &Setbacks,
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

Round the edges of vertex other than sharp with bands at radius, each stopped at its setback, and close the opening between them with a patch that runs into the point sharp’s setback names on it.

The vertex is one of three planar faces and three straight edges, a convex corner one ball touches every face of (a box’s corner). The two bands are cut square to their edges at their setbacks; the sharp edge is cut at its own setback, at Q. On the face between the two bands the trim is the conic tangent to both rails, as round_vertex_setback trims; on each face of the sharp edge the trim is the conic from Q tangent to the band’s rail, heading from Q for that rail half way back to the vertex.

The opening is closed by two patches. At Q, a three-sided one bounded by the halves of the two trims from Q and a curve between their middles, its fourth side shrunk to Q: fitted by ogeom_algo::fit_network to arcs swept from Q that leave each trim square across it in its face, its halves of the trims held to them and held across the two faces, so it is tangent to each face exactly up to the held curves’ own projection, its normal turning at Q from one face’s to the other’s. Over the rest, one patch from make_filling_n meeting the two bands’ end arcs, the trims and the patch at Q at G1, to the bands’ fit target. Where it misses, or the patch at Q folds its normal back at Q, the arcs are drawn fuller or flatter and the two patches fitted again.

§Errors

OgeomError::Construction where radius or a setback is not a positive length, a setback is shorter than the ball’s own along a rounded edge or reaches past an edge’s far end, the sharp edge’s setback lies inside the bands’ own corner, the continuity is not G1, sharp does not leave the vertex, or the vertex is not a convex planar corner of three edges one ball touches every face of; OgeomError::NotDone where, however its arcs are drawn, the rest misses the bands’ fit target or the patch at Q folds its normal back.