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 |
---|
veneers
objectAn 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.
leftAngle
angle mandatoryLeft slant angle measured from middle to right.
rightAngle
angle mandatoryRight slant angle measured from middle to left.
LinearShape example
SlantRectangleShape
Slant rectangle shape.
Attributes |
---|
vertLength
length mandatoryLength of the vertical edge shortened by the slant.
horzLength
length mandatoryLength of the horizontal edge shortened by the slant.
slantCorner
mandatorySlantCorner
enum Specifies which corner is slanted. Possible values are `topLeft`, `topRight`, `bottomLeft`, `bottomRight`.
Allowed values
topLeft
Top left corner is slanted.
topRight
Top right corner is slanted.
bottomLeft
Bottom left corner is slanted.
bottomRight
Bottom right corner is slanted.
Specifies which corner is slanted. Possible values are 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'.
veneers
objectAn object defining the veneers on each side of the rectangle.
Show Child Attributes
SlantRectangleShape example
LShape
L-shaped piece.
Attributes |
---|
vertLength
length mandatorySize of the vertical leg of the L.
horzLength
length mandatorySize of the horizontal leg of the L.
recessedCorner
mandatoryRecessedCorner
enum Specifies which corner of the rectangle is recessed.
Allowed values
topLeft
Top left corner is recessed.
topRight
Top right corner is recessed.
bottomRight
Bottom right corner is recessed.
bottomLeft
Bottom left corner is recessed.
Specifies which corner is recessed.
veneers
objectAn object defining veneers on each side of the L shape.
Show Child Attributes
LShape example
RightTriangleShape
Right triangle piece.
Attributes |
---|
rightAnglePos
mandatoryRightAnglePos
enum Specifies the position of the right angle corner.
Allowed values
topLeft
Right angle at the top left corner.
topRight
Right angle at the top right corner.
bottomRight
Right angle at the bottom right corner.
bottomLeft
Right angle at the bottom left corner.
Defines where the right angle is located.
veneers
objectAn object defining veneers on the sides of the triangle.
Show Child Attributes
RightTriangleShape example
SlopeRectangleShape
Rectangle with a sloped top edge.
Attributes |
---|
toWidth
length mandatoryRemaining width at the sloped side (defines slope depth).
slopeDirection
mandatorySlopeDirection
enum Specifies slope orientation.
Allowed values
downToRight
Slope goes downward from left to right.
downToLeft
Slope goes downward from right to left.
Orientation of the slope.
veneers
objectVeneers on each edge of the sloped rectangle.
Show Child Attributes
SlopeRectangleShape example
TrapezoidShape
Trapezoid piece.
Attributes |
---|
leftSlopeLength
length mandatoryLength of the left sloping edge.
rightSlopeLength
length mandatoryLength of the right sloping edge.
veneers
objectVeneers on trapezoid sides.
Show Child Attributes
TrapezoidShape example
OctagonShape
Octagon piece.
Attributes |
---|
tlV
length mandatoryTop-left vertical cut length.
tlH
length mandatoryTop-left horizontal cut length.
trV
length mandatoryTop-right vertical cut length.
trH
length mandatoryTop-right horizontal cut length.
brV
length mandatoryBottom-right vertical cut length.
brH
length mandatoryBottom-right horizontal cut length.
blV
length mandatoryBottom-left vertical cut length.
blH
length mandatoryBottom-left horizontal cut length.
veneers
objectVeneers on octagon edges.
Show Child Attributes
OctagonShape example
EllipseShape
Elliptical piece.
Attributes |
---|
veneers
objectSingle veneer definition for ellipse border.
Show Child Attributes
EllipseShape example
CircleShape
Circle piece.
Attributes |
---|
variant
mandatoryCircleVariant
enum Specifies circle variant.
Allowed values
full
Full circle.
1/4
Quarter of a circle.
1/2
Half of a circle.
3/4
Three quarters of a circle.
Defines circle variant.
veneers
objectVeneers applied to circle edges.
Show Child Attributes
CircleShape example
RingShape
Ring piece (circle with inner cut).
Attributes |
---|
innerRadius
length mandatoryRadius of the inner hole.
veneers
objectVeneers for ring edges.
Show Child Attributes
RingShape example
AnyShape
Arbitrary shape defined by path.
Veneers are not supported for this type of shape.
Attributes |
---|
format
string mandatoryPath definition format. Currently only
svg-path
is supported.path
string 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
M
commands 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 Z
The 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 Z
Holes 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
scale
property to scale the path dimensions.scale
numberdef: 1.0Scaling factor applied to the path dimensions.