pub struct SurfaceSheet { /* private fields */ }Expand description
A flat sheet laid on a face’s surface, as placed.
Implementations§
Source§impl SurfaceSheet
impl SurfaceSheet
Sourcepub fn new(
model: &Model,
face: &Shape,
placement: &SheetPlacement,
reach: f64,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn new( model: &Model, face: &Shape, placement: &SheetPlacement, reach: f64, tol: Tolerances, ) -> OgeomResult<Self>
The sheet laid on face of model, its surface as placed.
reach is the radius of the sheet region that will be asked for:
a sheet point farther from the origin is refused.
§Errors
OgeomError::Construction
where face is not a face, at stands off its surface by more
than the face’s tolerance, x_direction is along the normal there,
at is a pole of the surface’s chart, reach is not a positive
length, or a sphere’s sheet reaches its origin’s antipode.
Sourcepub fn flattening_error(&self) -> f64
pub fn flattening_error(&self) -> f64
An estimate of how far the least-distortion sheet’s map stands from the smooth conformal flattening, as a length on the sheet: the most a vertex shared by the last two meshes moved between them, and the most the polynomial back to geodesic coordinates misses the finer mesh’s map at its vertices and triangle centroids, together. For the as-rigid-as-possible sheet, the polynomial’s miss alone. Zero for a sheet laid by geodesic polar coordinates or by an exact development, which have no mesh.
It is a bound only if each doubling of the rings at least halves the finer mesh’s own departure from the smooth map, in which case that departure is no more than the move between the two meshes. That contraction is measured, not proved for this discretisation: from 8 to 64 rings the moves shrank by 3.8 to 4.0 per doubling on a sphere of radius 10 and a torus 20/5, second order as the cotangent Laplacian is on such meshes, but nothing here shows it holds on every surface. The polynomial’s miss is measured at the mesh’s vertices and centroids only.
Sourcepub const fn surface(&self) -> &SurfaceGeometry
pub const fn surface(&self) -> &SurfaceGeometry
The surface the sheet is laid on, as placed: the one the chart positions are on.
Sourcepub fn chart_point(&self, p: Point2) -> OgeomResult<Point2>
pub fn chart_point(&self, p: Point2) -> OgeomResult<Point2>
The (u, v) of the surface a sheet point lands on, to the model’s
confusion distance in space.
§Errors
OgeomError::Construction
where the point lies past the sheet’s reach, lands on a pole of the
chart, runs off a bounded surface’s domain, or where the geodesics
from the origin cross before reaching it.
Sourcepub fn chart_curve(
&self,
curve: &PlanarCurve,
range: (f64, f64),
tolerance: f64,
) -> OgeomResult<PlanarCurve>
pub fn chart_curve( &self, curve: &PlanarCurve, range: (f64, f64), tolerance: f64, ) -> OgeomResult<PlanarCurve>
A planar curve over range of its parameter carried onto the
surface: its chart curve, at the same parameter, whose lift onto
the surface stands within tolerance of the carried curve, ready
for CurveOnSurface::new with SurfaceSheet::surface.
A line on a plane or a cylinder is carried exactly; anything else
is fitted, half of tolerance left to the fit and half to the
geodesics, and the fit is measured in space between its samples.
The chart curve is continued along the curve across every period
of the chart, so a curve going round a pole of the chart (a circle
about a sphere’s pole) is one chart curve whose ends stand a whole
turn apart, as a parallel’s do.
§Errors
As SurfaceSheet::chart_point at any point of the curve;
OgeomError::Construction
where tolerance is not a length, where the curve runs through a
pole of the chart, so its chart curve cannot be continued along
it, or where the fit cannot be held to tolerance.
Sourcepub fn chart_pieces(
&self,
curve: &PlanarCurve,
range: (f64, f64),
tolerance: f64,
) -> OgeomResult<Vec<(PlanarCurve, (f64, f64))>>
pub fn chart_pieces( &self, curve: &PlanarCurve, range: (f64, f64), tolerance: f64, ) -> OgeomResult<Vec<(PlanarCurve, (f64, f64))>>
A planar curve over range carried onto the surface as chart
curves, cut where the curve runs through a pole of a sphere’s
chart: each with the range of the curve’s parameter it covers, in
order. A piece’s end at a pole stands on the pole’s row of the chart
at the longitude the curve arrives at or leaves the pole along (the
longitude of its tangent there), so the pieces meet the pole’s
degenerate edge where split_face
cuts it. Elsewhere, and on every other surface, the one chart curve
SurfaceSheet::chart_curve gives.
§Errors
As SurfaceSheet::chart_curve, for each piece.
Sourcepub fn chart_edges(
&self,
model: &mut Model,
curve: &PlanarCurve,
range: (f64, f64),
tolerance: f64,
) -> OgeomResult<Vec<Shape>>
pub fn chart_edges( &self, model: &mut Model, curve: &PlanarCurve, range: (f64, f64), tolerance: f64, ) -> OgeomResult<Vec<Shape>>
Edges on the surface along a planar curve carried by
SurfaceSheet::chart_pieces, one per piece, each as
SurfaceSheet::chart_edge makes it.
§Errors
As SurfaceSheet::chart_pieces and make_edge.
Sourcepub fn chart_edge(
&self,
model: &mut Model,
curve: &PlanarCurve,
range: (f64, f64),
tolerance: f64,
) -> OgeomResult<Built>
pub fn chart_edge( &self, model: &mut Model, curve: &PlanarCurve, range: (f64, f64), tolerance: f64, ) -> OgeomResult<Built>
An edge on the surface along a planar curve carried by
SurfaceSheet::chart_curve: its curve the chart curve on the
surface, and, on a face standing unplaced, the chart curve its
pcurve on the face’s surface.
§Errors
As SurfaceSheet::chart_curve and
make_edge.
Sourcepub fn distortion(&self) -> SheetDistortion
pub fn distortion(&self) -> SheetDistortion
How far the sheet has stretched, over every sheet point carried so far.
Trait Implementations§
Source§impl Clone for SurfaceSheet
impl Clone for SurfaceSheet
Auto Trait Implementations§
impl !Freeze for SurfaceSheet
impl !RefUnwindSafe for SurfaceSheet
impl !Sync for SurfaceSheet
impl Send for SurfaceSheet
impl Unpin for SurfaceSheet
impl UnsafeUnpin for SurfaceSheet
impl UnwindSafe for SurfaceSheet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.