Table of Contents

Class TaperApt

Namespace
Hi.Milling.Apts
Assembly
HiCbtr.dll

Taper end mill APT: a sharp-cornered taper. The bottom cone rises from the tip at Alpha_rad (0 for a flat bottom), meets the flank at the corner (D/2, Rz_mm) and the flank leans in at Beta_rad up to FluteHeight_mm. There is no round, so Rz_mm is fixed by the other parameters: it must be D/2 tan(Alpha) (0 for a flat bottom), see SelfAgreeingRz_mm(double, double); it is kept only for the file format, and a saved value off that is refused downstream (RefusesGeometry), not reinterpreted.

A tapered ball end mill is not a taper APT: author it as a GeneralApt with Rr 0, Rz = Rc and D = 2 Rc (1 - sin Beta) / cos Beta.

public class TaperApt : IAptBased, IGetGeneralApt, IAbstractNote, IGetDiameter, IGetFluteHeight, IExpandToBox3d, IMakeXmlSource, IDuplicate, IAptRz, IAptAlpha, IAptBeta, IToXElement
Inheritance
TaperApt
Implements
Inherited Members
Extension Methods

Constructors

TaperApt()

Ctor.

public TaperApt()

TaperApt(XElement)

Ctor.

public TaperApt(XElement src)

Parameters

src XElement

XML

Properties

AbstractNote

Gets a descriptive note or abstract about the object.

public string AbstractNote { get; }

Property Value

string

Alpha_deg

Alpha_rad in degree.

public double Alpha_deg { get; set; }

Property Value

double

Alpha_rad

The angle between the horizontal plane and the bottom cone rising from the tip. 0 for a flat bottom. The unit is radian.

public double Alpha_rad { get; set; }

Property Value

double

Beta_deg

Beta_rad in degree.

public double Beta_deg { get; set; }

Property Value

double

Beta_rad

The angle between the stick axis and the flank, leaning in above the corner. The unit is radian.

public double Beta_rad { get; set; }

Property Value

double

Diameter_mm

Diameter at the corner, where the flank line meets the bottom line (the tip plane when Alpha_rad is 0).

public double Diameter_mm { get; set; }

Property Value

double

FluteHeight_mm

Height of flute.

public double FluteHeight_mm { get; set; }

Property Value

double

Rz_mm

Height of the corner above the tip plane. Redundant for a sharp-cornered taper: it must be D/2 tan(Alpha) (0 for a flat bottom), see SelfAgreeingRz_mm(double, double), and is kept only for the file format. A value off that does not describe a round (a tapered ball end mill is a GeneralApt); it is refused downstream.

public double Rz_mm { get; set; }

Property Value

double

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

Duplicate(params object[])

Creates a deep copy of the object, excluding any source file references.

public object Duplicate(params object[] res)

Parameters

res object[]

Optional parameters that may be needed during the duplication process

Returns

object

A new instance that is a deep copy of the original object

ExpandToBox3d(ref box3d_t)

Expands the destination box. This function is usually used to compute the bounding box of elements. box3d_t is a value type, so the destination is passed by reference (the C++ expand_to_box3d(box3&) shape); an implementation writes dst = dst.Expanded(...) or forwards ref dst to its parts.

public void ExpandToBox3d(ref box3d_t dst)

Parameters

dst box3d_t

Destination box, expanded in place

GetGeneralApt()

The general APT: a sharp corner (Rc 0) at (D/2, Rz_mm). The authored Rz_mm is passed through as is, so an inconsistent saved value is refused by RefusesGeometry rather than silently reinterpreted.

public GeneralApt GetGeneralApt()

Returns

GeneralApt

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.

Reg(XFactory)

Registers this type's deserializer with the given XFactory (or Default when factory is null). Idempotent.

public static void Reg(XFactory factory = null)

Parameters

factory XFactory

SelfAgreeingRz_mm(double, double)

The Rz_mm that agrees with the other parameters of a taper: the corner's height above the tip plane, D/2 tan(Alpha) (0 for a flat bottom).

public static double SelfAgreeingRz_mm(double diameter_mm, double alpha_rad)

Parameters

diameter_mm double

see Diameter_mm

alpha_rad double

see Alpha_rad

Returns

double

the agreeing Rz in mm

ToXElement()

Get the XElement to represent the object.

public XElement ToXElement()

Returns

XElement

XElement to represent the object.