pub fn make_blend_surface(
model: &mut Model,
first: (&Shape, &Shape),
second: (&Shape, &Shape),
continuity: (Continuity, Continuity),
tol: Tolerances,
) -> OgeomResult<Built>Expand description
Bridge the gap between two edges with a blend face.
first and second are each an edge and the face it bounds. The blend
is a B-spline face whose boundary is the two edges, shared as they are,
and two new side edges joining their ends, paired so the sides do not
cross. It meets each face with the continuity asked of that side:
Continuity::C0: along the edge only;Continuity::G1: tangent to the face, its normal within1e-5radians of the face’s at every sampled station;Continuity::G2: tangent as above, and bending alike square to the edge, the two normal curvatures there apart by at most1e-4divided by the gap’s width.
The crossing tangent’s length on each side is the gap’s width, the
distance between the two edges at the same u, so a blend across a
wider stretch of gap swings out further. Joins to planar faces are exact; on a
curved face the knots along the edges are refined until the measured join
is within budget.
A placed edge or face (a prism’s far end edges are its profile’s edges under the prism’s translation) is read where it stands: the face is rebuilt with its placements baked in, and the blend is bounded by the edge’s twin on it, a new edge on the same geometry that sews to the given one.
Each edge gains a trim on the blend’s surface. History: each edge generates the blend face and the two side edges, and its baked twin where it was placed.
§Errors
OgeomError::Construction, by name,
where:
- a continuity is
Continuity::C1,Continuity::C2orContinuity::CInfinity: a blend’s joins are geometric, to G2 at most; - a shape is not an edge or a face, an edge is not on the face given with it, or both are the same edge;
- an edge is degenerate, closed, a seam of its face, or has no trim on its face’s surface;
- an edge’s curve has no exact B-spline form on its own parameter (a circle or an ellipse, whose B-spline form runs on another), so it cannot be shared with the blend exactly;
- the face’s side of an edge cannot be told from its boundary, or the face has no normal at a point of the edge;
- the edges meet at an end, where the blend would have no side;
- on a curved face, the join stays outside its budget after refinement.