Interface INcOptPiecePack
Piece pack for optimization: one classified NC piece (block) mapped to its machining step segment, carrying the seams the solver needs (ToolId, SrcFeedrate_mmds, IsArc) without any HardNc dependency.
public interface INcOptPiecePack
- Extension Methods
Remarks
Ported from HiNc NcOptProc.ILinePack (frozen HardNc baseline,
HiNc/NcOpt/ILinePack.cs lines 16-113). The HardNcLine NcLine
member is replaced by Piece, ToolId,
SrcFeedrate_mmds and IsArc.
Properties
CutterOptLimit
Cutter optimization limit of the tool active on this piece. May be null.
ICutterOptOption CutterOptLimit { get; }
Property Value
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.
bool HasArcMotionEvent { get; }
Property Value
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).
bool IsArc { get; }
Property Value
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).
bool IsRapid { get; }
Property Value
Piece
The SoftNc syntax piece this pack was classified from.
SyntaxPiece Piece { get; }
Property Value
SrcFeedrate_mmds
The piece's effective modal feedrate in mm/s
(replaces the HardNc ncLine.Feedrate_mmds read).
double SrcFeedrate_mmds { get; }
Property Value
StepIndexSegment
Always not null.
IndexSegment StepIndexSegment { get; }
Property Value
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.
string ToolId { get; }
Property Value
Methods
GetMovingLength_mm(List<MachiningStep>)
Sum of the moving lengths in mm of the steps on StepIndexSegment.
double GetMovingLength_mm(List<MachiningStep> machiningSteps)
Parameters
machiningStepsList<MachiningStep>All machining steps.