pub fn sphere_solid<S: Scalar>(
part: &mut Part<S>,
name: &str,
center: Vector3<S>,
radius: S,
) -> GeopResult<SolidId>Expand description
A sphere of radius centered at center, built as exactly 8 real
degree-(2, 2) quadrant faces (no leftover degenerate one) — one column
(a north + a south quadrant) at a time, around 4 meridians: mvfs plus
two mves bootstrap the very first meridian (pole -> equator ->
pole, i.e. the profile, each half an exact 90-degree arc), then per
remaining meridian, one mve grows the equator “beam” (also an exact
arc) to it and two mefs close off that column’s north and south
quadrant. The very last meridian is the first one again (its own
closing mef’s new edge is the last beam) closing the loop, so its
own closing needs only a single mef (the north quadrant) — the south
one is already exactly the boundary still left on the placeholder face,
which just needs replace_face to become real.
Named as the operation sphere(name): the poles N(north)/N(south),
the equator’s vertices N(equator,a0..a3) at angles a0 (+x), a1
(+y), …, its quarter arcs N(equator,q0..q3) (q0 from a0 to
a1, …), the meridian arcs N(north,a0..)/N(south,a0..) from the
equator to each pole, and the eight quadrant faces
N(north,q0..)/N(south,q0..).