Skip to main content

fillet_sheet_edges

Function fillet_sheet_edges 

Source
pub fn fillet_sheet_edges(
    model: &mut Model,
    sheet: &Shape,
    edges: &[Shape],
    radius: f64,
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

Round edges of a sheet where two of its faces meet, with a rolling ball of radius.

The ball rolls on the concave side of each corner: the side where the two faces make an angle under a half turn. Each of the two faces is rebuilt on its own surface without the strip between the edge and the line the ball touches it along, and the round, tangent to both, fills the gap, sharing an edge with each. Its normal follows the sheet’s: where the faces’ normals point into the corner, the round’s points to the ball’s centre.

The round’s surface:

  • between two planes, or planes and cylinders all along the straight edge’s direction, a cylinder of radius along it;
  • between planes square to an axis and cylinders, cones, spheres and tori about it, meeting along a circle or arc about the axis, a torus about the axis with radius for its tube;
  • otherwise (B-spline, swept or other faces, or an edge with no closed form) a B-spline surface fitted through the ball’s arcs as it is marched along an open edge, its borders the lines of contact, within two tenths of a micron at unit scale; the edges it shares are widened to say so.

The round ends in the ball’s section at each end of an open edge (the plane square to a straight edge, the half-plane through the axis of an arc, the march’s section elsewhere), and those ends become part of the sheet’s free boundary. A closed edge is rounded all the way round.

Edges are rounded one after another, each on the sheet the previous one left, so two rounds may trim the same face from different sides.

A placed sheet, a sheet with a placed face, or a placed edge to round (a sheet placed inside a compound and explored from it) is read where it stands: the sheet is first rebuilt with its placements baked in, and that rebuilt sheet is rounded, its edges new nodes on the same geometry. Placed edges elsewhere on a face’s boundary (a prism’s far end edges) are restated where the face is rebuilt.

History: the sheet is modified into the result; every rebuilt face and every shortened boundary edge is modified into its new self; each rounded edge is deleted and generates its round; where the sheet was baked first, every other face and edge is modified into its baked twin.

§Errors

OgeomError::Construction, by name, where:

  • radius is not a positive length, or edges is empty;
  • sheet is not a shell;
  • an edge is not an edge of the sheet with a face on each side (a free edge, an edge of three faces, an edge an earlier round in the same call consumed);
  • a face beside an edge runs along it twice;
  • the two faces continue each other, fold onto each other, or are oriented inconsistently across the edge;
  • no ball of radius seats in the corner, a ball does not fit inside a curved face it rolls on, it touches the faces at the ends of a diameter, or its round would be a torus crossing its own axis;
  • the edge is closed and its round would have to be marched;
  • the ball does not seat between the faces at an end of a marched edge;
  • at an end of the edge, a face’s boundary does not leave it along an edge of the sheet’s free boundary lying in the round’s end section (for two planes, square to the edge and straight), or other faces meet there too;
  • the ball sets back past the far end of a face’s boundary edge, or some other part of a face’s boundary comes within reach of the strip the round takes (checked against a sampled distance held low by the sampling step, so an edge only near the strip may be refused).

OgeomError::NotDone where a march gives too few stations or its band misses its fit target.