Skip to main content

LayerModel

Struct LayerModel 

Source
pub struct LayerModel {
    pub layer_thickness: f64,
    pub hatch_spacing: f64,
    pub spot_radius: f64,
    pub scan_speed: f64,
    pub laser_power: f64,
    pub scan_strategy: ScanStrategy,
}
Expand description

Geometric parameters for a single AM layer.

Fields§

§layer_thickness: f64

Layer thickness (m).

§hatch_spacing: f64

Hatch spacing between adjacent scan tracks (m).

§spot_radius: f64

Nominal laser spot radius (m).

§scan_speed: f64

Scan speed (m/s).

§laser_power: f64

Laser power (W).

§scan_strategy: ScanStrategy

Scanning strategy applied to this layer.

Implementations§

Source§

impl LayerModel

Source

pub fn new( layer_thickness: f64, hatch_spacing: f64, spot_radius: f64, scan_speed: f64, laser_power: f64, scan_strategy: ScanStrategy, ) -> Self

Construct a new LayerModel.

Source

pub fn volumetric_energy_density(&self) -> f64

Volumetric energy density (J/m³), often written as E_v.

E_v = P / (v · h · t)

where P = power, v = scan speed, h = hatch spacing, t = layer thickness.

Source

pub fn linear_energy_density(&self) -> f64

Linear energy density (J/m) — power divided by scan speed.

Source

pub fn hatch_overlap(&self) -> f64

Hatch overlap fraction (0–1). Positive means tracks overlap.

overlap = 1 − hatch_spacing / (2 · spot_radius)

Source

pub fn num_tracks(&self, width: f64) -> usize

Approximate number of scan tracks required to cover a square domain of side width (m).

Trait Implementations§

Source§

impl Clone for LayerModel

Source§

fn clone(&self) -> LayerModel

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 LayerModel

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.