Class MillingEngagementUtil
- Namespace
- Hi.Milling.Engagements
- Assembly
- HiMech.dll
Utility of LayerMillingEngagement.
public static class MillingEngagementUtil
- Inheritance
-
MillingEngagementUtil
- Inherited Members
Methods
GetContoursDrawing(List<List<vec3d_t>>)
Gets a drawing representation of the contours.
public static Drawing GetContoursDrawing(List<List<vec3d_t>> contours)
Parameters
Returns
- Drawing
A drawing object representing the contours.
GetEngagedEdgeHeightFromToolTip_mm(LayerMillingEngagement, List<PairZr>, double, bool)
The height above the tool tip at which the cutting force of an
engagement is placed for the cutter's deflection and for the beam
sections the stress ratio counts: the centroid of the engaged
cutting edge. Every engaged layer weighs its interval
(Dv: the thickness of a side layer, the
radial interval of a bottom layer) times the sum of its engaged arcs
in radians: the geometric centroid of the engaged edge, not the
force's — the force kernel's layer force carries the chip thickness
as well, and an edge force that goes with the edge length, both of
which this weight leaves out; the radius enters the swept volume, not
the force. A side layer stands at its key, the centre of
its interval, where the kernel applies its force; a bottom layer at
the bottom contour's height at its radius, 0 on the flat bottom the
bottom layers belong to (a cutter whose contour starts on the axis — a
ball, a cone — is scanned into side layers alone). Side layers above
trialClippingHeight_mm are left out as the kernel
leaves them out, a layer the contour gives no radius for likewise; the
bottom layers count only when includeBottom, which
the kernel decides by the tool moving down. NaN when nothing is
engaged. The layers' forces are summed by the kernel before the
deflection reads them, so the centroid stands in for the exact
per-layer superposition: on a cutter engaged from its pointed apex
that superposition grows with the logarithm of the engaged depth over
the feed per tooth, and the centroid is its finite, slice-independent
stand-in of the right order.
public static double GetEngagedEdgeHeightFromToolTip_mm(LayerMillingEngagement engagement, List<PairZr> shaperZrList, double trialClippingHeight_mm, bool includeBottom)
Parameters
engagementLayerMillingEngagementThe step's engagement; null is nothing engaged.
shaperZrListList<PairZr>The cutter's shaper profile contour, ascending in z from the tip.
trialClippingHeight_mmdoubleThe height above which side layers do not cut.
includeBottomboolWhether the bottom layers cut this step.
Returns
- double
The height from the tip, mm, or NaN.
GetLayerHeights(IEnumerable<PairZr>)
The heights of a flute contour for its layer builders (GetZToDzList(List<double>, double), and the native
machining_step_proc__set_flute_z the removal procedure hands the list to), each height once: a
step's two points at one height (a step read level from a mesh,
GetZrList(IEnumerable<tri3d_t>), or a stepped Cylindroid profile)
are one layer boundary, not a layer. A step's shoulder is no side layer: the layers below and above it
stand as they are. A first pass since 2026-11-04: the slicer itself lays no layer for a repeated height
(GetZToDzList(List<double>, double)).
public static List<double> GetLayerHeights(IEnumerable<PairZr> zrAscendentContour)
Parameters
zrAscendentContourIEnumerable<PairZr>The contour, heights ascending; null answers null.
Returns
GetZToDzList(List<double>, double)
Get Z to dZ list. The z values, i.e. the key of generated list, are all not repeated with the source z values. The generated z values are interpolated by the source z values. And each of the dz area is the same slope from the original source.
public static SortedList<double, double> GetZToDzList(List<double> constantZlopeZs, double resolution)
Parameters
Returns
Remarks
An interval wider than resolution is split into
ceil(dz / resolution) slices whose centres are added only when the key is new (the
first value of a key is kept); a narrower one puts its centre in, an equal key overwritten,
when the centre lies strictly between the interval's ends: an interval of no width (a height
given twice, a step's two points), a backward or a NaN one, or one so narrow that its centre
rounds onto an end (a ulp: a 45-degree chamfer whose flute length equals its radius) lays no
layer.
The arithmetic lives in core.dll (mech/machining/machining_step_proc_t.cpp, the
line-by-line port of the managed body it replaced on 2026-10-08, play-core migration P8):
the step procedure computes the list of the mounted cutter once per (resolution, cutter)
key, and this member is the same arithmetic for the gap-resolution switch of the
engagement build.