AirLay backend

DxfCreator
in package

Table of Contents

ANGSTROMS  = 11
ASTRONOMICAL_UNITS  = 18
CENTIMETERS  = 5
DECAMETERS  = 15
DECIMETERS  = 14
EARTH_RADIUS  = 6378.1
FEET  = 2
GIGAMETERS  = 17
HECTOMETERS  = 16
INCHES  = 1
KILOMETERS  = 7
LIGHT_YEARS  = 19
METERS  = 6
MICROINCHES  = 8
MICRONS  = 13
MILES  = 3
MILLIMETERS  = 4
MILS  = 9
NANOMETERS  = 12
PARSECS  = 20
UNITLESS  = 0
YARDS  = 10
$layerName  : int|string
$layers  : array<string|int, mixed>
$offset  : array<string|int, mixed>
$shapes  : array<string|int, mixed>
$units  : int
__construct()  : mixed
__toString()  : string
addLayer()  : self
Add new layer to document
addPoint()  : self
Add point to current layout
addPolyline3d()  : self
setLayer()  : self
Sets current layer for drawing. If layer not exists than it will be created.
getBodyString()  : string
Generates BODY
getHeaderString()  : string
Generates HEADER
getLayersString()  : string
Generates LAYERS
getString()  : string
Returns DXF document as string

Constants

ASTRONOMICAL_UNITS

public mixed ASTRONOMICAL_UNITS = 18

Properties

$layers

private array<string|int, mixed> $layers = []

$offset

private array<string|int, mixed> $offset = [0, 0, 0]

$shapes

private array<string|int, mixed> $shapes = []

Methods

__construct()

public __construct([int $units = self::MILLIMETERS ]) : mixed
Parameters
$units : int = self::MILLIMETERS

(MILLIMETERS as default value) Create new DXF document

Return values
mixed

__toString()

public __toString() : string
Return values
string

addLayer()

Add new layer to document

public addLayer(string $name[, int $color = Color::GRAY ][, string $lineType = LineType::SOLID ]) : self
Parameters
$name : string
$color : int = Color::GRAY

Color code (@see adamasantares\dxf\Color class)

$lineType : string = LineType::SOLID

Line type (@see adamasantares\dxf\LineType class)

Return values
self

Instance

addPolyline3d()

public addPolyline3d(array<string|int, mixed> $points) : self
Parameters
$points : array<string|int, mixed>
Return values
self

setLayer()

Sets current layer for drawing. If layer not exists than it will be created.

public setLayer( $name[, int $color = Color::GRAY ][, string $lineType = LineType::SOLID ]) : self
Parameters
$name :
$color : int = Color::GRAY

(optional) Color code. Only for new layer (@see adamasantares\dxf\Color class)

$lineType : string = LineType::SOLID

(optional) Only for new layer

Return values
self

Instance

getBodyString()

Generates BODY

private getBodyString() : string
Return values
string

getHeaderString()

Generates HEADER

private getHeaderString() : string
Return values
string

getString()

Returns DXF document as string

private getString() : string
Return values
string

DXF document

Search results