namespace OpenNest.Posts.Cincinnati
{
///
/// Specifies how coordinate positioning is handled between parts.
///
public enum CoordinateMode
{
/// Set absolute position.
G92,
/// Use relative/incremental positioning.
G91,
/// Use machine coordinate system.
G53
}
///
/// Specifies how G89 (hole drilling/tapping parameters) are provided.
///
public enum G89Mode
{
/// Use external library file for G89 parameters.
LibraryFile,
/// Explicitly define G89 parameters in the program.
Explicit
}
///
/// Specifies where kerf compensation is applied.
///
public enum KerfMode
{
/// Controller side (using cutter compensation codes).
ControllerSide,
/// Pre-applied to part geometry during post-processing.
PreApplied
}
///
/// Specifies which side of the cut line kerf compensation is applied to.
///
public enum KerfSide
{
/// Kerf applied to the left side of the cut.
Left,
/// Kerf applied to the right side of the cut.
Right
}
///
/// Specifies how M47 (optional stop) commands are used.
///
public enum M47Mode
{
/// Always include M47.
Always,
/// Include M47 with block delete functionality.
BlockDelete,
/// Automatically determine M47 placement.
Auto,
/// Do not use M47.
None
}
///
/// Specifies when pallet exchange occurs.
///
public enum PalletMode
{
/// No pallet exchange.
None,
/// Pallet exchange at end of sheet.
EndOfSheet,
/// Pallet exchange at start and end of sheet.
StartAndEnd
}
///
/// Configuration for Cincinnati post processor.
/// Defines machine-specific parameters, output format, and cutting strategies.
///
public class CincinnatiPostConfig
{
///
/// Gets or sets the configuration name/identifier.
/// Default: "CL940"
///
public string ConfigurationName { get; set; } = "CL940";
///
/// Gets or sets the units for posted output.
/// Default: Units.Inches
///
public Units PostedUnits { get; set; } = Units.Inches;
///
/// Gets or sets the decimal accuracy for numeric output.
/// Default: 4
///
public int PostedAccuracy { get; set; } = 4;
///
/// Gets or sets how coordinate positioning is handled between parts.
/// Default: CoordinateMode.G92
///
public CoordinateMode CoordModeBetweenParts { get; set; } = CoordinateMode.G92;
///
/// Gets or sets whether to use subprograms for sheet operations.
/// Default: true
///
public bool UseSheetSubprograms { get; set; } = true;
///
/// Gets or sets the starting subprogram number for sheet operations.
/// Default: 101
///
public int SheetSubprogramStart { get; set; } = 101;
///
/// Gets or sets the subprogram number for variable declarations.
/// Default: 100
///
public int VariableDeclarationSubprogram { get; set; } = 100;
///
/// Gets or sets how G89 parameters are provided.
/// Default: G89Mode.LibraryFile
///
public G89Mode ProcessParameterMode { get; set; } = G89Mode.LibraryFile;
///
/// Gets or sets the default G89 library file path.
/// Default: empty string
///
public string DefaultLibraryFile { get; set; } = "";
///
/// Gets or sets whether to repeat G89 before each feature.
/// Default: true
///
public bool RepeatG89BeforeEachFeature { get; set; } = true;
///
/// Gets or sets whether to use exact stop mode (G61).
/// Default: false
///
public bool UseExactStopMode { get; set; } = false;
///
/// Gets or sets where kerf compensation is applied.
/// Default: KerfMode.ControllerSide
///
public KerfMode KerfCompensation { get; set; } = KerfMode.ControllerSide;
///
/// Gets or sets the default side for kerf compensation.
/// Default: KerfSide.Left
///
public KerfSide DefaultKerfSide { get; set; } = KerfSide.Left;
///
/// Gets or sets how M47 is used in interior cuts.
/// Default: M47Mode.Always
///
public M47Mode InteriorM47 { get; set; } = M47Mode.Always;
///
/// Gets or sets how M47 is used in exterior cuts.
/// Default: M47Mode.Always
///
public M47Mode ExteriorM47 { get; set; } = M47Mode.Always;
///
/// Gets or sets the safety head raise distance (in machine units).
/// Default: 2000
///
public int? SafetyHeadraiseDistance { get; set; } = 2000;
///
/// Gets or sets the distance threshold for M47 override.
/// Default: null
///
public double? M47OverrideDistanceThreshold { get; set; } = null;
///
/// Gets or sets whether to use anti-dive functionality.
/// Default: true
///
public bool UseAntiDive { get; set; } = true;
///
/// Gets or sets whether to use smart rapids optimization.
/// Default: false
///
public bool UseSmartRapids { get; set; } = false;
///
/// Gets or sets when pallet exchange occurs.
/// Default: PalletMode.EndOfSheet
///
public PalletMode PalletExchange { get; set; } = PalletMode.EndOfSheet;
///
/// Gets or sets whether to use line numbers in output.
/// Default: true
///
public bool UseLineNumbers { get; set; } = true;
///
/// Gets or sets the starting line number for features.
/// Default: 1
///
public int FeatureLineNumberStart { get; set; } = 1;
///
/// Gets or sets whether to use speed/gas commands.
/// Default: false
///
public bool UseSpeedGas { get; set; } = false;
///
/// Gets or sets the feedrate percentage for lead-in moves.
/// Default: 0.5 (50%)
///
public double LeadInFeedratePercent { get; set; } = 0.5;
///
/// Gets or sets the feedrate percentage for lead-in arc-to-line moves.
/// Default: 0.5 (50%)
///
public double LeadInArcLine2FeedratePercent { get; set; } = 0.5;
///
/// Gets or sets the feedrate multiplier for circular cuts.
/// Default: 0.8 (80%)
///
public double CircleFeedrateMultiplier { get; set; } = 0.8;
///
/// Gets or sets the variable number for sheet width.
/// Default: 110
///
public int SheetWidthVariable { get; set; } = 110;
///
/// Gets or sets the variable number for sheet length.
/// Default: 111
///
public int SheetLengthVariable { get; set; } = 111;
}
}