Shapes
This page covers IShape, IRectangle, ILinearShape, and IAnyShape. These interfaces appear inside pieces, stock, solution waste, and geometry-heavy export workflows.
The four IRectangle sides are signed Integer values. When the rectangle represents a minimum edge distance, a negative side means inherited or unspecified; consumers must not reinterpret it as an unsigned length.
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.
IShape
Abstract shape contract used for non-rectangular pieces and waste geometry.
- IID
- {D9FB6E15-5D6A-46A8-8391-9BC4722A22DC}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIShape
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 (19 methods, slots 3 to 21, after the three IUnknown slots)
- function GetShapeType(): TShapeType;
- function SaveToString(aLengthUnit: TLengthUnits = luMillimeters; aAngleUnit: TAngleUnits = auRadians): WideString;
- function LoadFromString(const aString: WideString; aDefLengthUnit: TLengthUnits = luMillimeters; aDefAngleUnit: TAngleUnits = auRadians): Boolean;
- function GetNetPath(aNetLength, aNetWidth, aSurplus, aMargin: Integer): WideString;
- function GetGrossPath(aNetLength, aNetWidth, aSurplus, aMargin: Integer): WideString;
- function GetEdgeCount(): Integer;
- function GetEdgeInfo(aIndex: Integer; var aName, aTitle: WideString): Boolean;
- function GetEdgeBandByIndex(aIndex: Integer): IBand;
- procedure SetEdgeBandByIndex(aIndex: Integer; const aBand: IBand);
- function GetEdgeBandByName(const aName: WideString): IBand;
- procedure SetEdgeBandByName(const aName: WideString; const aBand: IBand);
- function GetParamCount(): Integer;
- function GetParamInfo(aIndex: Integer; var aName, aTitle: WideString; var aType: TShapeParamType): Boolean;
- function GetParamByIndex(aIndex: Integer): Integer;
- procedure SetParamByIndex(aIndex: Integer; aValue: Integer);
- function GetParamByName(const aName: WideString): Integer;
- procedure SetParamByName(const aName: WideString; aValue: Integer);
- function IsSame(const aOther: IShape): Boolean;
- function GetOnChange(): INotifyEvent;
Properties
- Property name
- ShapeType
- Type
- Description
Enumerated shape kind exposed by the current shape object.
Declaration
property ShapeType: TShapeType read GetShapeType;
- Property name
- EdgeCount
- Type
- Integer
- Description
Count of edge.
Declaration
property EdgeCount: Integer read GetEdgeCount;
- Property name
- ParamCount
- Type
- Integer
- Description
Count of param.
Declaration
property ParamCount: Integer read GetParamCount;
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;
Methods
- Method name
- SaveToString()
- Type
- WideString
- Description
Serialize the shape into a string representation.
Declaration
function SaveToString(aLengthUnit: TLengthUnits = luMillimeters; aAngleUnit: TAngleUnits = auRadians): WideString; safecall;ParametersaLengthUnitValue for length unit.aAngleUnitValue for angle unit.ReturnsThe current shape serialized as a string.
- Method name
- LoadFromString()
- Type
- Boolean
- Description
Load the shape from a serialized string representation.
Declaration
function LoadFromString(const aString: WideString; aDefLengthUnit: TLengthUnits = luMillimeters; aDefAngleUnit: TAngleUnits = auRadians): Boolean; safecall;ParametersaStringconstWideStringText value for string.aDefLengthUnitValue for def length unit.aDefAngleUnitValue for def angle unit.ReturnsReturnstrueif the serialized shape was parsed successfully.
- Method name
- GetNetPath()
- Type
- WideString
- Description
Return an SVG-compatible path representation of the shape using the requested dimensional context.
Declaration
function GetNetPath(aNetLength: Integer; aNetWidth: Integer; aSurplus: Integer; aMargin: Integer): WideString; safecall;ParametersaNetLengthIntegerValue for net length.aNetWidthIntegerValue for net width.aSurplusIntegerSurplus value in hundredths of a millimeter.aMarginIntegerMargin value in hundredths of a millimeter.ReturnsThe SVG-compatible path string for the net shape outline.
- Method name
- GetGrossPath()
- Type
- WideString
- Description
Return an SVG-compatible path representation of the shape using the requested dimensional context.
Declaration
function GetGrossPath(aNetLength: Integer; aNetWidth: Integer; aSurplus: Integer; aMargin: Integer): WideString; safecall;ParametersaNetLengthIntegerValue for net length.aNetWidthIntegerValue for net width.aSurplusIntegerSurplus value in hundredths of a millimeter.aMarginIntegerMargin value in hundredths of a millimeter.ReturnsThe SVG-compatible path string for the gross shape outline.
- Method name
- GetEdgeInfo()
- Type
- Boolean
- Description
Return metadata for a named or indexed shape edge.
Declaration
function GetEdgeInfo(aIndex: Integer; var aName: WideString; var aTitle: WideString): Boolean; safecall;ParametersaIndexIntegerZero-based position within a collection.aNamevarWideStringText value for name. Passed by reference and may be updated by the callee.aTitlevarWideStringHuman-readable title. Passed by reference and may be updated by the callee.ReturnsReturnstrueif edge metadata was found for the requested index and the output parameters were populated.
- Method name
- GetEdgeBandByIndex()
- Type
- IBand
- Description
Return or populate edge band by index.
Declaration
function GetEdgeBandByIndex(aIndex: Integer): IBand; safecall;ParametersaIndexIntegerZero-based position within a collection.ReturnsThe matching band interface instance.
- Method name
- SetEdgeBandByIndex()
- Type
- procedure
- Description
Assign edge band by index.
Declaration
procedure SetEdgeBandByIndex(aIndex: Integer; const aBand: IBand); safecall;ParametersaIndexIntegerZero-based position within a collection.
- Method name
- GetEdgeBandByName()
- Type
- IBand
- Description
Return or populate edge band by name.
Declaration
function GetEdgeBandByName(const aName: WideString): IBand; safecall;ParametersaNameconstWideStringText value for name.ReturnsThe matching band interface instance.
- Method name
- SetEdgeBandByName()
- Type
- procedure
- Description
Assign edge band by name.
Declaration
procedure SetEdgeBandByName(const aName: WideString; const aBand: IBand); safecall;ParametersaNameconstWideStringText value for name.
- Method name
- GetParamInfo()
- Type
- Boolean
- Description
Return metadata for a named or indexed shape parameter.
Declaration
function GetParamInfo(aIndex: Integer; var aName: WideString; var aTitle: WideString; var aType: TShapeParamType): Boolean; safecall;ParametersaIndexIntegerZero-based position within a collection.aNamevarWideStringText value for name. Passed by reference and may be updated by the callee.aTitlevarWideStringHuman-readable title. Passed by reference and may be updated by the callee.aTypevarExtension category being enumerated. Passed by reference and may be updated by the callee.ReturnsReturnstrueif parameter metadata was found for the requested index and the output parameters were populated.
- Method name
- GetParamByIndex()
- Type
- Integer
- Description
Return or populate param by index.
Declaration
function GetParamByIndex(aIndex: Integer): Integer; safecall;ParametersaIndexIntegerZero-based position within a collection.ReturnsSigned integer value.
- Method name
- SetParamByIndex()
- Type
- procedure
- Description
Assign param by index.
Declaration
procedure SetParamByIndex(aIndex: Integer; aValue: Integer); safecall;ParametersaIndexIntegerZero-based position within a collection.aValueIntegerValue being formatted, assigned, or stored.
- Method name
- GetParamByName()
- Type
- Integer
- Description
Return or populate param by name.
Declaration
function GetParamByName(const aName: WideString): Integer; safecall;ParametersaNameconstWideStringText value for name.ReturnsSigned integer value.
- Method name
- SetParamByName()
- Type
- procedure
- Description
Assign param by name.
Declaration
procedure SetParamByName(const aName: WideString; aValue: Integer); safecall;ParametersaNameconstWideStringText value for name.aValueIntegerValue being formatted, assigned, or stored.
- Method name
- IsSame()
- Type
- Boolean
- Description
Compare two shapes for structural equality.
Declaration
function IsSame(const aOther: IShape): Boolean; safecall;ParametersReturnsReturnstrueif the supplied shape describes the same geometry as the current shape.
IRectangle
Signed four-side helper used for margins, edging, and edge-distance measurements. A negative side represents an inherited or unspecified edge distance.
- IID
- {1B77A717-7561-46CA-B2E9-87CC4F69B4F4}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIRectangle
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 (12 methods, slots 3 to 14, after the three IUnknown slots)
- function GetNorth(): Integer;
- procedure SetNorth(aNorth: Integer);
- function GetSouth(): Integer;
- procedure SetSouth(aSouth: Integer);
- function GetWest(): Integer;
- procedure SetWest(aWest: Integer);
- function GetEast(): Integer;
- procedure SetEast(aEast: Integer);
- function GetOnChange(): INotifyEvent;
- procedure Assign(const aOther: IRectangle);
- procedure BeginUpdate();
- procedure EndUpdate();
Properties
- Property name
- North
- Type
- Integer
- Description
Signed value assigned to the north or top edge; a negative edge-distance value means inherited or unspecified.
Declaration
property North: Integer read GetNorth write SetNorth;
- Property name
- South
- Type
- Integer
- Description
Signed value assigned to the south or bottom edge; a negative edge-distance value means inherited or unspecified.
Declaration
property South: Integer read GetSouth write SetSouth;
- Property name
- West
- Type
- Integer
- Description
Signed value assigned to the west or left edge; a negative edge-distance value means inherited or unspecified.
Declaration
property West: Integer read GetWest write SetWest;
- Property name
- East
- Type
- Integer
- Description
Signed value assigned to the east or right edge; a negative edge-distance value means inherited or unspecified.
Declaration
property East: Integer read GetEast write SetEast;
- Property name
- Top
- Type
- Integer
- Description
Alias of
North; a negative edge-distance value means inherited or unspecified.Declaration
property Top: Integer read GetNorth write SetNorth;
- Property name
- Bottom
- Type
- Integer
- Description
Alias of
South; a negative edge-distance value means inherited or unspecified.Declaration
property Bottom: Integer read GetSouth write SetSouth;
- Property name
- Left
- Type
- Integer
- Description
Alias of
West; a negative edge-distance value means inherited or unspecified.Declaration
property Left: Integer read GetWest write SetWest;
- Property name
- Right
- Type
- Integer
- Description
Alias of
East; a negative edge-distance value means inherited or unspecified.Declaration
property Right: Integer read GetEast write SetEast;
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;
Methods
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aOther: IRectangle); 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;
ILinearShape
Linear shape specialization that stores a sequence of segments.
- IID
- {62102D28-C799-4709-A0C4-CFF6FDB5A5FB}
- Parent
- IShape
- Unit
- uILinearShape
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 (4 methods, slots 22 to 25, after the IUnknown and IShape slots)
- function GetLeftAngle(): Double;
- procedure SetLeftAngle(aAngle: Double);
- function GetRightAngle(): Double;
- procedure SetRightAngle(aAngle: Double);
Properties
- Property name
- LeftAngle
- Type
- Double
- Description
Slant angle of the left end of a linear shape, a
Doublein radians;0is a square end. It is always measured from the middle to the right, regardless of the device slant-measurement settings. To show it to the user, format it withITonCut.FormatRadians.Declaration
property LeftAngle: Double read GetLeftAngle write SetLeftAngle;
- Property name
- RightAngle
- Type
- Double
- Description
Slant angle of the right end of a linear shape, a
Doublein radians;0is a square end. It is always measured from the middle to the left, regardless of the device slant-measurement settings. To show it to the user, format it withITonCut.FormatRadians.Declaration
property RightAngle: Double read GetRightAngle write SetRightAngle;
IAnyShape
Arbitrary-path shape variant whose geometry is stored as a serialized path string.
- IID
- {814BFA57-1A8A-4459-8C6B-00FF9F5E1223}
- Parent
- IShape
- Unit
- uIAnyShape
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 (2 methods, slots 22 to 23, after the IUnknown and IShape slots)
- function GetPath(): WideString;
- procedure SetPath(const aPath: WideString);
Properties
- Property name
- Path
- Type
- WideString
- Description
SVG-compatible path content stored by the arbitrary-shape object.
Declaration
property Path: WideString read GetPath write SetPath;