Skip to main content

SurfaceSheet

Struct SurfaceSheet 

Source
pub struct SurfaceSheet { /* private fields */ }
Expand description

A flat sheet laid on a face’s surface, as placed.

Implementations§

Source§

impl SurfaceSheet

Source

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.

Source

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.

Source

pub const fn surface(&self) -> &SurfaceGeometry

The surface the sheet is laid on, as placed: the one the chart positions are on.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SurfaceSheet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.