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

IShape

Abstract shape contract used for non-rectangular pieces and waste geometry.

Source: SDK/include/pascal/uIShape.pas

Properties

  • Property name
    ShapeType
    Type
    Description

    Enumerated shape kind exposed by the current shape object.

    Declaration

    property ShapeType: TShapeType read GetShapeType;

    Published SDK declaration languages: Pascal.

  • Property name
    EdgeCount
    Type
    Integer
    Description

    Count of edge.

    Declaration

    property EdgeCount: Integer read GetEdgeCount;

    Published SDK declaration languages: Pascal.

  • Property name
    ParamCount
    Type
    Integer
    Description

    Count of param.

    Declaration

    property ParamCount: Integer read GetParamCount;

    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
    SaveToString()
    Type
    WideString
    Description

    Serialize the shape into a string representation.

    Declaration

    function SaveToString(aLengthUnit: TLengthUnits = luMillimeters; aAngleUnit: TAngleUnits = auRadians): WideString; safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aLengthUnit
    Value for length unit.
    aAngleUnit
    Value for angle unit.
    Returns
    The 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aStringconst
    WideString
    Text value for string.
    aDefLengthUnit
    Value for def length unit.
    aDefAngleUnit
    Value for def angle unit.
    Returns
    Returns true if 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aNetLength
    Integer
    Value for net length.
    aNetWidth
    Integer
    Value for net width.
    aSurplus
    Integer
    Surplus value in TonCut units.
    aMargin
    Integer
    Margin value in TonCut units.
    Returns
    The 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aNetLength
    Integer
    Value for net length.
    aNetWidth
    Integer
    Value for net width.
    aSurplus
    Integer
    Surplus value in TonCut units.
    aMargin
    Integer
    Margin value in TonCut units.
    Returns
    The 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aIndex
    Integer
    Zero-based position within a collection.
    aNamevar
    WideString
    Text value for name. Passed by reference and may be updated by the callee.
    aTitlevar
    WideString
    Human-readable title. Passed by reference and may be updated by the callee.
    Returns
    Returns true if 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aIndex
    Integer
    Zero-based position within a collection.
    Returns
    The matching band interface instance.
  • Method name
    SetEdgeBandByIndex()
    Type
    procedure
    Description

    Assign edge band by index.

    Declaration

    procedure SetEdgeBandByIndex(aIndex: Integer; const aBand: IBand); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aIndex
    Integer
    Zero-based position within a collection.
    aBandconst
    Band instance being queried or modified.
  • Method name
    GetEdgeBandByName()
    Type
    IBand
    Description

    Return or populate edge band by name.

    Declaration

    function GetEdgeBandByName(const aName: WideString): IBand; safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aNameconst
    WideString
    Text value for name.
    Returns
    The 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aNameconst
    WideString
    Text value for name.
    aBandconst
    Band instance being queried or modified.
  • 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aIndex
    Integer
    Zero-based position within a collection.
    aNamevar
    WideString
    Text value for name. Passed by reference and may be updated by the callee.
    aTitlevar
    WideString
    Human-readable title. Passed by reference and may be updated by the callee.
    aTypevar
    Extension category being enumerated. Passed by reference and may be updated by the callee.
    Returns
    Returns true if 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aIndex
    Integer
    Zero-based position within a collection.
    Returns
    Signed integer value.
  • Method name
    SetParamByIndex()
    Type
    procedure
    Description

    Assign param by index.

    Declaration

    procedure SetParamByIndex(aIndex: Integer; aValue: Integer); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aIndex
    Integer
    Zero-based position within a collection.
    aValue
    Integer
    Value 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aNameconst
    WideString
    Text value for name.
    Returns
    Signed integer value.
  • Method name
    SetParamByName()
    Type
    procedure
    Description

    Assign param by name.

    Declaration

    procedure SetParamByName(const aName: WideString; aValue: Integer); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aNameconst
    WideString
    Text value for name.
    aValue
    Integer
    Value 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;

    Published SDK declaration languages: Pascal.

    Parameters
    aOtherconst
    Source object whose values should be copied.
    Returns
    Returns true if 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.

Source: SDK/include/pascal/uIRectangle.pas

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;

    Published SDK declaration languages: Pascal.

  • 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;

    Published SDK declaration languages: Pascal.

  • 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;

    Published SDK declaration languages: Pascal.

  • 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;

    Published SDK declaration languages: Pascal.

  • 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;

    Published SDK declaration languages: Pascal.

  • 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;

    Published SDK declaration languages: Pascal.

  • 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;

    Published SDK declaration languages: Pascal.

  • 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;

    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
    Assign()
    Type
    procedure
    Description

    Copy values from another object of the same type.

    Declaration

    procedure Assign(const aOther: IRectangle); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aOtherconst
    Source object whose values should be copied.
  • 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.


ILinearShape

Linear shape specialization that stores a sequence of segments.

Source: SDK/include/pascal/uILinearShape.pas

Properties

  • Property name
    LeftAngle
    Type
    Double
    Description

    Gets or sets left angle.

    Declaration

    property LeftAngle: Double read GetLeftAngle write SetLeftAngle;

    Published SDK declaration languages: Pascal.

  • Property name
    RightAngle
    Type
    Double
    Description

    Whether the shape or cut is a right angle.

    Declaration

    property RightAngle: Double read GetRightAngle write SetRightAngle;

    Published SDK declaration languages: Pascal.


IAnyShape

Arbitrary-path shape variant whose geometry is stored as a serialized path string.

Source: SDK/include/pascal/uIAnyShape.pas

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;

    Published SDK declaration languages: Pascal.

Was this page helpful?