Host Services
This page covers ITonCut and ITcPlotterInfo, the two service interfaces that connect a plugin to the Desktop host. ITonCut gives you shared state and factory helpers. ITcPlotterInfo lets plot-capable plugins describe the target machine or output geometry assumptions, and those values become relevant when a device Driver is set to the plugin Name.
Host gateway
ITonCut is the main service object passed into Initialize. It exposes shared collections such as Devices, Materials, Formats, and Results, but it also provides helper methods for creating materials, bands, and projects, formatting values in host units, and creating or releasing a current solution.
Plot metadata
ITcPlotterInfo is usually populated during plugin initialization. TonCut reads it when a plugin advertises plot or plot-save features and needs to know movement, axis, material-kind, bridge, head-size, and related machine constraints. If a device Driver is assigned to that plugin Name, TonCut can use the plotter info to constrain or override the device settings that are controlled by the plugin.
Interfaces
ITonCut
Host gateway that exposes shared collections, formatting helpers, selection state, and solution lifecycle control.
Source: SDK/include/pascal/uITonCut.pas
Properties
- Property name
- Units
- Type
- Description
Current host length unit system.
Declaration
property Units: TUnits read GetUnits;Published SDK declaration languages: Pascal, C++.
- Property name
- Precision
- Type
- Integer
- Description
Current host numeric precision for formatting and display.
Declaration
property Precision: Integer read GetPrecision;Published SDK declaration languages: Pascal, C++.
- Property name
- PieceIdentification
- Type
- Description
Current host rule for identifying pieces in generated output.
Declaration
property PieceIdentification: TPieceIdentification read GetPieceIdentification;Published SDK declaration languages: Pascal, C++.
- Property name
- UsingProjects
- Type
- Boolean
- Description
Whether the host currently groups formats by projects.
Declaration
property UsingProjects: Boolean read GetUsingProjects;Published SDK declaration languages: Pascal, C++.
- Property name
- SelectedProject
- Type
- IProject
- Description
Currently selected project when project mode is active.
Declaration
property SelectedProject: IProject read GetSelectedProject;Published SDK declaration languages: Pascal, C++.
- Property name
- Devices
- Type
- IDevices
- Description
Shared device collection exposed by the host.
Declaration
property Devices: IDevices read GetDevices;Published SDK declaration languages: Pascal, C++.
- Property name
- Materials
- Type
- IMaterials
- Description
Shared material collection exposed by the host.
Declaration
property Materials: IMaterials read GetMaterials;Published SDK declaration languages: Pascal, C++.
- Property name
- Bands
- Type
- IBands
- Description
Shared band collection exposed by the host.
Declaration
property Bands: IBands read GetBands;Published SDK declaration languages: Pascal, C++.
- Property name
- Sheets
- Type
- ISheets
- Description
Shared stock-sheet collection exposed by the host.
Declaration
property Sheets: ISheets read GetSheets;Published SDK declaration languages: Pascal, C++.
- Property name
- Templates
- Type
- ITemplates
- Description
Shared template collection exposed by the host.
Declaration
property Templates: ITemplates read GetTemplates;Published SDK declaration languages: Pascal, C++.
- Property name
- Projects
- Type
- IProjects
- Description
Shared project collection exposed by the host.
Declaration
Published SDK declaration languages: Pascal, C++.
- Property name
- Formats
- Type
- IFormats
- Description
Shared format collection exposed by the host.
Declaration
property Formats: IFormats read GetFormats;Published SDK declaration languages: Pascal, C++.
- Property name
- Results
- Type
- IResults
- Description
Shared saved-result collection exposed by the host.
Declaration
property Results: IResults read GetResults;Published SDK declaration languages: Pascal, C++.
- Property name
- Solution
- Type
- ISolution
- Description
Current solution object exposed by the host.
Declaration
property Solution: ISolution read GetSolution;Published SDK declaration languages: Pascal, C++.
Methods
- Method name
- CreateSolution()
- Type
- procedure
- Description
Ask the host to create the current solution object.
Declaration
procedure CreateSolution(); safecall;Published SDK declaration languages: Pascal, C++.
- Method name
- ReleaseSolution()
- Type
- procedure
- Description
Ask the host to release the current solution object.
Declaration
procedure ReleaseSolution(); safecall;Published SDK declaration languages: Pascal, C++.
- Method name
- CreateMaterial()
- Type
- IMaterial
- Description
Open the Desktop material dialog with the supplied values prefilled. The user can review and update the details before confirming; if the dialog is cancelled, the method returns
null.Declaration
function CreateMaterial(const aTitle: WideString; aKind: TMaterialKind; aWidth: Cardinal; aThickness: Cardinal): IMaterial; safecall;Published SDK declaration languages: Pascal, C++.
ParametersaTitleconstWideStringHuman-readable title.aKindValue for kind.aWidthCardinalWidth value in TonCut units.aThicknessCardinalThickness value in TonCut units.ReturnsThe created material interface instance, ornullif the user cancels the dialog.
- Method name
- CreateBand()
- Type
- IBand
- Description
Open the Desktop band dialog with the supplied values prefilled. The user can review and update the details before confirming; if the dialog is cancelled, the method returns
null.Declaration
function CreateBand(const aTitle: WideString; aWidth: Cardinal; aThickness: Cardinal; aMaterialThickness: Cardinal; aSurplus: Cardinal): IBand; safecall;Published SDK declaration languages: Pascal, C++.
ParametersaTitleconstWideStringHuman-readable title.aWidthCardinalWidth value in TonCut units.aThicknessCardinalThickness value in TonCut units.aMaterialThicknessCardinalMaterial thickness value in TonCut units.aSurplusCardinalSurplus value in TonCut units.ReturnsThe created band interface instance, ornullif the user cancels the dialog.
- Method name
- CreateProject()
- Type
- IProject
- Description
Open the Desktop project dialog with the supplied values prefilled. The user can review and update the details before confirming; if the dialog is cancelled, the method returns
null.Declaration
function CreateProject(const aTitle: WideString): IProject; safecall;Published SDK declaration languages: Pascal, C++.
ParametersaTitleconstWideStringHuman-readable title.ReturnsThe created project interface instance, ornullif the user cancels the dialog.
- Method name
- CanCutAnyShapes()
- Type
- Boolean
- Description
Check whether the selected device supports non-rectangular shapes.
Declaration
function CanCutAnyShapes(const aDevice: IDevice): Boolean; safecall;Published SDK declaration languages: Pascal, C++.
ParametersReturnsReturnstrueif the device is able to cut out any shapes, not only rectangles.
- Method name
- FormatLength()
- Type
- WideString
- Description
Format a length value using current host settings.
Declaration
function FormatLength(aValue: Integer; aShort: Boolean = False): WideString; overload; safecall;Published SDK declaration languages: Pascal.
ParametersaValueIntegerValue being formatted, assigned, or stored.aShortBooleanWhether a shortened textual representation should be used.ReturnsThe length formatted as a string using the current host settings.
- Method name
- FormatLength()
- Type
- WideString
- Description
Format a length value using current host settings.
Declaration
function FormatLength(aValue: Double; aShort: Boolean = False): WideString; overload; safecall;Published SDK declaration languages: Pascal.
ParametersaValueDoubleValue being formatted, assigned, or stored.aShortBooleanWhether a shortened textual representation should be used.ReturnsThe length formatted as a string using the current host settings.
- Method name
- HumanReadableLength()
- Type
- WideString
- Description
Return a human-readable length string using current host settings.
Declaration
function HumanReadableLength(aValue: Double; aShort: Boolean = False): WideString; safecall;Published SDK declaration languages: Pascal, C++.
ParametersaValueDoubleValue being formatted, assigned, or stored.aShortBooleanWhether a shortened textual representation should be used.ReturnsA human-readable length string using the current host settings.
- Method name
- FormatField()
- Type
- WideString
- Description
Format an area or field value using current host settings.
Declaration
function FormatField(aValue: TField; aShort: Boolean = False): WideString; safecall;Published SDK declaration languages: Pascal, C++.
ParametersaValueTFieldValue being formatted, assigned, or stored.aShortBooleanWhether a shortened textual representation should be used.ReturnsThe field or area formatted as a string using the current host settings.
- Method name
- HumanReadableField()
- Type
- WideString
- Description
Return a human-readable area or field string using current host settings.
Declaration
function HumanReadableField(aValue: TField; aShort: Boolean = False): WideString; overload; safecall;Published SDK declaration languages: Pascal.
ParametersaValueTFieldValue being formatted, assigned, or stored.aShortBooleanWhether a shortened textual representation should be used.ReturnsA human-readable field or area string using the current host settings.
- Method name
- HumanReadableField()
- Type
- WideString
- Description
Return a human-readable area or field string using current host settings.
Declaration
function HumanReadableField(aValue: Double; aShort: Boolean = False): WideString; overload; safecall;Published SDK declaration languages: Pascal.
ParametersaValueDoubleValue being formatted, assigned, or stored.aShortBooleanWhether a shortened textual representation should be used.ReturnsA human-readable field or area string using the current host settings.
- Method name
- FormatDegrees()
- Type
- WideString
- Description
Format an angle expressed in degrees.
Declaration
function FormatDegrees(aAngle: Double; aShort: Boolean = False): WideString; safecall;Published SDK declaration languages: Pascal, C++.
ParametersaAngleDoubleAngle value supplied to the formatter.aShortBooleanWhether a shortened textual representation should be used.ReturnsThe angle formatted in degrees using the current host settings.
- Method name
- FormatRadians()
- Type
- WideString
- Description
Format an angle expressed in radians.
Declaration
function FormatRadians(aAngle: Double; aShort: Boolean = False): WideString; safecall;Published SDK declaration languages: Pascal, C++.
ParametersaAngleDoubleAngle value supplied to the formatter.aShortBooleanWhether a shortened textual representation should be used.ReturnsThe angle formatted in radians using the current host settings.
ITcPlotterInfo
Plotter capability descriptor returned by plot-capable plugins. When a device Driver names that plugin, TonCut can use this object to constrain plugin-controlled device settings.
Source: SDK/include/pascal/uITcPlotterInfo.pas
Properties
- Property name
- PlotterType
- Type
- Description
Plotter or machine category described by this object.
Declaration
property PlotterType: TTcPlotterType read GetPlotterType write SetPlotterType;Published SDK declaration languages: Pascal.
- Property name
- MaterialKinds
- Type
- Description
Material kinds supported by the plotter.
Declaration
property MaterialKinds: TMaterialKinds read GetMaterialKinds write SetMaterialKinds;Published SDK declaration languages: Pascal.
- Property name
- AxisX
- Type
- Description
Mapping of TonCut coordinates to the machine X axis.
Declaration
property AxisX: TTcAxisDirection read GetAxisX write SetAxisX;Published SDK declaration languages: Pascal.
- Property name
- AxisY
- Type
- Description
Mapping of TonCut coordinates to the machine Y axis.
Declaration
property AxisY: TTcAxisDirection read GetAxisY write SetAxisY;Published SDK declaration languages: Pascal.
- Property name
- SizeX
- Type
- Cardinal
- Description
Maximum usable size along the X axis.
Declaration
property SizeX: Cardinal read GetSizeX write SetSizeX;Published SDK declaration languages: Pascal.
- Property name
- SizeY
- Type
- Cardinal
- Description
Maximum usable size along the Y axis.
Declaration
property SizeY: Cardinal read GetSizeY write SetSizeY;Published SDK declaration languages: Pascal.
- Property name
- CanCrossCuts
- Type
- Boolean
- Description
Whether cuts are allowed to cross each other.
Declaration
property CanCrossCuts: Boolean read GetCanCrossCuts write SetCanCrossCuts;Published SDK declaration languages: Pascal.
- Property name
- FullCutsOnly
- Type
- Boolean
- Description
Whether only full-through cuts are supported.
Declaration
property FullCutsOnly: Boolean read GetFullCutsOnly write SetFullCutsOnly;Published SDK declaration languages: Pascal.
- Property name
- CanCutAnyShapes
- Type
- Boolean
- Description
Whether non-rectangular shapes are supported.
Declaration
property CanCutAnyShapes: Boolean read GetCanCutAnyShapes write SetCanCutAnyShapes;Published SDK declaration languages: Pascal.
- Property name
- StripCuts
- Type
- Description
Strip-cutting capability mode.
Declaration
property StripCuts: TStripCutting read GetStripCuts write SetStripCuts;Published SDK declaration languages: Pascal.
- Property name
- MaxStripeWidth
- Type
- Integer
- Description
Maximum width of one strip cut.
Declaration
property MaxStripeWidth: Integer read GetMaxStripeWidth write SetMaxStripeWidth;Published SDK declaration languages: Pascal.
- Property name
- CutsDepthOn
- Type
- Boolean
- Description
Whether cut depth handling is enabled.
Declaration
property CutsDepthOn: Boolean read GetCutsDepthOn write SetCutsDepthOn;Published SDK declaration languages: Pascal.
- Property name
- CutsDepth
- Type
- Cardinal
- Description
Configured cut depth.
Declaration
property CutsDepth: Cardinal read GetCutsDepth write SetCutsDepth;Published SDK declaration languages: Pascal.
- Property name
- CutsDepthIncMargins
- Type
- Boolean
- Description
Whether cut depth measurements include machine margins.
Declaration
property CutsDepthIncMargins: Boolean read GetCutsDepthIncMargins write SetCutsDepthIncMargins;Published SDK declaration languages: Pascal.
- Property name
- TwoDimensionMoves
- Type
- Boolean
- Description
Whether the machine can perform free two-axis movement.
Declaration
property TwoDimensionMoves: Boolean read GetTwoDimensionMoves write SetTwoDimensionMoves;Published SDK declaration languages: Pascal.
- Property name
- PrefferedDirection
- Type
- Description
Preferred movement direction.
Declaration
property PrefferedDirection: TTcMoveDirection read GetPrefferedDirection write SetPrefferedDirection;Published SDK declaration languages: Pascal.
- Property name
- MarginWest
- Type
- Cardinal
- Description
Machine margin on the west or left edge.
Declaration
property MarginWest: Cardinal read GetMarginWest write SetMarginWest;Published SDK declaration languages: Pascal.
- Property name
- MarginNorth
- Type
- Cardinal
- Description
Machine margin on the north or top edge.
Declaration
property MarginNorth: Cardinal read GetMarginNorth write SetMarginNorth;Published SDK declaration languages: Pascal.
- Property name
- MarginEast
- Type
- Cardinal
- Description
Machine margin on the east or right edge.
Declaration
property MarginEast: Cardinal read GetMarginEast write SetMarginEast;Published SDK declaration languages: Pascal.
- Property name
- MarginSouth
- Type
- Cardinal
- Description
Machine margin on the south or bottom edge.
Declaration
property MarginSouth: Cardinal read GetMarginSouth write SetMarginSouth;Published SDK declaration languages: Pascal.
- Property name
- BridgeMoveDirection
- Type
- Description
Preferred movement direction while creating bridges.
Declaration
property BridgeMoveDirection: TTcMoveDirection read GetBridgeMoveDirection write SetBridgeMoveDirection;Published SDK declaration languages: Pascal.
- Property name
- BridgeSize
- Type
- Cardinal
- Description
Default bridge size.
Declaration
property BridgeSize: Cardinal read GetBridgeSize write SetBridgeSize;Published SDK declaration languages: Pascal.
- Property name
- HeadSize
- Type
- Cardinal
- Description
Cutting-head size.
Declaration
property HeadSize: Cardinal read GetHeadSize write SetHeadSize;Published SDK declaration languages: Pascal.
- Property name
- HeadKnifeSpace
- Type
- Cardinal
- Description
Distance between the head reference point and the knife.
Declaration
property HeadKnifeSpace: Cardinal read GetHeadKnifeSpace write SetHeadKnifeSpace;Published SDK declaration languages: Pascal.
- Property name
- DefaultRotation
- Type
- Integer
- Description
Default rotation suggested by the plotter descriptor.
Declaration
property DefaultRotation: Integer read GetDefaultRotation write SetDefaultRotation;Published SDK declaration languages: Pascal.
- Property name
- DefaultMirror
- Type
- Description
Default mirror state suggested by the plotter descriptor.
Declaration
property DefaultMirror: TMirrors read GetDefaultMirror write SetDefaultMirror;Published SDK declaration languages: Pascal.
Methods
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aOther: ITcPlotterInfo); safecall;Published SDK declaration languages: Pascal.
Parameters