Devices
This page covers IDevice, IDevices, IDeviceChangeEvent, and IDeviceChangeEventHandler. Use these interfaces to describe machine limits, strip-cut behavior, slant support, cut-depth handling, and device-side cost modifiers.
Minimum cut constraints
MinCutDistance is the minimum kerf-excluded material gap between span-overlapping parallel cuts, calculated as line spacing minus kerf. It is independent of MinCutSize. AllowEdgeCuts on the material conflicts with either a positive MinCutSize or a positive MinCutDistance on its device; edge cuts can be enabled only when both device values are zero. Legacy MinCutWidth is only an alias for MinCutSize, never for MinCutDistance. MinEdgeDistance carries per-edge constraints in an IRectangle; a negative side means that edge is inherited or unspecified.
Each device also owns mutable ITcAlgorithmData. Its payload is opaque and implementation-defined; no public key/value schema or compatibility guarantee is provided.
Interfaces
IDevice
Mutable device definition describing machine constraints, cut rules, and cost-related tuning.
Source: SDK/include/pascal/uIDevice.pas
Properties
- Property name
- DefaultRotation
- Type
- Integer
- Description
Gets or sets the default (initial) rotation of the device, in degrees, and it is persisted with the device. Allowed values are 0, 90, 180 and 270; any other value raises
EArgumentOutOfRangeException. The default is 0. New in TonCut 8.5.GetDefaultRotation/SetDefaultRotationare vtable slots appended at the end of the interface under the same interface GUID, so no existing slot moves; everyIDeviceimplementer must add both methods. Engine version 24 carries these slots.Declaration
property DefaultRotation: Integer read GetDefaultRotation write SetDefaultRotation;Published SDK declaration languages: Pascal.
- Property name
- DefaultMirror
- Type
- Description
Gets or sets the default (initial) mirroring of the device as a
TMirrorsset, and it is persisted with the device. The flags aremHorizontalandmVertical; the default is the empty set (no mirroring), and a set with an unknown flag raises an exception. New in TonCut 8.5.GetDefaultMirror/SetDefaultMirrorare vtable slots appended at the end of the interface under the same interface GUID, so no existing slot moves; everyIDeviceimplementer must add both methods. Engine version 24 carries these slots.Declaration
property DefaultMirror: TMirrors read GetDefaultMirror write SetDefaultMirror;Published SDK declaration languages: Pascal.
- Property name
- Id
- Type
- Int64
- Description
Persistent numeric identifier used by TonCut to track the object.
Declaration
property Id: Int64 read GetId write SetId;Published SDK declaration languages: Pascal.
- Property name
- Title
- Type
- WideString
- Description
Human-readable title shown to users.
Declaration
property Title: WideString read GetTitle write SetTitle;Published SDK declaration languages: Pascal.
- Property name
- Driver
- Type
- WideString
- Description
Plugin
Nameassigned to the device driver. When set, TonCut treats the device as plugin-backed and can constrain plugin-controlled settings fromITcPlotterInfo.Declaration
property Driver: WideString read GetDriver write SetDriver;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
- 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
- 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
- MinCutSize
- Type
- Cardinal
- Description
Minimum cut size. This is the current name and migration target for the legacy
MinCutWidthvalue.Declaration
property MinCutSize: Cardinal read GetMinCutSize write SetMinCutSize;Published SDK declaration languages: Pascal.
- Property name
- MinCutDistance
- Type
- Cardinal
- Description
Minimum kerf-excluded material gap between span-overlapping parallel cuts, calculated as line spacing minus kerf. This is independent of
MinCutSize; legacyMinCutWidthmaps only toMinCutSize, never to this property.Declaration
property MinCutDistance: Cardinal read GetMinCutDistance write SetMinCutDistance;Published SDK declaration languages: Pascal.
- Property name
- MinEdgeDistance
- Type
- IRectangle
- Description
Per-edge minimum distance exposed as a signed rectangle; a negative side means inherited or unspecified.
Declaration
property MinEdgeDistance: IRectangle read GetMinEdgeDistance;Published SDK declaration languages: Pascal.
- Property name
- EdgingCuts
- Type
- Description
Gets or sets edging cuts.
Declaration
property EdgingCuts: TEdgingCuts read GetEdgingCuts write SetEdgingCuts;Published SDK declaration languages: Pascal.
- Property name
- OriginEdgingCuts
- Type
- Description
Gets or sets origin edging cuts.
Declaration
property OriginEdgingCuts: TOriginEdgingCuts read GetOriginEdgingCuts write SetOriginEdgingCuts;Published SDK declaration languages: Pascal.
- Property name
- MaxCutDepthOn
- Type
- Boolean
- Description
Gets or sets whether max cut depth on.
Declaration
property MaxCutDepthOn: Boolean read GetMaxCutDepthOn write SetMaxCutDepthOn;Published SDK declaration languages: Pascal.
- Property name
- MaxCutDepth
- Type
- Cardinal
- Description
Gets or sets max cut depth.
Declaration
property MaxCutDepth: Cardinal read GetMaxCutDepth write SetMaxCutDepth;Published SDK declaration languages: Pascal.
- Property name
- FirstCutDirection
- Type
- Description
Gets or sets first cut direction.
Declaration
property FirstCutDirection: TCutDirections read GetFirstCutDirection write SetFirstCutDirection;Published SDK declaration languages: Pascal.
- Property name
- MaxCutDepthIncludeSheetEdging
- Type
- Boolean
- Description
Gets or sets whether max cut depth include sheet edging.
Declaration
property MaxCutDepthIncludeSheetEdging: Boolean read GetMaxCutDepthIncludeSheetEdging write SetMaxCutDepthIncludeSheetEdging;Published SDK declaration languages: Pascal.
- Property name
- MaxCutLengthByLengthOn
- Type
- Boolean
- Description
Gets or sets whether max cut length by length on.
Declaration
property MaxCutLengthByLengthOn: Boolean read GetMaxCutLengthByLengthOn write SetMaxCutLengthByLengthOn;Published SDK declaration languages: Pascal.
- Property name
- MaxCutLengthByLength
- Type
- Cardinal
- Description
Gets or sets max cut length by length.
Declaration
property MaxCutLengthByLength: Cardinal read GetMaxCutLengthByLength write SetMaxCutLengthByLength;Published SDK declaration languages: Pascal.
- Property name
- MaxCutLengthByWidthOn
- Type
- Boolean
- Description
Gets or sets whether max cut length by width on.
Declaration
property MaxCutLengthByWidthOn: Boolean read GetMaxCutLengthByWidthOn write SetMaxCutLengthByWidthOn;Published SDK declaration languages: Pascal.
- Property name
- MaxCutLengthByWidth
- Type
- Cardinal
- Description
Gets or sets max cut length by width.
Declaration
property MaxCutLengthByWidth: Cardinal read GetMaxCutLengthByWidth write SetMaxCutLengthByWidth;Published SDK declaration languages: Pascal.
- Property name
- MaterialKind
- Type
- Description
Gets or sets material kind.
Declaration
property MaterialKind: TMaterialKind read GetMaterialKind write SetMaterialKind;Published SDK declaration languages: Pascal.
- Property name
- CanCutSlants
- Type
- Boolean
- Description
Whether slanted cuts are supported.
Declaration
property CanCutSlants: Boolean read GetCanCutSlants write SetCanCutSlants;Published SDK declaration languages: Pascal.
- Property name
- LeftSlantMeasurement
- Type
- Description
Gets or sets left slant measurement.
Declaration
property LeftSlantMeasurement: TSlantMeasurement read GetLeftSlantMeasurement write SetLeftSlantMeasurement;Published SDK declaration languages: Pascal.
- Property name
- RightSlantMeasurement
- Type
- Description
Measurement rule used for right-slanted geometry.
Declaration
property RightSlantMeasurement: TSlantMeasurement read GetRightSlantMeasurement write SetRightSlantMeasurement;Published SDK declaration languages: Pascal.
- Property name
- CutCostPerMeter
- Type
- TTcPrice
- Description
Cost per running meter of cut.
Declaration
property CutCostPerMeter: TTcPrice read GetCutCostPerMeter write SetCutCostPerMeter;Published SDK declaration languages: Pascal.
- Property name
- ReuseCost
- Type
- TTcPrice
- Description
Reuse-related cost value.
Declaration
property ReuseCost: TTcPrice read GetReuseCost write SetReuseCost;Published SDK declaration languages: Pascal.
- Property name
- UtilizationCost
- Type
- TTcPrice
- Description
Utilization cost stored on the object.
Declaration
property UtilizationCost: TTcPrice read GetUtilizationCost write SetUtilizationCost;Published SDK declaration languages: Pascal.
- Property name
- SegmentShiftCost
- Type
- TTcPrice
- Description
Cost assigned to segment shifts.
Declaration
property SegmentShiftCost: TTcPrice read GetSegmentShiftCost write SetSegmentShiftCost;Published SDK declaration languages: Pascal.
- Property name
- SegmentRotationCost
- Type
- TTcPrice
- Description
Cost assigned to segment rotation.
Declaration
property SegmentRotationCost: TTcPrice read GetSegmentRotationCost write SetSegmentRotationCost;Published SDK declaration languages: Pascal.
- Property name
- CustomData
- Type
- WideString
- Description
Opaque custom text payload stored with the object.
Declaration
property CustomData: WideString read GetCustomData write SetCustomData;Published SDK declaration languages: Pascal.
- Property name
- AlgorithmData
- Type
- ITcAlgorithmData
- Description
Mutable access to opaque, implementation-defined algorithm data owned by the current device, material, piece, or stock sheet. No public payload schema or compatibility guarantee is provided.
Declaration
property AlgorithmData: ITcAlgorithmData read GetAlgorithmData;Published SDK declaration languages: Pascal.
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;Published SDK declaration languages: Pascal.
- Property name
- OnIdChange
- Type
- IIdChangeEvent
- Description
Event fired when an identifier changes.
Declaration
property OnIdChange: IIdChangeEvent read GetOnIdChange;Published SDK declaration languages: Pascal.
Methods
- Method name
- Clone()
- Type
- IDevice
- Description
Create a copy of the current object.
Declaration
function Clone(): IDevice; safecall;Published SDK declaration languages: Pascal.
ReturnsA copied device interface instance.
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aOther: IDevice); safecall;Published SDK declaration languages: Pascal.
Parameters
- Method name
- BeginUpdate()
- Type
- procedure
- Description
Start a batched update so change notifications can be delayed.
Declaration
procedure BeginUpdate(); safecall;Published SDK declaration languages: Pascal.
- Method name
- EndUpdate()
- Type
- procedure
- Description
Finish a batched update and allow deferred notifications to resume.
Declaration
procedure EndUpdate(); safecall;Published SDK declaration languages: Pascal.
IDevices
Collection interface used to create, enumerate, query, and reload a shared Desktop object set.
Source: SDK/include/pascal/uIDevices.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
- IDevice
- Description
Indexed property used to read one item from the collection.
Declaration
property Items[aIndex: Cardinal]: IDevice read GetByIndex; default;Published SDK declaration languages: Pascal.
Index ParametersaIndexCardinalZero-based position within a collection.ValueThe collection item located at the supplied index.
- Property name
- OnAdd
- Type
- IDeviceChangeEvent
- Description
Event fired when an item is added.
Declaration
property OnAdd: IDeviceChangeEvent read GetOnAdd;Published SDK declaration languages: Pascal.
- Property name
- OnRemove
- Type
- IDeviceChangeEvent
- Description
Event fired when an item is removed.
Declaration
property OnRemove: IDeviceChangeEvent read GetOnRemove;Published SDK declaration languages: Pascal.
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;Published SDK declaration languages: Pascal.
Methods
- Method name
- CreateDevice()
- Type
- IDevice
- Description
Open the Desktop device dialog for a new device. The user can review and update the details before confirming; if the dialog is cancelled, the method returns
null.Declaration
function CreateDevice(): IDevice; safecall;Published SDK declaration languages: Pascal.
ReturnsThe created device interface instance, ornullif the user cancels the dialog.
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aDevice: IDevice); safecall;Published SDK declaration languages: Pascal.
Parameters
- Method name
- DeleteByIndex()
- Type
- procedure
- Description
Delete the item at the specified zero-based index.
Declaration
procedure DeleteByIndex(aIndex: Cardinal); safecall;Published SDK declaration languages: Pascal.
ParametersaIndexCardinalZero-based position within a collection.
- Method name
- DeleteById()
- Type
- procedure
- Description
Delete the item with the specified TonCut identifier.
Declaration
procedure DeleteById(aId: Int64); safecall;Published SDK declaration languages: Pascal.
ParametersaIdInt64TonCut object identifier.
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(const aDevice: IDevice); safecall;Published SDK declaration languages: Pascal.
Parameters
- Method name
- IndexOf()
- Type
- Integer
- Description
Return the zero-based index of the matching item.
Declaration
function IndexOf(const aDevice: IDevice): Integer; overload; safecall;Published SDK declaration languages: Pascal.
ParametersReturnsZero-based index of the matching item, or-1when no match exists.
- Method name
- IndexOf()
- Type
- Integer
- Description
Return the zero-based index of the matching item.
Declaration
function IndexOf(aId: Int64): Integer; overload; safecall;Published SDK declaration languages: Pascal.
ParametersaIdInt64TonCut object identifier.ReturnsZero-based index of the matching item, or-1when no match exists.
- Method name
- FindDuplicate()
- Type
- IDevice
- Description
Search for an existing item that duplicates the supplied object.
Declaration
function FindDuplicate(const aDevice: IDevice; aCheckTitle: Boolean = False): IDevice; safecall;Published SDK declaration languages: Pascal.
ParametersaCheckTitleBooleanWhether title collisions should count as duplicates.ReturnsThe matching device interface instance, ornullwhen not found.
- Method name
- FindByTitle()
- Type
- IDevice
- Description
Find an item by its title and any additional matching fields.
Declaration
function FindByTitle(const aTitle: WideString): IDevice; safecall;Published SDK declaration languages: Pascal.
ParametersaTitleconstWideStringHuman-readable title.ReturnsThe matching device interface instance, ornullwhen not found.
- Method name
- FindUniqueName()
- Type
- WideString
- Description
Generate or return a title that is unique within the collection.
Declaration
function FindUniqueName(const aBaseName: WideString): WideString; safecall;Published SDK declaration languages: Pascal.
ParametersaBaseNameconstWideStringBase title used while generating a unique name.ReturnsA title string that is unique within the collection.
- Method name
- CheckUniqueName()
- Type
- Boolean
- Description
Check whether a proposed title is unique within the collection.
Declaration
function CheckUniqueName(const aTitle: WideString; const aIgnoreDevice: IDevice): Boolean; overload; safecall;Published SDK declaration languages: Pascal.
ParametersaTitleconstWideStringHuman-readable title.ReturnsReturnstrueif the proposed title is unique within the collection.
- Method name
- CheckUniqueName()
- Type
- Boolean
- Description
Check whether a proposed title is unique within the collection.
Declaration
function CheckUniqueName(aDevice: IDevice; aAutoFix: Boolean = False): Boolean; overload; safecall;Published SDK declaration languages: Pascal.
ParametersaAutoFixBooleanWhether the method may adjust data automatically.ReturnsReturnstrueif the proposed title is unique within the collection.
- Method name
- GetById()
- Type
- IDevice
- Description
Return the item stored under the specified TonCut identifier.
Declaration
function GetById(aId: Int64): IDevice; safecall;Published SDK declaration languages: Pascal.
ParametersaIdInt64TonCut object identifier.ReturnsThe matching device interface instance.
- Method name
- BeginUpdate()
- Type
- procedure
- Description
Start a batched update so change notifications can be delayed.
Declaration
procedure BeginUpdate(); safecall;Published SDK declaration languages: Pascal.
- Method name
- EndUpdate()
- Type
- procedure
- Description
Finish a batched update and allow deferred notifications to resume.
Declaration
procedure EndUpdate(); safecall;Published SDK declaration languages: Pascal.
- Method name
- IsUpdating()
- Type
- Boolean
- Description
Report whether the interface is currently inside an update batch.
Declaration
function IsUpdating(): Boolean; safecall;Published SDK declaration languages: Pascal.
ReturnsReturnstruewhile the interface is inside aBeginUpdate/EndUpdatebatch.
- Method name
- Reload()
- Type
- procedure
- Description
Reload the underlying data from the host or storage layer.
Declaration
procedure Reload(); safecall;Published SDK declaration languages: Pascal.
IDeviceChangeEventHandler
Callback sink consumed by the matching change-event interface.
Source: SDK/include/pascal/uIDeviceChangeEvent.pas
Methods
- Method name
- Invoke()
- Type
- procedure
- Description
Handle the event callback when the owning event interface invokes it.
Declaration
procedure Invoke(aSender: IUnknown; aDevice: IDevice; aIndex: Integer); safecall;Published SDK declaration languages: Pascal.
ParametersaSenderIUnknownObject that raised the event.aIndexIntegerZero-based position within a collection.
IDeviceChangeEvent
Event interface with Add, Remove, and Invoke hooks for collection or entity change notifications.
Source: SDK/include/pascal/uIDeviceChangeEvent.pas
Methods
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aHandler: IDeviceChangeEventHandler); safecall;Published SDK declaration languages: Pascal.
Parameters
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(aHandler: IDeviceChangeEventHandler); safecall;Published SDK declaration languages: Pascal.
Parameters
- Method name
- Invoke()
- Type
- procedure
- Description
Raise the typed change event for the current payload.
Declaration
procedure Invoke(aSender: IUnknown; aDevice: IDevice; aIndex: Integer); safecall;Published SDK declaration languages: Pascal.
ParametersaSenderIUnknownObject that raised the event.aIndexIntegerEvent payload field for index.