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: f64Layer thickness (m).
hatch_spacing: f64Hatch spacing between adjacent scan tracks (m).
spot_radius: f64Nominal laser spot radius (m).
scan_speed: f64Scan speed (m/s).
laser_power: f64Laser power (W).
scan_strategy: ScanStrategyScanning strategy applied to this layer.
Implementations§
Source§impl LayerModel
impl LayerModel
Sourcepub fn new(
layer_thickness: f64,
hatch_spacing: f64,
spot_radius: f64,
scan_speed: f64,
laser_power: f64,
scan_strategy: ScanStrategy,
) -> Self
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.
Sourcepub fn volumetric_energy_density(&self) -> f64
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.
Sourcepub fn linear_energy_density(&self) -> f64
pub fn linear_energy_density(&self) -> f64
Linear energy density (J/m) — power divided by scan speed.
Sourcepub fn hatch_overlap(&self) -> f64
pub fn hatch_overlap(&self) -> f64
Hatch overlap fraction (0–1). Positive means tracks overlap.
overlap = 1 − hatch_spacing / (2 · spot_radius)
Sourcepub fn num_tracks(&self, width: f64) -> usize
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
impl Clone for LayerModel
Source§fn clone(&self) -> LayerModel
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LayerModel
impl RefUnwindSafe for LayerModel
impl Send for LayerModel
impl Sync for LayerModel
impl Unpin for LayerModel
impl UnsafeUnpin for LayerModel
impl UnwindSafe for LayerModel
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
Mutably borrows from an owned value. Read more