Table of Contents

Class PreservedPiecePack

Namespace
Hi.NcOpt
Assembly
HiMech.dll

Mono preserved piece optimization package: a piece whose feedrate is never changed; its StepAdjustment is seeded by the classifier.

public class PreservedPiecePack : ISingleAdjustmentPack, INcOptPiecePack
Inheritance
PreservedPiecePack
Implements
Inherited Members
Extension Methods

Remarks

Mirrors HiNc NcOptProc.PreservedLinePack (frozen HardNc baseline).

Constructors

PreservedPiecePack(SyntaxPiece, string, double, bool, bool, bool, ICutterOptOption, IndexSegment, StepAdjustment)

Ctor.

public PreservedPiecePack(SyntaxPiece piece, string toolId, double srcFeedrate_mmds, bool isArc, bool hasArcMotionEvent, bool isRapid, ICutterOptOption cutterOptLimit, IndexSegment stepIndexSegment, StepAdjustment stepAdjustment)

Parameters

piece SyntaxPiece

The classified syntax piece.

toolId string

The active tool id in text form.

srcFeedrate_mmds double

The piece's effective modal feedrate in mm/s.

isArc bool

Whether the piece runs under an arc command in the modal sense.

hasArcMotionEvent bool

Whether the piece carries one-shot arc data.

isRapid bool

Whether the piece is a rapid (G00-modal) line.

cutterOptLimit ICutterOptOption

Cutter optimization limit. May be null.

stepIndexSegment IndexSegment

The step index segment of the piece.

stepAdjustment StepAdjustment

The adjustment seeded by the classifier.

Properties

CutterOptLimit

Cutter optimization limit of the tool active on this piece. May be null.

public ICutterOptOption CutterOptLimit { get; set; }

Property Value

ICutterOptOption

HasArcMotionEvent

Whether the piece itself carries one-shot arc data: its MotionEvent section is an arc form (McArc/ClArc/McPolarArc, with the arc geometry ArcCenter/IsCcw). Distinct from IsArc, which is the modal latch: a zero-motion continuation line under a G02 modal has IsArc true and this false. The splition fragment engine reads this to know whether per-fragment I/J/K rebuilding applies.

public bool HasArcMotionEvent { get; set; }

Property Value

bool

IsArc

Whether the piece runs under an arc command in the MODAL sense: the effective Group-01 latch is G02/G03 — a zero-motion line under a G02/G03 modal is still “on arc” — or, for CL-sourced pieces (which carry no NC modal state), the one-shot motion event is an arc form. Replaces the HardNc NcFlagBitArray.IsOnArcCommand() gate (NcFlagUtil.cs:675-679: the modal G02/G03 flag bits).

public bool IsArc { get; set; }

Property Value

bool

IsRapid

Whether the piece is a rapid (G00-modal) line by the classifier's rapid predicate (one-shot MotionEvent.IsRapid or effective MotionState G00). On such a line the effective modal feedrate is the machine rapid feedrate, not SrcFeedrate_mmds (replaces the HardNc NcFlagBitArray.IsRapid() read that routes HardNcLine.Feedrate_mmds to RapidFeedrate_mmds, HardNcLine.cs:206-211).

public bool IsRapid { get; set; }

Property Value

bool

Piece

The SoftNc syntax piece this pack was classified from.

public SyntaxPiece Piece { get; set; }

Property Value

SyntaxPiece

SrcFeedrate_mmds

The piece's effective modal feedrate in mm/s (replaces the HardNc ncLine.Feedrate_mmds read).

public double SrcFeedrate_mmds { get; set; }

Property Value

double

StepAdjustment

The single adjustment of this pack.

public StepAdjustment StepAdjustment { get; set; }

Property Value

StepAdjustment

StepIndexSegment

Always not null.

public IndexSegment StepIndexSegment { get; set; }

Property Value

IndexSegment

ToolId

The id (in text form) of the tool active on this piece, from the classifier's tool state machine. Used for tool house lookups.

public string ToolId { get; set; }

Property Value

string

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.