Materials
This page covers IMaterial, IMaterials, IMaterialChangeEvent, IMaterialChangeEventHandler, IStandardSheet, IStandardSheets, IStandardSheetChangeEvent, and IStandardSheetChangeEventHandler. These interfaces describe stock behavior, cost rules, reusable stock sizes, and material-related host events.
IMaterial now exposes both minimum and maximum shorter/longer
recycle sizes, their effective values, per-edge MinEdgeDistance, and mutable
ITcAlgorithmData. Its payload is opaque and
implementation-defined; no public key/value schema or compatibility guarantee is
provided. Treat these properties as independent parts of the current material
contract.
IMaterials adds BeginUpdate, EndUpdate, IsUpdating, and
OnChange in engine version 25. BeginUpdate, EndUpdate, IsUpdating, and
GetOnChange are appended after the existing vtable slots under the same interface GUID. See Update scopes
for nesting, notifications, and error handling. Rebuild plugins against the
matching SDK; the Desktop host requires an exact engine version match.
Interfaces
Declarations are shown in Pascal and, where the SDK's generated language-support manifest lists the member for C++, in C++; the build fails if that manifest no longer matches TonCutPluginSdk.hpp. There is no C# declaration: C# plugins are native-shim-only, so a C++ shim owns every interface on this page. Methods are listed with their accessors folded into properties; open Vtable order for the exact slot sequence, and see ABI and marshalling for type sizes and ownership rules.
IMaterial
Material definition describing stock behavior, cutting rules, recycling settings, costs, and standard stock sizes.
- IID
- {5C81D3A6-7E42-4B19-8F63-2D9B5A14C708}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIMaterial
Vtable order (119 methods, slots 3 to 121, after the three IUnknown slots)
- function GetId(): Int64;
- procedure SetId(aId: Int64);
- function GetTitle(): WideString;
- procedure SetTitle(const aTitle: WideString);
- function GetKind(): TMaterialKind;
- procedure SetKind(aKind: TMaterialKind);
- function GetWidth(): Cardinal;
- procedure SetWidth(aWidth: Cardinal);
- function GetThickness(): Cardinal;
- procedure SetThickness(aThickness: Cardinal);
- function GetHasOrnament(): Boolean;
- procedure SetHasOrnament(aHasOrnament: Boolean);
- function GetCanRotate(): Boolean;
- procedure SetCanRotate(aCanRotate: Boolean);
- function GetCanMirror(): Boolean;
- procedure SetCanMirror(aCanMirror: Boolean);
- function GetSurplus(): Cardinal;
- procedure SetSurplus(aSurplus: Cardinal);
- function GetSurplusEditable(): Boolean;
- procedure SetSurplusEditable(aEditable: Boolean);
- function GetMargin(): Cardinal;
- procedure SetMargin(aMargin: Cardinal);
- function GetMarginEditable(): Boolean;
- procedure SetMarginEditable(aEditable: Boolean);
- function GetDefaultEdging(): Cardinal;
- procedure SetDefaultEdging(aEdging: Cardinal);
- function GetCuttingDimensions(): TCuttingDimensions;
- procedure SetCuttingDimensions(aCuttingDimensions: TCuttingDimensions);
- function GetBandable(): Boolean;
- procedure SetBandable(aBandable: Boolean);
- function GetGrindable(): Boolean;
- procedure SetGrindable(aGrindable: Boolean);
- function GetColorable(): Boolean;
- procedure SetColorable(aColorable: Boolean);
- function GetDevice(): IDevice;
- procedure SetDevice(const aDevice: IDevice);
- function GetAlgorithm(): WideString;
- procedure SetAlgorithm(const aAlgorithm: WideString);
- function GetQualityLevel(): TQualityLevel;
- procedure SetQualityLevel(aQualityLevel: TQualityLevel);
- function GetReuseWaste(): Boolean;
- procedure SetReuseWaste(aReuse: Boolean);
- function GetMinShorterRecycleSize(): Cardinal;
- procedure SetMinShorterRecycleSize(aSize: Cardinal);
- function GetMinLongerRecycleSize(): Cardinal;
- procedure SetMinLongerRecycleSize(aSize: Cardinal);
- function GetMaxShorterRecycleSize(): Cardinal;
- procedure SetMaxShorterRecycleSize(aSize: Cardinal);
- function GetMaxLongerRecycleSize(): Cardinal;
- procedure SetMaxLongerRecycleSize(aSize: Cardinal);
- function GetPrefShorterRecycleSize(): Cardinal;
- procedure SetPrefShorterRecycleSize(aSize: Cardinal);
- function GetPrefLongerRecycleSize(): Cardinal;
- procedure SetPrefLongerRecycleSize(aSize: Cardinal);
- function GetEffectiveMinShorterRecycleSize(): Cardinal;
- function GetEffectiveMinLongerRecycleSize(): Cardinal;
- function GetEffectiveMaxShorterRecycleSize(): Cardinal;
- function GetEffectiveMaxLongerRecycleSize(): Cardinal;
- function GetEffectivePrefShorterRecycleSize(): Cardinal;
- function GetEffectivePrefLongerRecycleSize(): Cardinal;
- function GetKerf(): Cardinal;
- procedure SetKerf(aKerf: Cardinal);
- function GetMinEdgeDistance(): IRectangle;
- function GetAllowEdgeCuts(): Boolean;
- procedure SetAllowEdgeCuts(aAllow: Boolean);
- function GetRecycleEdgingOn(): Boolean;
- procedure SetRecycleEdgingOn(aOn: Boolean);
- function GetRecycleEdging(): Cardinal;
- procedure SetRecycleEdging(aMargins: Cardinal);
- function GetStackCutting(): Boolean;
- procedure SetStackCutting(aStackCutting: Boolean);
- function GetStackSize(): Cardinal;
- procedure SetStackSize(aSize: Cardinal);
- function GetAllowPartialStack(): Boolean;
- procedure SetAllowPartialStack(aAllow: Boolean);
- function GetMinStackSize(): Cardinal;
- procedure SetMinStackSize(aSize: Cardinal);
- function GetPricePerSqM(): TTcPrice;
- procedure SetPricePerSqM(aCost: TTcPrice);
- function GetWeightOfSqM(): TTcWeight;
- procedure SetWeightOfSqM(aWeight: TTcWeight);
- function GetPricePerMeter(): TTcPrice;
- procedure SetPricePerMeter(aCost: TTcPrice);
- function GetWeightOfMeter(): TTcWeight;
- procedure SetWeightOfMeter(aWeight: TTcWeight);
- function GetCutCostPerMeter(): TTcPrice;
- procedure SetCutCostPerMeter(aCost: TTcPrice);
- function GetReuseCost(): TTcPrice;
- procedure SetReuseCost(aCost: TTcPrice);
- function GetUtilizationCostPerKg(): TTcPrice;
- procedure SetUtilizationCostPerKg(aCost: TTcPrice);
- function GetSegmentShiftCost(): TTcPrice;
- procedure SetSegmentShiftCost(aCost: TTcPrice);
- function GetSegmentRotationCost(): TTcPrice;
- procedure SetSegmentRotationCost(aCost: TTcPrice);
- function GetPriceToCostMultiplier(): Double;
- procedure SetPriceToCostMultiplier(aMultiplier: Double);
- function GetReusableWasteExpectedUsage(): Double;
- procedure SetReusableWasteExpectedUsage(aExpectedUsage: Double);
- function GetCutExcess(): Integer;
- procedure SetCutExcess(aCutExcess: Integer);
- function GetCutShiftTotalLimit(): Integer;
- procedure SetCutShiftTotalLimit(aLimit: Integer);
- function GetCutShiftHorzLimit(): Integer;
- procedure SetCutShiftHorzLimit(aLimit: Integer);
- function GetCutShiftVertLimit(): Integer;
- procedure SetCutShiftVertLimit(aLimit: Integer);
- function GetCustomData(): WideString;
- procedure SetCustomData(const aData: WideString);
- function GetAlgorithmData(): ITcAlgorithmData;
- function GetStandardSheets(): IStandardSheets;
- function GetOnChange(): INotifyEvent;
- function GetOnIdChange(): IIdChangeEvent;
- function GetOnStandardSheetAdd(): IStandardSheetChangeEvent;
- function GetOnStandardSheetRemove(): IStandardSheetChangeEvent;
- function GetOnStandardSheetChange(): IStandardSheetChangeEvent;
- procedure Assign(const aOther: IMaterial);
- procedure BeginUpdate();
- procedure EndUpdate();
Properties
- Property name
- Id
- Type
- Int64
- Description
Persistent numeric identifier used by TonCut to track the object.
Declaration
property Id: Int64 read GetId write SetId;
- Property name
- Title
- Type
- WideString
- Description
Human-readable title shown to users.
Declaration
property Title: WideString read GetTitle write SetTitle;
- Property name
- Kind
- Type
- Description
Enumerated kind describing the current object.
Declaration
property Kind: TMaterialKind read GetKind write SetKind;
- Property name
- Width
- Type
- Cardinal
- Description
Bar width of a 1D material, in hundredths of a millimeter. A 2D material has width 0.
Declaration
property Width: Cardinal read GetWidth write SetWidth;
- Property name
- Thickness
- Type
- Cardinal
- Description
Thickness value stored on the object.
Declaration
property Thickness: Cardinal read GetThickness write SetThickness;
- Property name
- HasOrnament
- Type
- Boolean
- Description
Gets or sets whether has ornament.
Declaration
property HasOrnament: Boolean read GetHasOrnament write SetHasOrnament;
- Property name
- CanRotate
- Type
- Boolean
- Description
Whether rotation is allowed.
Declaration
property CanRotate: Boolean read GetCanRotate write SetCanRotate;
- Property name
- CanMirror
- Type
- Boolean
- Description
Whether mirroring is allowed.
Declaration
property CanMirror: Boolean read GetCanMirror write SetCanMirror;
- Property name
- Surplus
- Type
- Cardinal
- Description
Surplus allowance stored on the object.
Declaration
property Surplus: Cardinal read GetSurplus write SetSurplus;
- Property name
- SurplusEditable
- Type
- Boolean
- Description
Gets or sets whether surplus editable.
Declaration
property SurplusEditable: Boolean read GetSurplusEditable write SetSurplusEditable;
- Property name
- Margin
- Type
- Cardinal
- Description
Margin allowance stored on the object.
Declaration
property Margin: Cardinal read GetMargin write SetMargin;
- Property name
- MarginEditable
- Type
- Boolean
- Description
Gets or sets whether margin editable.
Declaration
property MarginEditable: Boolean read GetMarginEditable write SetMarginEditable;
- Property name
- DefaultEdging
- Type
- Cardinal
- Description
Gets or sets default edging.
Declaration
property DefaultEdging: Cardinal read GetDefaultEdging write SetDefaultEdging;
- Property name
- CuttingDimensions
- Type
- Description
Gets or sets cutting dimensions.
Declaration
property CuttingDimensions: TCuttingDimensions read GetCuttingDimensions write SetCuttingDimensions;
- Property name
- Bandable
- Type
- Boolean
- Description
Gets or sets whether bandable.
Declaration
property Bandable: Boolean read GetBandable write SetBandable;
- Property name
- Grindable
- Type
- Boolean
- Description
Gets or sets whether grindable.
Declaration
property Grindable: Boolean read GetGrindable write SetGrindable;
- Property name
- Colorable
- Type
- Boolean
- Description
Gets or sets whether colorable.
Declaration
property Colorable: Boolean read GetColorable write SetColorable;
- Property name
- Device
- Type
- IDevice
- Description
Cutting device of the material. Every new material a plugin stages in
LoadFilemust have it set to a device fromITonCut.Devices.Declaration
property Device: IDevice read GetDevice write SetDevice;
- Property name
- Algorithm
- Type
- WideString
- Description
Name of the optimization algorithm this material prefers. An empty string or
defaultlets TonCut choose the algorithm from the material kind and the device’s capabilities. Any other value is honoured only with an Enterprise license (otherwise TonCut makes the automatic choice), and it must then name an algorithm registered in TonCut: an unregistered name makes the optimization fail. The property is aWideStringsince the 2026-11 contract correction at engine version 24; a plugin built against an older SDK, which declared it as a DelphiString, must not use it.Declaration
property Algorithm: WideString read GetAlgorithm write SetAlgorithm;
- Property name
- QualityLevel
- Type
- Description
Gets or sets quality level.
Declaration
property QualityLevel: TQualityLevel read GetQualityLevel write SetQualityLevel;
- Property name
- ReuseWaste
- Type
- Boolean
- Description
Whether waste can be reused as stock.
Declaration
property ReuseWaste: Boolean read GetReuseWaste write SetReuseWaste;
- Property name
- MinShorterRecycleSize
- Type
- Cardinal
- Description
Gets or sets min shorter recycle size.
Declaration
property MinShorterRecycleSize: Cardinal read GetMinShorterRecycleSize write SetMinShorterRecycleSize;
- Property name
- MinLongerRecycleSize
- Type
- Cardinal
- Description
Gets or sets min longer recycle size.
Declaration
property MinLongerRecycleSize: Cardinal read GetMinLongerRecycleSize write SetMinLongerRecycleSize;
- Property name
- MaxShorterRecycleSize
- Type
- Cardinal
- Description
Maximum shorter dimension accepted for recycled material reuse.
Declaration
property MaxShorterRecycleSize: Cardinal read GetMaxShorterRecycleSize write SetMaxShorterRecycleSize;
- Property name
- MaxLongerRecycleSize
- Type
- Cardinal
- Description
Maximum longer dimension accepted for recycled material reuse.
Declaration
property MaxLongerRecycleSize: Cardinal read GetMaxLongerRecycleSize write SetMaxLongerRecycleSize;
- Property name
- PrefShorterRecycleSize
- Type
- Cardinal
- Description
Preferred shorter dimension for recycled material reuse.
Declaration
property PrefShorterRecycleSize: Cardinal read GetPrefShorterRecycleSize write SetPrefShorterRecycleSize;
- Property name
- PrefLongerRecycleSize
- Type
- Cardinal
- Description
Preferred longer dimension for recycled material reuse.
Declaration
property PrefLongerRecycleSize: Cardinal read GetPrefLongerRecycleSize write SetPrefLongerRecycleSize;
- Property name
- EffectiveMinShorterRecycleSize
- Type
- Cardinal
- Description
Gets effective min shorter recycle size.
Declaration
property EffectiveMinShorterRecycleSize: Cardinal read GetEffectiveMinShorterRecycleSize;
- Property name
- EffectiveMinLongerRecycleSize
- Type
- Cardinal
- Description
Gets effective min longer recycle size.
Declaration
property EffectiveMinLongerRecycleSize: Cardinal read GetEffectiveMinLongerRecycleSize;
- Property name
- EffectiveMaxShorterRecycleSize
- Type
- Cardinal
- Description
Effective maximum shorter recycle dimension after host rules are applied.
Declaration
property EffectiveMaxShorterRecycleSize: Cardinal read GetEffectiveMaxShorterRecycleSize;
- Property name
- EffectiveMaxLongerRecycleSize
- Type
- Cardinal
- Description
Effective maximum longer recycle dimension after host rules are applied.
Declaration
property EffectiveMaxLongerRecycleSize: Cardinal read GetEffectiveMaxLongerRecycleSize;
- Property name
- EffectivePrefShorterRecycleSize
- Type
- Cardinal
- Description
Gets effective pref shorter recycle size.
Declaration
property EffectivePrefShorterRecycleSize: Cardinal read GetEffectivePrefShorterRecycleSize;
- Property name
- EffectivePrefLongerRecycleSize
- Type
- Cardinal
- Description
Gets effective pref longer recycle size.
Declaration
property EffectivePrefLongerRecycleSize: Cardinal read GetEffectivePrefLongerRecycleSize;
- Property name
- Kerf
- Type
- Cardinal
- Description
Gets or sets kerf.
Declaration
property Kerf: Cardinal read GetKerf write SetKerf;
- 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;
- Property name
- AllowEdgeCuts
- Type
- Boolean
- Description
Whether material edge cuts are allowed. It cannot be enabled when either
MinCutSizeorMinCutDistanceis positive; legacyMinCutWidthis only an alias forMinCutSize.Declaration
property AllowEdgeCuts: Boolean read GetAllowEdgeCuts write SetAllowEdgeCuts;
- Property name
- RecycleEdgingOn
- Type
- Boolean
- Description
Whether edging is included in recycling logic.
Declaration
property RecycleEdgingOn: Boolean read GetRecycleEdgingOn write SetRecycleEdgingOn;
- Property name
- RecycleEdging
- Type
- Cardinal
- Description
Recycling edging configuration.
Declaration
property RecycleEdging: Cardinal read GetRecycleEdging write SetRecycleEdging;
- Property name
- StackCutting
- Type
- Boolean
- Description
Gets or sets whether stack cutting.
Declaration
property StackCutting: Boolean read GetStackCutting write SetStackCutting;
- Property name
- StackSize
- Type
- Cardinal
- Description
Maximum stack size or batch size.
Declaration
property StackSize: Cardinal read GetStackSize write SetStackSize;
- Property name
- AllowPartialStack
- Type
- Boolean
- Description
Whether partial stacks are allowed.
Declaration
property AllowPartialStack: Boolean read GetAllowPartialStack write SetAllowPartialStack;
- Property name
- MinStackSize
- Type
- Cardinal
- Description
Gets or sets min stack size.
Declaration
property MinStackSize: Cardinal read GetMinStackSize write SetMinStackSize;
- Property name
- PricePerSqM
- Type
- TTcPrice
- Description
Unit price per square meter.
Declaration
property PricePerSqM: TTcPrice read GetPricePerSqM Write SetPricePerSqM;
- Property name
- WeightOfSqM
- Type
- TTcWeight
- Description
Weight per square meter.
Declaration
property WeightOfSqM: TTcWeight read GetWeightOfSqM Write SetWeightOfSqM;
- Property name
- PricePerMeter
- Type
- TTcPrice
- Description
Unit price per running meter.
Declaration
property PricePerMeter: TTcPrice read GetPricePerMeter Write SetPricePerMeter;
- Property name
- WeightOfMeter
- Type
- TTcWeight
- Description
Weight per running meter.
Declaration
property WeightOfMeter: TTcWeight read GetWeightOfMeter Write SetWeightOfMeter;
- Property name
- CutCostPerMeter
- Type
- TTcPrice
- Description
Cost per running meter of cut.
Declaration
property CutCostPerMeter: TTcPrice read GetCutCostPerMeter Write SetCutCostPerMeter;
- Property name
- ReuseCost
- Type
- TTcPrice
- Description
Reuse-related cost value.
Declaration
property ReuseCost: TTcPrice read GetReuseCost Write SetReuseCost;
- Property name
- UtilizationCostPerKg
- Type
- TTcPrice
- Description
Utilization cost per kilogram.
Declaration
property UtilizationCostPerKg: TTcPrice read GetUtilizationCostPerKg Write SetUtilizationCostPerKg;
- Property name
- SegmentShiftCost
- Type
- TTcPrice
- Description
Cost assigned to segment shifts.
Declaration
property SegmentShiftCost: TTcPrice read GetSegmentShiftCost Write SetSegmentShiftCost;
- Property name
- SegmentRotationCost
- Type
- TTcPrice
- Description
Cost assigned to segment rotation.
Declaration
property SegmentRotationCost: TTcPrice read GetSegmentRotationCost Write SetSegmentRotationCost;
- Property name
- PriceToCostMultiplier
- Type
- Double
- Description
Multiplier used to convert cost into price.
Declaration
property PriceToCostMultiplier: Double read GetPriceToCostMultiplier write SetPriceToCostMultiplier;
- Property name
- ReusableWasteExpectedUsage
- Type
- Double
- Description
Gets or sets reusable waste expected usage.
Declaration
property ReusableWasteExpectedUsage: Double read GetReusableWasteExpectedUsage write SetReusableWasteExpectedUsage;
- Property name
- CutExcess
- Type
- Integer
- Description
Gets or sets cut excess.
Declaration
property CutExcess: Integer read GetCutExcess write SetCutExcess;
- Property name
- CutShiftTotalLimit
- Type
- Integer
- Description
Gets or sets cut shift total limit.
Declaration
property CutShiftTotalLimit: Integer read GetCutShiftTotalLimit write SetCutShiftTotalLimit;
- Property name
- CutShiftHorzLimit
- Type
- Integer
- Description
Horizontal limit for cut shifting.
Declaration
property CutShiftHorzLimit: Integer read GetCutShiftHorzLimit write SetCutShiftHorzLimit;
- Property name
- CutShiftVertLimit
- Type
- Integer
- Description
Vertical limit for cut shifting.
Declaration
property CutShiftVertLimit: Integer read GetCutShiftVertLimit write SetCutShiftVertLimit;
- Property name
- CustomData
- Type
- WideString
- Description
Opaque custom text payload stored with the object.
Declaration
property CustomData: WideString read GetCustomData write SetCustomData;
- 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;No C++ declaration in the SDK's language-support manifest. If your
TonCutPluginSdk.hpplacks it, declare it in the vtable order shown above.
- Property name
- StandardSheets
- Type
- IStandardSheets
- Description
Associated standard sheets collection or helper interface.
Declaration
property StandardSheets: IStandardSheets read GetStandardSheets;
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;
- Property name
- OnIdChange
- Type
- IIdChangeEvent
- Description
Event fired when an identifier changes.
Declaration
property OnIdChange: IIdChangeEvent read GetOnIdChange;
- Property name
- OnStandardSheetAdd
- Type
- IStandardSheetChangeEvent
- Description
Event exposed through OnStandardSheetAdd.
Declaration
property OnStandardSheetAdd: IStandardSheetChangeEvent read GetOnStandardSheetAdd;
- Property name
- OnStandardSheetRemove
- Type
- IStandardSheetChangeEvent
- Description
Event exposed through OnStandardSheetRemove.
Declaration
property OnStandardSheetRemove: IStandardSheetChangeEvent read GetOnStandardSheetRemove;
- Property name
- OnStandardSheetChange
- Type
- IStandardSheetChangeEvent
- Description
Event exposed through OnStandardSheetChange.
Declaration
property OnStandardSheetChange: IStandardSheetChangeEvent read GetOnStandardSheetChange;
Methods
- Method name
- SetPricePerSqM()
- Type
- procedure
- Description
Assign price per sq m.
Declaration
procedure SetPricePerSqM(aCost: TTcPrice); safecall;ParametersaCostTTcPriceValue for cost.
- Method name
- SetWeightOfSqM()
- Type
- procedure
- Description
Assign weight of sq m.
Declaration
procedure SetWeightOfSqM(aWeight: TTcWeight); safecall;ParametersaWeightTTcWeightValue for weight.
- Method name
- SetPricePerMeter()
- Type
- procedure
- Description
Assign price per meter.
Declaration
procedure SetPricePerMeter(aCost: TTcPrice); safecall;ParametersaCostTTcPriceValue for cost.
- Method name
- SetWeightOfMeter()
- Type
- procedure
- Description
Assign weight of meter.
Declaration
procedure SetWeightOfMeter(aWeight: TTcWeight); safecall;ParametersaWeightTTcWeightValue for weight.
- Method name
- SetCutCostPerMeter()
- Type
- procedure
- Description
Assign cut cost per meter.
Declaration
procedure SetCutCostPerMeter(aCost: TTcPrice); safecall;ParametersaCostTTcPriceValue for cost.
- Method name
- SetReuseCost()
- Type
- procedure
- Description
Assign reuse cost.
Declaration
procedure SetReuseCost(aCost: TTcPrice); safecall;ParametersaCostTTcPriceValue for cost.
- Method name
- SetUtilizationCostPerKg()
- Type
- procedure
- Description
Assign utilization cost per kg.
Declaration
procedure SetUtilizationCostPerKg(aCost: TTcPrice); safecall;ParametersaCostTTcPriceValue for cost.
- Method name
- SetSegmentShiftCost()
- Type
- procedure
- Description
Assign segment shift cost.
Declaration
procedure SetSegmentShiftCost(aCost: TTcPrice); safecall;ParametersaCostTTcPriceValue for cost.
- Method name
- SetSegmentRotationCost()
- Type
- procedure
- Description
Assign segment rotation cost.
Declaration
procedure SetSegmentRotationCost(aCost: TTcPrice); safecall;ParametersaCostTTcPriceValue for cost.
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aOther: IMaterial); safecall;Parameters
- Method name
- BeginUpdate()
- Type
- procedure
- Description
Start a batched update so change notifications can be delayed.
Declaration
procedure BeginUpdate(); safecall;
- Method name
- EndUpdate()
- Type
- procedure
- Description
Finish a batched update and allow deferred notifications to resume.
Declaration
procedure EndUpdate(); safecall;
IMaterials
Collection interface used to create, enumerate, query, and reload a shared Desktop object set.
- IID
- {49E95AA5-2437-47E1-8D38-21BEC146C6AD}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIMaterials
Vtable order (23 methods, slots 3 to 25, after the three IUnknown slots)
- function CreateMaterial(): IMaterial;
- function CreateStandardSheet(): IStandardSheet;
- procedure Add(aMaterial: IMaterial);
- procedure DeleteByIndex(aIndex: Cardinal);
- procedure DeleteById(aId: Int64);
- procedure Remove(const aMaterial: IMaterial);
- function IndexOf(const aMaterial: IMaterial): Integer; overload;
- function IndexOf(aId: Int64): Integer; overload;
- function FindDuplicate(const aMaterial: IMaterial; aCheckTitle: Boolean = False): IMaterial;
- function FindByTitle(const aTitle: WideString; aKind: TMaterialKind; aWidth, aThickness: Cardinal): IMaterial;
- function FindUniqueName(const aBaseName: WideString; aKind: TMaterialKind; aWidth, aThickness: Cardinal): WideString;
- function CheckUniqueName(const aTitle: WideString; aKind: TMaterialKind; aWidth, aThickness: Cardinal; const aIgnoreMaterial: IMaterial): Boolean; overload;
- function CheckUniqueName(aMaterial: IMaterial; aAutoFix: Boolean = False): Boolean; overload;
- function GetCount(): Integer;
- function GetByIndex(aIndex: Cardinal): IMaterial;
- function GetById(aId: Int64): IMaterial;
- function GetOnAdd(): IMaterialChangeEvent;
- function GetOnRemove(): IMaterialChangeEvent;
- procedure Reload();
- procedure BeginUpdate();
- procedure EndUpdate();
- function IsUpdating(): Boolean;
- function GetOnChange(): INotifyEvent;
Properties
- Property name
- Count
- Type
- Integer
- Description
Number of items currently exposed by the interface.
Declaration
property Count: Integer read GetCount;
- Property name
- Items
- Type
- IMaterial
- Description
Indexed property used to read one item from the collection.
Declaration
property Items[aIndex: Cardinal]: IMaterial read GetByIndex; default;Index ParametersaIndexCardinalZero-based position within a collection.ValueThe collection item located at the supplied index.
- Property name
- OnAdd
- Type
- IMaterialChangeEvent
- Description
Event fired when an item is added. Suppressed during a collection update scope; the outermost changed scope emits one collection
OnChangeinstead.Declaration
property OnAdd: IMaterialChangeEvent read GetOnAdd;
- Property name
- OnRemove
- Type
- IMaterialChangeEvent
- Description
Event fired when an item is removed. Suppressed during a collection update scope; the outermost changed scope emits one collection
OnChangeinstead.Declaration
property OnRemove: IMaterialChangeEvent read GetOnRemove;
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Collection notification emitted once when the outermost changed update scope ends (engine version 25). Empty scopes emit nothing. Outside a scope, adds/removes use
OnAdd/OnRemove, and item edits do not emit this collection event. Item events remain active inside collection scopes.Declaration
property OnChange: INotifyEvent read GetOnChange;
Methods
- Method name
- CreateMaterial()
- Type
- IMaterial
- Description
Create a new, empty material. No dialog opens, the result is never
null, and the object is not in the collection until you pass it toAdd. A new object has a temporary negativeId.Declaration
function CreateMaterial(): IMaterial; safecall;ReturnsA new, empty material that is not yet in the collection; nevernull.
- Method name
- CreateStandardSheet()
- Type
- IStandardSheet
- Description
Create a new standard sheet instance.
Declaration
function CreateStandardSheet(): IStandardSheet; safecall;ReturnsA new standard sheet interface instance.
- Method name
- Add()
- Type
- procedure
- Description
Add an object created by this collection’s factory method. In
LoadFile, add to the staging collection you received.Adddoes not check title uniqueness, and adding an object that is already in the collection raises an error.Declaration
procedure Add(aMaterial: IMaterial); safecall;Parameters
- Method name
- DeleteByIndex()
- Type
- procedure
- Description
Delete the item at the specified zero-based index.
Declaration
procedure DeleteByIndex(aIndex: Cardinal); safecall;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;ParametersaIdInt64TonCut object identifier.
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(const aMaterial: IMaterial); safecall;Parameters
- Method name
- IndexOf()
- Type
- Integer
- Description
Return the zero-based index of the matching item.
Declaration
function IndexOf(const aMaterial: IMaterial): Integer; overload; safecall;C++ name:
IndexOfByObject. The C++ header gives each Pascal overload its own name; the vtable slot is the same.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;C++ name:
IndexOfById. The C++ header gives each Pascal overload its own name; the vtable slot is the same.ParametersaIdInt64TonCut object identifier.ReturnsZero-based index of the matching item, or-1when no match exists.
- Method name
- FindDuplicate()
- Type
- IMaterial
- Description
Search for an existing item that duplicates the supplied object.
Declaration
function FindDuplicate(const aMaterial: IMaterial; aCheckTitle: Boolean = False): IMaterial; safecall;ParametersaCheckTitleBooleanWhether title collisions should count as duplicates.ReturnsThe matching material interface instance, ornullwhen not found.
- Method name
- FindByTitle()
- Type
- IMaterial
- Description
Find a material by title, kind, width, and thickness. All four must match exactly, and the title comparison is case-sensitive; pass width 0 for anything that is not a 1D material. Inside
LoadFileit searches only what the current call has staged.Declaration
function FindByTitle(const aTitle: WideString; aKind: TMaterialKind; aWidth: Cardinal; aThickness: Cardinal): IMaterial; safecall;ParametersaTitleconstWideStringHuman-readable title.aKindValue for kind.aWidthCardinalWidth value in hundredths of a millimeter.aThicknessCardinalThickness value in hundredths of a millimeter.ReturnsThe matching material 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; aKind: TMaterialKind; aWidth: Cardinal; aThickness: Cardinal): WideString; safecall;ParametersaBaseNameconstWideStringBase title used while generating a unique name.aKindValue for kind.aWidthCardinalWidth value in hundredths of a millimeter.aThicknessCardinalThickness value in hundredths of a millimeter.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; aKind: TMaterialKind; aWidth: Cardinal; aThickness: Cardinal; const aIgnoreMaterial: IMaterial): Boolean; overload; safecall;ParametersaTitleconstWideStringHuman-readable title.aKindValue for kind.aWidthCardinalWidth value in hundredths of a millimeter.aThicknessCardinalThickness value in hundredths of a millimeter.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(aMaterial: IMaterial; aAutoFix: Boolean = False): Boolean; overload; safecall;C++ name:
CheckUniqueNameByMaterial. The C++ header gives each Pascal overload its own name; the vtable slot is the same.ParametersaAutoFixBooleanWhether the method may adjust data automatically.ReturnsReturnstrueif the proposed title is unique within the collection.
- Method name
- GetById()
- Type
- IMaterial
- Description
Return the item stored under the specified TonCut identifier.
Declaration
function GetById(aId: Int64): IMaterial; safecall;ParametersaIdInt64TonCut object identifier.ReturnsThe matching material interface instance.
- Method name
- Reload()
- Type
- procedure
- Description
Reload the underlying data from the host or storage layer.
Declaration
procedure Reload(); safecall;
- Method name
- BeginUpdate()
- Type
- procedure
- Description
Begin a nested collection notification scope (engine version 25). Balance each call with
EndUpdateinfinally. Changes take effect immediately; the scope provides no rollback.Declaration
procedure BeginUpdate(); safecall;
- Method name
- EndUpdate()
- Type
- procedure
- Description
End one collection notification scope (engine version 25). The outermost call emits one collection
OnChangeonly if an add, remove, or itemOnChangeoccurred in the scope; suppressed add/remove callbacks are not replayed. Raises an error without a matchingBeginUpdate.Declaration
procedure EndUpdate(); safecall;
- Method name
- IsUpdating()
- Type
- Boolean
- Description
Report whether at least one collection notification scope remains open (engine version 25). Nested scopes remain active until the outermost
EndUpdate.Declaration
function IsUpdating(): Boolean; safecall;ReturnsReturnstruewhile the interface is inside aBeginUpdate/EndUpdatebatch.
IMaterialChangeEventHandler
Callback sink consumed by the matching change-event interface.
- IID
- {8E22DAE9-39E6-4E8F-9CB8-603BDE907D1A}
- Parent
- IUnknown
- Unit
- uIMaterialChangeEvent
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (1 methods, slots 3 to 3, after the three IUnknown slots)
- procedure Invoke(aSender: IUnknown; aMaterial: IMaterial; aIndex: Integer);
Methods
- Method name
- Invoke()
- Type
- procedure
- Description
Handle the event callback when the owning event interface invokes it.
Declaration
procedure Invoke(aSender: IUnknown; aMaterial: IMaterial; aIndex: Integer); safecall;ParametersaSenderIUnknownObject that raised the event.aIndexIntegerZero-based position within a collection.
IMaterialChangeEvent
Event interface with Add, Remove, and Invoke hooks for collection or entity change notifications.
- IID
- {E4C2B53C-3012-4CF5-953F-483F7E4E01ED}
- Parent
- IUnknown
- Unit
- uIMaterialChangeEvent
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (3 methods, slots 3 to 5, after the three IUnknown slots)
- procedure Add(aHandler: IMaterialChangeEventHandler);
- procedure Remove(aHandler: IMaterialChangeEventHandler);
- procedure Invoke(aSender: IUnknown; aMaterial: IMaterial; aIndex: Integer);
Methods
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aHandler: IMaterialChangeEventHandler); safecall;Parameters
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(aHandler: IMaterialChangeEventHandler); safecall;Parameters
- Method name
- Invoke()
- Type
- procedure
- Description
Raise the typed change event for the current payload.
Declaration
procedure Invoke(aSender: IUnknown; aMaterial: IMaterial; aIndex: Integer); safecall;ParametersaSenderIUnknownObject that raised the event.aIndexIntegerEvent payload field for index.
IStandardSheet
Reusable stock-size template attached to a material definition.
- IID
- {7C43AB12-1C9C-4FB6-A076-2CC2E848DA8D}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIStandardSheet
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (16 methods, slots 3 to 18, after the three IUnknown slots)
- function GetId(): Int64;
- procedure SetId(aId: Int64);
- function GetTitle(): WideString;
- procedure SetTitle(const aTitle: WideString);
- function GetLength(): Cardinal;
- procedure SetLength(aLength: Cardinal);
- function GetWidth(): Cardinal;
- procedure SetWidth(aWidth: Cardinal);
- function GetOrnament(): TOrnament;
- procedure SetOrnament(aOrnament: TOrnament);
- function GetEdging(): IRectangle;
- function GetOnChange(): INotifyEvent;
- function GetOnIdChange(): IIdChangeEvent;
- procedure Assign(const aStandardSheet: IStandardSheet);
- procedure BeginUpdate();
- procedure EndUpdate();
Properties
- Property name
- Id
- Type
- Int64
- Description
Persistent numeric identifier used by TonCut to track the object.
Declaration
property Id: Int64 read GetId write SetId;
- Property name
- Title
- Type
- WideString
- Description
Human-readable title shown to users.
Declaration
property Title: WideString read GetTitle write SetTitle;
- Property name
- Length
- Type
- Cardinal
- Description
Length value stored on the object.
Declaration
property Length: Cardinal read GetLength write SetLength;
- Property name
- Width
- Type
- Cardinal
- Description
Width value stored on the object.
Declaration
property Width: Cardinal read GetWidth write SetWidth;
- Property name
- Ornament
- Type
- Description
Grain or ornament direction associated with the stock item.
Declaration
property Ornament: TOrnament read GetOrnament write SetOrnament;
- Property name
- Edging
- Type
- IRectangle
- Description
Rectangle-like edging or margin helper attached to the object.
Declaration
property Edging: IRectangle read GetEdging;
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;
- Property name
- OnIdChange
- Type
- IIdChangeEvent
- Description
Event fired when an identifier changes.
Declaration
property OnIdChange: IIdChangeEvent read GetOnIdChange;
Methods
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aStandardSheet: IStandardSheet); safecall;Parameters
- Method name
- BeginUpdate()
- Type
- procedure
- Description
Start a batched update so change notifications can be delayed.
Declaration
procedure BeginUpdate(); safecall;
- Method name
- EndUpdate()
- Type
- procedure
- Description
Finish a batched update and allow deferred notifications to resume.
Declaration
procedure EndUpdate(); safecall;
IStandardSheets
Collection interface used to create, enumerate, query, and reload a shared Desktop object set.
- IID
- {5CD3AAB4-8764-431B-B32D-06815C9B4B79}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIStandardSheets
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (13 methods, slots 3 to 15, after the three IUnknown slots)
- procedure Assign(const aOther: IStandardSheets);
- procedure Clear();
- procedure Add(aStandardSheet: IStandardSheet);
- procedure DeleteByIndex(aIndex: Cardinal);
- procedure Remove(const aStandardSheet: IStandardSheet);
- function IndexOf(const aStandardSheet: IStandardSheet): Integer; overload;
- function Find(aLength, aWidth: Cardinal; aOrnament: TOrnament; aMarginLeft, aMarginTop, aMarginRight, aMarginBottom: Cardinal): IStandardSheet; overload;
- function Find(aLength, aWidth: Cardinal; aMarginLeft, aMarginTop, aMarginRight, aMarginBottom: Cardinal): IStandardSheet; overload;
- function CheckUniqueName(const aTitle: WideString; const aIgnoreStandardSheet: IStandardSheet): Boolean;
- function GetCount(): Integer;
- function GetByIndex(aIndex: Cardinal): IStandardSheet;
- function GetOnAdd(): IStandardSheetChangeEvent;
- function GetOnRemove(): IStandardSheetChangeEvent;
Properties
- Property name
- Count
- Type
- Integer
- Description
Number of items currently exposed by the interface.
Declaration
property Count: Integer read GetCount;
- Property name
- Items
- Type
- IStandardSheet
- Description
Indexed property used to read one item from the collection.
Declaration
property Items[aIndex: Cardinal]: IStandardSheet read GetByIndex; default;Index ParametersaIndexCardinalZero-based position within a collection.ValueThe collection item located at the supplied index.
- Property name
- OnAdd
- Type
- IStandardSheetChangeEvent
- Description
Event fired when an item is added.
Declaration
property OnAdd: IStandardSheetChangeEvent read GetOnAdd;
- Property name
- OnRemove
- Type
- IStandardSheetChangeEvent
- Description
Event fired when an item is removed.
Declaration
property OnRemove: IStandardSheetChangeEvent read GetOnRemove;
Methods
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aOther: IStandardSheets); safecall;Parameters
- Method name
- Clear()
- Type
- procedure
- Description
Remove all items from the collection.
Declaration
procedure Clear(); safecall;
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aStandardSheet: IStandardSheet); safecall;Parameters
- Method name
- DeleteByIndex()
- Type
- procedure
- Description
Delete the item at the specified zero-based index.
Declaration
procedure DeleteByIndex(aIndex: Cardinal); safecall;ParametersaIndexCardinalZero-based position within a collection.
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(const aStandardSheet: IStandardSheet); safecall;Parameters
- Method name
- IndexOf()
- Type
- Integer
- Description
Return the zero-based index of the matching item.
Declaration
function IndexOf(const aStandardSheet: IStandardSheet): Integer; overload; safecall;ParametersReturnsZero-based index of the matching item, or-1when no match exists.
- Method name
- Find()
- Type
- IStandardSheet
- Description
Find an item matching the supplied criteria.
Declaration
function Find(aLength: Cardinal; aWidth: Cardinal; aOrnament: TOrnament; aMarginLeft: Cardinal; aMarginTop: Cardinal; aMarginRight: Cardinal; aMarginBottom: Cardinal): IStandardSheet; overload; safecall;ParametersaLengthCardinalLength value in hundredths of a millimeter.aWidthCardinalWidth value in hundredths of a millimeter.aOrnamentValue for ornament.aMarginLeftCardinalLeft margin value in hundredths of a millimeter.aMarginTopCardinalTop margin value in hundredths of a millimeter.aMarginRightCardinalRight margin value in hundredths of a millimeter.aMarginBottomCardinalBottom margin value in hundredths of a millimeter.ReturnsThe matching standard sheet interface instance, ornullwhen not found.
- Method name
- Find()
- Type
- IStandardSheet
- Description
Find an item matching the supplied criteria.
Declaration
function Find(aLength: Cardinal; aWidth: Cardinal; aMarginLeft: Cardinal; aMarginTop: Cardinal; aMarginRight: Cardinal; aMarginBottom: Cardinal): IStandardSheet; overload; safecall;ParametersaLengthCardinalLength value in hundredths of a millimeter.aWidthCardinalWidth value in hundredths of a millimeter.aMarginLeftCardinalLeft margin value in hundredths of a millimeter.aMarginTopCardinalTop margin value in hundredths of a millimeter.aMarginRightCardinalRight margin value in hundredths of a millimeter.aMarginBottomCardinalBottom margin value in hundredths of a millimeter.ReturnsThe matching standard sheet interface instance, ornullwhen not found.
- Method name
- CheckUniqueName()
- Type
- Boolean
- Description
Check whether a proposed title is unique within the collection.
Declaration
function CheckUniqueName(const aTitle: WideString; const aIgnoreStandardSheet: IStandardSheet): Boolean; safecall;ParametersaTitleconstWideStringHuman-readable title.ReturnsReturnstrueif the proposed title is unique within the collection.
IStandardSheetChangeEventHandler
Callback sink consumed by the matching change-event interface.
- IID
- {7D9FE7E4-F2D7-463E-9231-80075963506E}
- Parent
- IUnknown
- Unit
- uIStandardSheetChangeEvent
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (1 methods, slots 3 to 3, after the three IUnknown slots)
- procedure Invoke(aSender: IUnknown; aStandardSheet: IStandardSheet; aIndex: Integer);
Methods
- Method name
- Invoke()
- Type
- procedure
- Description
Handle the event callback when the owning event interface invokes it.
Declaration
procedure Invoke(aSender: IUnknown; aStandardSheet: IStandardSheet; aIndex: Integer); safecall;ParametersaSenderIUnknownObject that raised the event.aIndexIntegerZero-based position within a collection.
IStandardSheetChangeEvent
Event interface with Add, Remove, and Invoke hooks for collection or entity change notifications.
- IID
- {656C4695-86AD-4DC3-BC31-A37FD9F01D5E}
- Parent
- IUnknown
- Unit
- uIStandardSheetChangeEvent
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (3 methods, slots 3 to 5, after the three IUnknown slots)
- procedure Add(aHandler: IStandardSheetChangeEventHandler);
- procedure Remove(aHandler: IStandardSheetChangeEventHandler);
- procedure Invoke(aSender: IUnknown; aStandardSheet: IStandardSheet; aIndex: Integer);
Methods
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aHandler: IStandardSheetChangeEventHandler); safecall;Parameters
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(aHandler: IStandardSheetChangeEventHandler); safecall;Parameters
- Method name
- Invoke()
- Type
- procedure
- Description
Raise the typed change event for the current payload.
Declaration
procedure Invoke(aSender: IUnknown; aStandardSheet: IStandardSheet; aIndex: Integer); safecall;ParametersaSenderIUnknownObject that raised the event.aIndexIntegerEvent payload field for index.