NAME
SVG::Estimate::Shape - Base class for all other shape calculations.
VERSION
version 1.0101
DESCRIPTION
There are a lot of methods and parameters shared between the various shape classes in SVG::Estimate. This base class encapsulates them all.
INHERITANCE
This class consumes SVG::Estimate::Role::Round and SVG::Estimate::Role::Pythagorean.
METHODS
new( properties )
Constructor.
- properties
-
- start_point
-
An array ref that describes the position of the cursor (or CNC head) prior to drawing this shape (where it left off from the last object).
- transformer
-
A reference to a Image::SVG::Transform object that contains all the transforms for this shape.
length ( )
Returns the sum of travel_length
and shape_length
.
draw_start ( )
Returns an x and a y value as an array ref of where the drawing will start that can be used by the travel_length
method.
draw_end ( )
Returns the same as draw_start()
. Override this if you have an open ended shape like a line.
travel_length ( )
Returns the distance between start_point
and where the drawing of the shape begins, which the developer must define as draw_start()
shape_length ( )
Returns the total length of the vectors in the shape.
min_x ( )
Returns the minimum position of x
that this shape will ever reach.
max_x ( )
Returns the maximum position of x
that this shape will ever reach.
min_y ( )
Returns the minimum position of y
that this shape will ever reach.
max_y ( )
Returns the max position of y
that this shape will ever reach.