Shapes
Learn about the different piece shapes supported by TonCut Engine and how to define them.
As you can see below, the shape definitions do not contain the size parameters like length or width.
This is because the size is determined by the length and width properties of the Piece that uses the shape.
RectangleShape
Rectangle shape.
| Attributes |
|---|
veneersobjectAn object defining the veneers on each side of the rectangle.
Show Child Attributes
RectangleShape example
LinearShape
The LinearShape object describes slant angles for the linear (1D) pieces or waste.
The angles given here are always measured in the same way, regardless of the cutting device settings.
leftAngleangle mandatoryLeft slant angle measured from middle to right.
rightAngleangle mandatoryRight slant angle measured from middle to left.
LinearShape example
SlantRectangleShape
Slant rectangle shape.
| Attributes |
|---|
vertLengthlength mandatoryLength of the vertical edge shortened by the slant.
horzLengthlength mandatoryLength of the horizontal edge shortened by the slant.
slantCornermandatorySlantCornerenum Specifies which corner is slanted. Possible values are `topLeft`, `topRight`, `bottomLeft`, `bottomRight`.
Allowed values
topLeftTop left corner is slanted.
topRightTop right corner is slanted.
bottomLeftBottom left corner is slanted.
bottomRightBottom right corner is slanted.
Specifies which corner is slanted. Possible values are 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'.
veneersobjectAn object defining the veneers on each side of the rectangle.
Show Child Attributes
SlantRectangleShape example
LShape
L-shaped piece.
| Attributes |
|---|
vertLengthlength mandatorySize of the vertical leg of the L.
horzLengthlength mandatorySize of the horizontal leg of the L.
recessedCornermandatoryRecessedCornerenum Specifies which corner of the rectangle is recessed.
Allowed values
topLeftTop left corner is recessed.
topRightTop right corner is recessed.
bottomRightBottom right corner is recessed.
bottomLeftBottom left corner is recessed.
Specifies which corner is recessed.
veneersobjectAn object defining veneers on each side of the L shape.
Show Child Attributes
LShape example
RightTriangleShape
Right triangle piece.
| Attributes |
|---|
rightAnglePosmandatoryRightAnglePosenum Specifies the position of the right angle corner.
Allowed values
topLeftRight angle at the top left corner.
topRightRight angle at the top right corner.
bottomRightRight angle at the bottom right corner.
bottomLeftRight angle at the bottom left corner.
Defines where the right angle is located.
veneersobjectAn object defining veneers on the sides of the triangle.
Show Child Attributes
RightTriangleShape example
SlopeRectangleShape
Rectangle with a sloped top edge.
| Attributes |
|---|
toWidthlength mandatoryRemaining width at the sloped side (defines slope depth).
slopeDirectionmandatorySlopeDirectionenum Specifies slope orientation.
Allowed values
downToRightSlope goes downward from left to right.
downToLeftSlope goes downward from right to left.
Orientation of the slope.
veneersobjectVeneers on each edge of the sloped rectangle.
Show Child Attributes
SlopeRectangleShape example
TrapezoidShape
Trapezoid piece.
| Attributes |
|---|
leftSlopeLengthlength mandatoryLength of the left sloping edge.
rightSlopeLengthlength mandatoryLength of the right sloping edge.
veneersobjectVeneers on trapezoid sides.
Show Child Attributes
TrapezoidShape example
OctagonShape
Octagon piece.
| Attributes |
|---|
tlVlength mandatoryTop-left vertical cut length.
tlHlength mandatoryTop-left horizontal cut length.
trVlength mandatoryTop-right vertical cut length.
trHlength mandatoryTop-right horizontal cut length.
brVlength mandatoryBottom-right vertical cut length.
brHlength mandatoryBottom-right horizontal cut length.
blVlength mandatoryBottom-left vertical cut length.
blHlength mandatoryBottom-left horizontal cut length.
veneersobjectVeneers on octagon edges.
Show Child Attributes
OctagonShape example
EllipseShape
Elliptical piece.
| Attributes |
|---|
veneersobjectSingle veneer definition for ellipse border.
Show Child Attributes
EllipseShape example
CircleShape
Circle piece.
| Attributes |
|---|
variantmandatoryCircleVariantenum Specifies circle variant.
Allowed values
fullFull circle.
1/4Quarter of a circle.
1/2Half of a circle.
3/4Three quarters of a circle.
Defines circle variant.
veneersobjectVeneers applied to circle edges.
Show Child Attributes
CircleShape example
RingShape
Ring piece (circle with inner cut).
| Attributes |
|---|
innerRadiuslength mandatoryRadius of the inner hole.
veneersobjectVeneers for ring edges.
Show Child Attributes
RingShape example
AnyShape
Arbitrary shape defined by path.
Veneers are not supported for this type of shape.
| Attributes |
|---|
formatstring mandatoryPath definition format. Currently only
svg-pathis supported.pathstring mandatoryPath definition string in the specified format. The geometry must form a continuous, closed contour, without self-intersections or cross cuts. Each segment must connect seamlessly with the next, and the last segment must close the shape by returning to the starting point.
Paths must not be interrupted - the entire contour has to be defined as one continuous path. For example, this is not allowed (multiple
Mcommands breaking the contour):M 0.0,1000.0 L 0.0,0.0 M 0.0,0.0 L 1000.0,0.0 M 1000.0,0.0 L 1000.0,250.0 M 1000.0,250.0 L 0.0,1000.0 ZThe correct definition should be a single continuous path:
M 0.0,1000.0 L 0.0,0.0 L 1000.0,0.0 L 1000.0,250.0 L 0.0,1000.0 ZHoles are supported. Each hole must also be a continuous, closed contour, fully contained within the main shape. Holes cannot intersect or touch the outer contour or other holes.
The path should be expressed in TonCut's internal units (1 unit = 0.01 mm). You can also use the
scaleproperty to scale the path dimensions.scalenumberdef: 1.0Scaling factor applied to the path dimensions.