pub enum Cutter {
Flat(FlatCutter),
Ball(BallCutter),
Bull(BullCutter),
Cone(ConeCutter),
BallCone(BallConeCutter),
Frustum(FrustumCutter),
Lollipop(LollipopCutter),
Dovetail(DovetailCutter),
}Expand description
Any of the five cutters, with static dispatch over the profile trait.
Variants§
Flat(FlatCutter)
Ball(BallCutter)
Bull(BullCutter)
Cone(ConeCutter)
BallCone(BallConeCutter)
Frustum(FrustumCutter)
Lollipop(LollipopCutter)
Dovetail(DovetailCutter)
Implementations§
Source§impl Cutter
impl Cutter
pub fn flat(diameter: f64, cutting_length: f64, shaft_length: f64) -> Self
pub fn ball(diameter: f64, cutting_length: f64, shaft_length: f64) -> Self
pub fn bull( diameter: f64, corner_radius: f64, cutting_length: f64, shaft_length: f64, ) -> Self
pub fn cone( maximum_diameter: f64, included_angle_deg: f64, cutting_length: f64, shaft_length: f64, ) -> Self
pub fn ball_cone( ball_diameter: f64, maximum_diameter: f64, included_angle_deg: f64, cutting_length: f64, shaft_length: f64, ) -> Self
Sourcepub fn default_point_angle_deg(kind: ToolKind) -> Option<f64>
pub fn default_point_angle_deg(kind: ToolKind) -> Option<f64>
Default included angle of a hole-making tool kind when the geometry has none.
Sourcepub fn from_tool(tool: &Tool) -> Result<Cutter, CutterError>
pub fn from_tool(tool: &Tool) -> Result<Cutter, CutterError>
The validated profile of a tool, or why it has none.
Flat, tap, reamer, boring bar, thread mill, slot and T-slot cutters are
cylinders (slot cutters on their arbor through shaft_diameter); a face
mill is a bull when it has a corner radius; drills, spot and centre drills
are cones with their point angle (118°, 90°, 60° unless given); V-bits and
engravers are cones; a chamfer or tapered flat mill with a tip diameter is
a frustum, without one a cone; a tapered ball is a ball-cone; a lollipop
and a dovetail need shaft_diameter as their neck. Lathe inserts have no
milling profile.
pub fn frustum( tip_diameter: f64, diameter: f64, included_angle_deg: f64, cutting_length: f64, shaft_length: f64, ) -> Self
pub fn lollipop( ball_diameter: f64, neck_diameter: f64, cutting_length: f64, shaft_length: f64, ) -> Self
pub fn dovetail( diameter: f64, neck_diameter: f64, included_angle_deg: f64, cutting_length: f64, shaft_length: f64, ) -> Self
Trait Implementations§
impl Copy for Cutter
Source§impl CutterProfile for Cutter
impl CutterProfile for Cutter
fn kind(&self) -> CutterKind
Source§fn cutting_length(&self) -> f64
fn cutting_length(&self) -> f64
Usable cutting height above the reference point.
Source§fn shaft_length(&self) -> f64
fn shaft_length(&self) -> f64
Shank length above the cutting length, for collision checks and preview.
Source§fn shaft_radius(&self) -> f64
fn shaft_radius(&self) -> f64
Shank radius; equals the cutting radius unless the tool says otherwise.
Source§fn profile_height(&self) -> f64
fn profile_height(&self) -> f64
Height at which the curved/sloped profile ends and the cylindrical part begins.
Source§fn height_at_radius(&self, r: f64) -> Option<f64>
fn height_at_radius(&self, r: f64) -> Option<f64>
Profile height above the reference at radial distance
r; None outside [0, radius].Source§fn radius_at_height(&self, h: f64) -> Option<f64>
fn radius_at_height(&self, h: f64) -> Option<f64>
Largest cutting radius at local height
h; None outside [0, cutting_length].Source§fn max_radius_at_height(&self, h: f64) -> Option<f64>
fn max_radius_at_height(&self, h: f64) -> Option<f64>
radius_at_height extended by the shank up to cutting_length + shaft_length.Source§fn segments(&self) -> Vec<ProfileSegment>
fn segments(&self) -> Vec<ProfileSegment>
The piecewise description, bottom segment first.
fn diameter(&self) -> f64
Source§fn total_height(&self) -> f64
fn total_height(&self) -> f64
Total modelled height: cutting length plus shank.
Source§impl<'de> Deserialize<'de> for Cutter
impl<'de> Deserialize<'de> for Cutter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Cutter
Auto Trait Implementations§
impl Forget for Cutter
impl Freeze for Cutter
impl Move for Cutter
impl RefUnwindSafe for Cutter
impl Send for Cutter
impl Sync for Cutter
impl Unpin for Cutter
impl UnsafeUnpin for Cutter
impl UnwindSafe for Cutter
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