Layer

class pyslm.geometry.Layer(z=0, id=0)

Bases: object

Slice Layer is a simple class structure for containing a set of SLM LayerGeometry including specific derivatives including: ContourGeometry, HatchGeometry, PointsGeometry types stored in geometry and also the current slice or layer position in z.

The layer z position is stored in an integer format to remove any specific rounding - typically this is specified as the number of microns.

Attributes Summary

geometry

LayerGeometry sections that are stored in the layer.

layerFilePosition

The position of the layer in the build file, when available.

layerId

The layer id for the Layer.

name

The name of the Layer

z

The Z Position of the Layer is given as an integer to ensure that no rounding errors are given to the slm systen.

Methods Summary

appendGeometry(geom)

Complimentary method to match libSLM API.

getContourGeometry()

Returns a list of all ContourGeometry stored in the layer.

getGeometry([scanMode])

Contains all the layer geometry groups in the layer.

getHatchGeometry()

Returns a list of all HatchGeometry stored in the layer.

getPointsGeometry()

Returns a list of all PointsGeometry stored in the layer.

isLoaded()

rtype:

bool

Attributes Documentation

geometry

LayerGeometry sections that are stored in the layer.

Return type:

List[Any]

layerFilePosition

The position of the layer in the build file, when available.

layerId

The layer id for the Layer. This corresponds to a position in z based on a uniform layer thickness defined in the header of the machine build file (Header.zUnit)

Return type:

int

name

The name of the Layer

Return type:

str

z

The Z Position of the Layer is given as an integer to ensure that no rounding errors are given to the slm systen. Under most situations this should correspond as the product of the layer id (Layer.layerId) and the zUnit - layer thickness (Header.zUnit).

Return type:

int

Methods Documentation

appendGeometry(geom)

Complimentary method to match libSLM API. This appends any LayerGeometry and derived classes into the Layer in sequential order.

Parameters:

geom (LayerGeometry) – The LayerGeometry to add to the layer

getContourGeometry()

Returns a list of all ContourGeometry stored in the layer.

Return type:

List[HatchGeometry]

getGeometry(scanMode=0)

Contains all the layer geometry groups in the layer.

Return type:

List[Any]

getHatchGeometry()

Returns a list of all HatchGeometry stored in the layer.

Return type:

List[HatchGeometry]

getPointsGeometry()

Returns a list of all PointsGeometry stored in the layer.

Return type:

List[PointsGeometry]

isLoaded()
Return type:

bool