Solutions

This page covers ISolution, ISolutionSheet, ISolutionFormat, ISolutionFormats, ISolutionCut, ISolutionCuts, ISolutionWaste, and ISolutionWastes. These are the core output interfaces used by result exporters, batch save plugins, and plot-aware integrations.

Solution model

TonCut exposes optimization output as a read-only hierarchy:

  1. ISolution contains solution sheets.
  2. ISolutionSheet exposes the selected stock sheet, placed formats, waste, cuts, and coordinate transforms.
  3. Child collections expose placed formats, waste regions, and cuts individually.

Both ISolution and ISolutionSheet report technological, edging, and kerf waste fields independently. ISolutionCut exposes NeedShift together with its signed ShiftDistance in TonCut length units, while ISolutionWaste exposes Holes (areas of the remnant with no material, never waste or usable area; a remnant may theoretically contain one) separately from its outer shape.

Output helpers

ISolutionSheet is the interface most export plugins spend time with. Its coordinate helpers such as CalcPoint, CalcPointF, GetDirection, and CalcEffectiveLayout are the safe way to respect sheet rotation, mirroring, margins, and host coordinate conventions.

ISolution

Read-only collection of solution sheets produced by TonCut after optimization.

Source: SDK/include/pascal/uISolution.pas

Properties

  • Property name
    Count
    Type
    Integer
    Description

    Number of items currently exposed by the interface.

    Declaration

    property Count: Integer read GetCount;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    Items
    Type
    ISolutionSheet
    Description

    Indexed property used to read one item from the collection.

    Declaration

    property Items[aIndex: Cardinal]: ISolutionSheet read GetByIndex; default;

    Published SDK declaration languages: Pascal, C++.

    Index Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
    Value
    The collection item located at the supplied index.
  • Property name
    TechnologicalWasteField
    Type
    TField
    Description

    Waste area attributed to technological constraints in the solution or solution sheet.

    Declaration

    property TechnologicalWasteField: TField read GetTechnologicalWasteField;

    Published SDK declaration languages: Pascal.

  • Property name
    EdgingWasteField
    Type
    TField
    Description

    Waste area attributed to sheet edging in the solution or solution sheet.

    Declaration

    property EdgingWasteField: TField read GetEdgingWasteField;

    Published SDK declaration languages: Pascal.

  • Property name
    KerfWasteField
    Type
    TField
    Description

    Waste area attributed to kerf in the solution or solution sheet.

    Declaration

    property KerfWasteField: TField read GetKerfWasteField;

    Published SDK declaration languages: Pascal.

Methods

  • Method name
    CalcCutsInfoByMaterial()
    Type
    procedure
    Description

    Calculate cut count and total cut length for the selected material across the solution.

    Declaration

    procedure CalcCutsInfoByMaterial(const aMaterial: IMaterial; var aCount: Integer; var aLength: Double); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aMaterialconst
    Material instance being queried or modified.
    aCountvar
    Integer
    Count value supplied or returned by the method. Passed by reference and may be updated by the callee.
    aLengthvar
    Double
    Length value in TonCut units. Passed by reference and may be updated by the callee.

ISolutionSheet

One placed stock sheet in a solution, including placed formats, waste regions, cuts, and coordinate helpers.

Source: SDK/include/pascal/uISolutionSheet.pas

Properties

  • Property name
    Sheet
    Type
    ISheet
    Description

    Sheet linked to the current entity.

    Declaration

    property Sheet: ISheet read GetSheet;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    SolutionFormats
    Type
    ISolutionFormats
    Description

    Read-only collection of placed formats emitted for the solution sheet.

    Declaration

    property SolutionFormats: ISolutionFormats read GetSolutionFormats;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    SolutionWastes
    Type
    ISolutionWastes
    Description

    Read-only collection of waste regions emitted for the solution sheet.

    Declaration

    property SolutionWastes: ISolutionWastes read GetSolutionWastes;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    SolutionCuts
    Type
    ISolutionCuts
    Description

    Read-only collection of cuts emitted for the solution sheet.

    Declaration

    property SolutionCuts: ISolutionCuts read GetSolutionCuts;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    Quantity
    Type
    Integer
    Description

    Quantity associated with the current object.

    Declaration

    property Quantity: Integer read GetQuantity;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    TechnologicalWasteField
    Type
    TField
    Description

    Waste area attributed to technological constraints in the solution or solution sheet.

    Declaration

    property TechnologicalWasteField: TField read GetTechnologicalWasteField;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    EdgingWasteField
    Type
    TField
    Description

    Waste area attributed to sheet edging in the solution or solution sheet.

    Declaration

    property EdgingWasteField: TField read GetEdgingWasteField;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    KerfWasteField
    Type
    TField
    Description

    Waste area attributed to kerf in the solution or solution sheet.

    Declaration

    property KerfWasteField: TField read GetKerfWasteField;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    Index
    Type
    Integer
    Description

    Gets index.

    Declaration

    property Index: Integer read GetIndex;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    Rotation
    Type
    Integer
    Description

    Current rotation value.

    Declaration

    property Rotation: Integer read GetRotation;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    Mirror
    Type
    Description

    Mirror state for the current object.

    Declaration

    property Mirror: TMirrors read GetMirror;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    IsSaved
    Type
    Boolean
    Description

    Whether the solution sheet has already been saved by a plugin.

    Declaration

    property IsSaved: Boolean read GetIsSaved write SetIsSaved;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    IsPlotted
    Type
    Boolean
    Description

    Whether the solution sheet has already been plotted by a plugin.

    Declaration

    property IsPlotted: Boolean read GetIsPlotted write SetIsPlotted;

    Published SDK declaration languages: Pascal, C++.

Methods

  • Method name
    GetEffectiveModificator()
    Type
    procedure
    Description

    Return the effective rotation and mirror state applied to the solution sheet.

    Declaration

    procedure GetEffectiveModificator(var aRotation: Integer; var aMirror: TMirrors); safecall;

    Published SDK declaration languages: Pascal, C++.

    Parameters
    aRotationvar
    Integer
    Value for rotation. Passed by reference and may be updated by the callee.
    aMirrorvar
    Value for mirror. Passed by reference and may be updated by the callee.
  • Method name
    GetOriginPoint()
    Type
    procedure
    Description

    Transform coordinates or directions between solution space and the output coordinate system.

    Declaration

    procedure GetOriginPoint(var aX: Integer; var aY: Integer); safecall;

    Published SDK declaration languages: Pascal, C++.

    Parameters
    aXvar
    Integer
    X coordinate value. Passed by reference and may be updated by the callee.
    aYvar
    Integer
    Y coordinate value. Passed by reference and may be updated by the callee.
  • Method name
    CalcPoint()
    Type
    procedure
    Description

    Transform coordinates or directions between solution space and the output coordinate system.

    Declaration

    procedure CalcPoint(var aX: Integer; var aY: Integer); safecall;

    Published SDK declaration languages: Pascal, C++.

    Parameters
    aXvar
    Integer
    X coordinate value. Passed by reference and may be updated by the callee.
    aYvar
    Integer
    Y coordinate value. Passed by reference and may be updated by the callee.
  • Method name
    UnCalcPoint()
    Type
    procedure
    Description

    Transform coordinates or directions between solution space and the output coordinate system.

    Declaration

    procedure UnCalcPoint(var aX: Integer; var aY: Integer); safecall;

    Published SDK declaration languages: Pascal, C++.

    Parameters
    aXvar
    Integer
    X coordinate value. Passed by reference and may be updated by the callee.
    aYvar
    Integer
    Y coordinate value. Passed by reference and may be updated by the callee.
  • Method name
    CalcPointF()
    Type
    procedure
    Description

    Transform coordinates or directions between solution space and the output coordinate system.

    Declaration

    procedure CalcPointF(var aX: Double; var aY: Double); safecall;

    Published SDK declaration languages: Pascal, C++.

    Parameters
    aXvar
    Double
    X coordinate value. Passed by reference and may be updated by the callee.
    aYvar
    Double
    Y coordinate value. Passed by reference and may be updated by the callee.
  • Method name
    UnCalcPointF()
    Type
    procedure
    Description

    Transform coordinates or directions between solution space and the output coordinate system.

    Declaration

    procedure UnCalcPointF(var aX: Double; var aY: Double); safecall;

    Published SDK declaration languages: Pascal, C++.

    Parameters
    aXvar
    Double
    X coordinate value. Passed by reference and may be updated by the callee.
    aYvar
    Double
    Y coordinate value. Passed by reference and may be updated by the callee.
  • Method name
    GetDirection()
    Type
    procedure
    Description

    Transform coordinates or directions between solution space and the output coordinate system.

    Declaration

    procedure GetDirection(var aX: Integer; var aY: Integer); safecall;

    Published SDK declaration languages: Pascal, C++.

    Parameters
    aXvar
    Integer
    X coordinate value. Passed by reference and may be updated by the callee.
    aYvar
    Integer
    Y coordinate value. Passed by reference and may be updated by the callee.
  • Method name
    CalcEffectiveLayout()
    Type
    procedure
    Description

    Calculate the effective sheet size and margins after TonCut applies orientation rules.

    Declaration

    procedure CalcEffectiveLayout(var aLength: Cardinal; var aWidth: Cardinal; var aMarginLeft: Cardinal; var aMarginTop: Cardinal; var aMarginRight: Cardinal; var aMarginBottom: Cardinal); safecall;

    Published SDK declaration languages: Pascal, C++.

    Parameters
    aLengthvar
    Cardinal
    Length value in TonCut units. Passed by reference and may be updated by the callee.
    aWidthvar
    Cardinal
    Width value in TonCut units. Passed by reference and may be updated by the callee.
    aMarginLeftvar
    Cardinal
    Left margin value in TonCut units. Passed by reference and may be updated by the callee.
    aMarginTopvar
    Cardinal
    Top margin value in TonCut units. Passed by reference and may be updated by the callee.
    aMarginRightvar
    Cardinal
    Right margin value in TonCut units. Passed by reference and may be updated by the callee.
    aMarginBottomvar
    Cardinal
    Bottom margin value in TonCut units. Passed by reference and may be updated by the callee.
  • Method name
    CalcRecycledField()
    Type
    TField
    Description

    Calculate recycled field.

    Declaration

    function CalcRecycledField(aMinShorterRecycleSize: Integer; aMinLongerRecycleSize: Integer): TField; safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aMinShorterRecycleSize
    Integer
    Value for min shorter recycle size.
    aMinLongerRecycleSize
    Integer
    Value for min longer recycle size.
    Returns
    The calculated recycled field value.
  • Method name
    CalcCutsInfo()
    Type
    procedure
    Description

    Calculate cut count and total cut length for the solution sheet.

    Declaration

    procedure CalcCutsInfo(var aCount: Integer; var aLength: Double); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aCountvar
    Integer
    Count value supplied or returned by the method. Passed by reference and may be updated by the callee.
    aLengthvar
    Double
    Length value in TonCut units. Passed by reference and may be updated by the callee.

ISolutionFormat

Placed-format view inside a solution sheet with position, rotation, and mirror state.

Source: SDK/include/pascal/uISolutionFormat.pas

Properties

  • Property name
    Format
    Type
    IFormat
    Description

    Gets the linked format interface.

    Declaration

    property Format: IFormat read GetFormat;

    Published SDK declaration languages: Pascal.

  • Property name
    X
    Type
    Cardinal
    Description

    X coordinate value.

    Declaration

    property X: Cardinal read GetX;

    Published SDK declaration languages: Pascal.

  • Property name
    Y
    Type
    Cardinal
    Description

    Y coordinate value.

    Declaration

    property Y: Cardinal read GetY;

    Published SDK declaration languages: Pascal.

  • Property name
    Rotation
    Type
    TRotation
    Description

    Current rotation value.

    Declaration

    property Rotation: TRotation read GetRotation;

    Published SDK declaration languages: Pascal.

  • Property name
    Mirrored
    Type
    Boolean
    Description

    Mirror state applied to the current placed format.

    Declaration

    property Mirrored: Boolean read GetMirrored;

    Published SDK declaration languages: Pascal.


ISolutionFormats

Collection interface used to create, enumerate, query, and reload a shared Desktop object set.

Source: SDK/include/pascal/uISolutionFormats.pas

Properties

  • Property name
    Count
    Type
    Integer
    Description

    Number of items currently exposed by the interface.

    Declaration

    property Count: Integer read GetCount;

    Published SDK declaration languages: Pascal.

  • Property name
    Items
    Type
    ISolutionFormat
    Description

    Indexed property used to read one item from the collection.

    Declaration

    property Items[aIndex: Cardinal]: ISolutionFormat read GetByIndex; default;

    Published SDK declaration languages: Pascal.

    Index Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
    Value
    The collection item located at the supplied index.

ISolutionCut

Single output cut. TonCut can expose both straight cuts and Bezier-like curve cuts.

Source: SDK/include/pascal/uISolutionCut.pas

Properties

  • Property name
    Kind
    Type
    Description

    Enumerated kind describing the current object.

    Declaration

    property Kind: TCutKind read GetKind;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    PosX
    Type
    Integer
    Description

    X position of the object within solution space.

    Declaration

    property PosX: Integer read GetPosX;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    PosY
    Type
    Integer
    Description

    Y position of the object within solution space.

    Declaration

    property PosY: Integer read GetPosY;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    TarX
    Type
    Integer
    Description

    Gets tar x.

    Declaration

    property TarX: Integer read GetTarX;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    TarY
    Type
    Integer
    Description

    Gets tar y.

    Declaration

    property TarY: Integer read GetTarY;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    PosXp
    Type
    Integer
    Description

    Gets pos xp.

    Declaration

    property PosXp: Integer read GetPosXp;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    PosYp
    Type
    Integer
    Description

    Gets pos yp.

    Declaration

    property PosYp: Integer read GetPosYp;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    TarXp
    Type
    Integer
    Description

    Gets tar xp.

    Declaration

    property TarXp: Integer read GetTarXp;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    TarYp
    Type
    Integer
    Description

    Gets tar yp.

    Declaration

    property TarYp: Integer read GetTarYp;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    NeedShift
    Type
    Boolean
    Description

    Whether this cut is the governing boundary for one segment movement.

    Declaration

    property NeedShift: Boolean read GetNeedShift;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    ShiftDistance
    Type
    Integer
    Description

    Complete signed movement, in TonCut length units, commanded at this cut boundary; 0 when NeedShift is false.

    Declaration

    property ShiftDistance: Integer read GetShiftDistance;

    Published SDK declaration languages: Pascal, C++.

Methods

  • Method name
    CalcLength()
    Type
    Double
    Description

    Calculate length.

    Declaration

    function CalcLength(): Double; safecall;

    Published SDK declaration languages: Pascal, C++.

    Returns
    The calculated length value.

ISolutionCuts

Collection interface used to create, enumerate, query, and reload a shared Desktop object set.

Source: SDK/include/pascal/uISolutionCuts.pas

Properties

  • Property name
    Count
    Type
    Integer
    Description

    Number of items currently exposed by the interface.

    Declaration

    property Count: Integer read GetCount;

    Published SDK declaration languages: Pascal, C++.

  • Property name
    Items
    Type
    ISolutionCut
    Description

    Indexed property used to read one item from the collection.

    Declaration

    property Items[aIndex: Cardinal]: ISolutionCut read GetByIndex; default;

    Published SDK declaration languages: Pascal, C++.

    Index Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
    Value
    The collection item located at the supplied index.

ISolutionWaste

Reusable or disposable waste region emitted from a solution sheet.

Source: SDK/include/pascal/uISolutionWaste.pas

Properties

  • Property name
    X
    Type
    Cardinal
    Description

    X coordinate value.

    Declaration

    property X: Cardinal read GetX;

    Published SDK declaration languages: Pascal.

  • Property name
    Y
    Type
    Cardinal
    Description

    Y coordinate value.

    Declaration

    property Y: Cardinal read GetY;

    Published SDK declaration languages: Pascal.

  • Property name
    Length
    Type
    Cardinal
    Description

    Length value stored on the object.

    Declaration

    property Length: Cardinal read GetLength;

    Published SDK declaration languages: Pascal.

  • Property name
    Width
    Type
    Cardinal
    Description

    Width value stored on the object.

    Declaration

    property Width: Cardinal read GetWidth;

    Published SDK declaration languages: Pascal.

  • Property name
    Shape
    Type
    IShape
    Description

    Shape object linked to the current entity.

    Declaration

    property Shape : IShape read GetShape;

    Published SDK declaration languages: Pascal.

  • Property name
    Holes
    Type
    ISheetDefects
    Description

    Read-only collection of holes: areas where the stock (or a remnant, on ISolutionWaste) has no material at all. A hole comes with the stock, is never created by TonCut, is not waste, and is not usable or available area. Support is currently limited. Holes use the same ISheetDefects collection type as defects, but their meaning differs.

    Declaration

    property Holes : ISheetDefects read GetHoles;

    Published SDK declaration languages: Pascal.

  • Property name
    Field
    Type
    TField
    Description

    Area-like value stored on the object.

    Declaration

    property Field : TField read GetField;

    Published SDK declaration languages: Pascal.

  • Property name
    Identifier
    Type
    WideString
    Description

    External or user-facing identifier stored with the object.

    Declaration

    property Identifier : WideString read GetIdentifier;

    Published SDK declaration languages: Pascal.

Methods

  • Method name
    GetShapePathAsString()
    Type
    WideString
    Description

    Return an SVG-compatible path string for the current shape outline.

    Declaration

    function GetShapePathAsString(): WideString; safecall;

    Published SDK declaration languages: Pascal.

    Returns
    The SVG-compatible path string for the current shape outline.

ISolutionWastes

Collection interface used to create, enumerate, query, and reload a shared Desktop object set.

Source: SDK/include/pascal/uISolutionWastes.pas

Properties

  • Property name
    Count
    Type
    Integer
    Description

    Number of items currently exposed by the interface.

    Declaration

    property Count: Integer read GetCount;

    Published SDK declaration languages: Pascal.

  • Property name
    Items
    Type
    ISolutionWaste
    Description

    Indexed property used to read one item from the collection.

    Declaration

    property Items[aIndex: Cardinal]: ISolutionWaste read GetByIndex; default;

    Published SDK declaration languages: Pascal.

    Index Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
    Value
    The collection item located at the supplied index.

Was this page helpful?