Skip to main content

fit_loop_quads

Function fit_loop_quads 

Source
pub fn fit_loop_quads(
    model: &mut Model,
    sides: &[LoopSide],
    spokes: &[Vec<Point>],
    points: &PointIndex,
    options: &NetworkOptions,
    tol: Tolerances,
) -> OgeomResult<Network>
Expand description

Fill a closed loop of sides with one four-sided patch per corner of the loop, every side held exactly and held across as it says.

Each side is split at the middle of its range; a spoke runs from each side’s middle to a centre, every spoke ending there (spokes[i] from side i‘s middle to the centre, drawn on the shape the points sample). The patch at the corner between side i and side i + 1 is bounded by the second half of side i, the first half of side i + 1 and the two spokes from their middles: the n-sided fill as quads round a centre. The halves are held to the sides’ curves (NetworkOptions::held) and held across them (NetworkOptions::across), so every patch meets its sides’ supports tangent exactly, up to the halves’ own projection; the spokes and the centre are fitted and held tangent as any network’s curves and corners are. The caller’s held and across are replaced.

§Errors

OgeomError::Construction for fewer than three sides, a spoke count other than the sides’, or a range that runs nowhere; as fit_network otherwise.