pub struct AxialMap { /* private fields */ }Expand description
A taper, a twist or a bend about an axis (see the module’s doc): in the
frame frame at origin — x, y and the axis, orthonormal and
right-handed — the point (x, y, t) goes to x a(t) + y b(t) + c(t)
over the zone start ≤ t ≤ end, columns being [a, b, c] by their
components in the frame. Before and after the zone, the affine map the
law is tangent to at its end.
Implementations§
Source§impl AxialMap
impl AxialMap
Sourcepub fn taper(
origin: Vector3,
axis: &Vector3,
toward: Option<&Vector3>,
zone: (Scalar, Scalar),
factor: Scalar,
) -> GeopResult<Self>
pub fn taper( origin: Vector3, axis: &Vector3, toward: Option<&Vector3>, zone: (Scalar, Scalar), factor: Scalar, ) -> GeopResult<Self>
Tapering about the axis through origin along axis: across the
axis, scaled by one at start and by factor at end, linearly in
between, and by factor past the end — or, pinching, only along
toward (square to the axis), the other way across left as it is.
Exact. Fails for a factor that is not definitely positive.
Sourcepub fn shear(
origin: Vector3,
axis: &Vector3,
toward: &Vector3,
zone: (Scalar, Scalar),
offset: Scalar,
) -> GeopResult<Self>
pub fn shear( origin: Vector3, axis: &Vector3, toward: &Vector3, zone: (Scalar, Scalar), offset: Scalar, ) -> GeopResult<Self>
Shearing along the axis through origin along axis: each plane
across the axis moved towards toward (square to the axis) by
offset times its distance from start over the zone’s length.
Affine, so the same map before, over and past the zone: the zone
only sets the rate (AxialMap::as_motion).
Sourcepub fn as_motion(&self) -> GeopResult<Option<Motion>>
pub fn as_motion(&self) -> GeopResult<Option<Motion>>
The affine map it is, where it is one everywhere — a shear: its columns across the axis constant and its offset linear along it, so the law is the map it is tangent to at either end. None for a taper, a twist or a bend.
Sourcepub fn twist(
origin: Vector3,
axis: &Vector3,
zone: (Scalar, Scalar),
angle: Scalar,
) -> GeopResult<Self>
pub fn twist( origin: Vector3, axis: &Vector3, zone: (Scalar, Scalar), angle: Scalar, ) -> GeopResult<Self>
Twisting about the axis through origin along axis: turned by
nothing at start and by angle (radians, right-handed about the
axis) at end, uniformly in between, rigidly by angle past the
end. Either hand.
Sourcepub fn bend(
origin: Vector3,
axis: &Vector3,
toward: &Vector3,
zone: (Scalar, Scalar),
angle: Scalar,
) -> GeopResult<Self>
pub fn bend( origin: Vector3, axis: &Vector3, toward: &Vector3, zone: (Scalar, Scalar), angle: Scalar, ) -> GeopResult<Self>
Bending about an axis square to the line through origin along
axis: the stretch of that line from start to end is wound onto
a circular arc of angle (radians), curving towards toward, its
length kept — the radius is the zone’s length over the angle. The
plane square to the line at each point stays a plane, turned with
it; past the end everything is carried on rigidly. A negative angle
curves away from toward, an angle of nothing leaves everything
where it is. Fails for a turn of a whole circle or more, which would
lay the zone over itself.
Sourcepub fn plane_across(
&self,
t: Scalar,
reach: Scalar,
) -> GeopResult<NurbSurface3D>
pub fn plane_across( &self, t: Scalar, reach: Scalar, ) -> GeopResult<NurbSurface3D>
The square of the plane across the axis at t along it, reaching
reach from the axis each way: what divides a body where it crosses
from one piece of the map into the next.
Trait Implementations§
Source§impl Deformation for AxialMap
impl Deformation for AxialMap
Source§fn point(&self, p: &Vector3) -> GeopResult<Vector3>
fn point(&self, p: &Vector3) -> GeopResult<Vector3>
The image of every piece p could lie in, united: where p could
be on a zone’s end, the law and the affine map there both enclose
it.
Source§fn curve(
&self,
curve: &NurbCurve3D,
at: &dyn Fn() -> GeopResult<Vector3>,
) -> GeopResult<NurbCurve3D>
fn curve( &self, curve: &NurbCurve3D, at: &dyn Fn() -> GeopResult<Vector3>, ) -> GeopResult<NurbCurve3D>
curve moved.Source§fn surface(
&self,
surface: &NurbSurface3D,
at: &dyn Fn() -> GeopResult<Vector3>,
) -> GeopResult<NurbSurface3D>
fn surface( &self, surface: &NurbSurface3D, at: &dyn Fn() -> GeopResult<Vector3>, ) -> GeopResult<NurbSurface3D>
surface moved.