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
ANGSTROMS
public
mixed
ANGSTROMS
= 11
ASTRONOMICAL_UNITS
public
mixed
ASTRONOMICAL_UNITS
= 18
CENTIMETERS
public
mixed
CENTIMETERS
= 5
DECAMETERS
public
mixed
DECAMETERS
= 15
DECIMETERS
public
mixed
DECIMETERS
= 14
EARTH_RADIUS
public
mixed
EARTH_RADIUS
= 6378.1
FEET
public
mixed
FEET
= 2
GIGAMETERS
public
mixed
GIGAMETERS
= 17
HECTOMETERS
public
mixed
HECTOMETERS
= 16
INCHES
public
mixed
INCHES
= 1
KILOMETERS
public
mixed
KILOMETERS
= 7
LIGHT_YEARS
public
mixed
LIGHT_YEARS
= 19
METERS
public
mixed
METERS
= 6
MICROINCHES
public
mixed
MICROINCHES
= 8
MICRONS
public
mixed
MICRONS
= 13
MILES
public
mixed
MILES
= 3
MILLIMETERS
public
mixed
MILLIMETERS
= 4
MILS
public
mixed
MILS
= 9
NANOMETERS
public
mixed
NANOMETERS
= 12
PARSECS
public
mixed
PARSECS
= 20
UNITLESS
public
mixed
UNITLESS
= 0
YARDS
public
mixed
YARDS
= 10
Properties
$layerName
private
int|string
$layerName
= '0'
$layers
private
array<string|int, mixed>
$layers
= []
$offset
private
array<string|int, mixed>
$offset
= [0, 0, 0]
$shapes
private
array<string|int, mixed>
$shapes
= []
$units
private
int
$units
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
addPoint()
Add point to current layout
public
addPoint(float $x, float $y, float $z) : self
Parameters
- $x : float
- $y : float
- $z : float
Tags
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 —getLayersString()
Generates LAYERS
private
getLayersString() : string
Tags
Return values
string —getString()
Returns DXF document as string
private
getString() : string
Return values
string —DXF document