Layer
- class pyslm.geometry.Layer(z=0, id=0)
Bases:
object
A Layer represents a slice in the printing process for L-PBF. Usually a build is composed of a series of Layers which include additional laser parameters referenced in a
Model
. This is a simple class structure for containing a set ofLayerGeometry
including specific derivatives including:Contours/Borders:
ContourGeometry
,Hatches:
HatchGeometry
,Point Exposures:
PointsGeometry
.
These geometry objects are stored in
geometry
. Other properties for the layer include the current Z encoded position inlayerId
or absolute layer position inz
. 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
LayerGeometry
sections that are stored in the layer.The position of the layer in the build file, when available.
The layer id for the Layer.
The name of the Layer
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.
Returns a list of all
ContourGeometry
stored in the layer.getGeometry
([scanMode])Contains all the layer geometry groups in the layer.
Returns a list of all
HatchGeometry
stored in the layer.Returns a list of all
PointsGeometry
stored in the layer.isLoaded
()Indicates if the layer is loaded.
Attributes Documentation
- 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. This corresponds to a position in z based on a uniform layer thickness defined in the header of the machine build file (
Header.zUnit
)
- 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. Under most situations this should correspond as the product of the layer id (Layer.layerId
) and the zUnit - layer thickness (Header.zUnit
).
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()
Indicates if the layer is loaded.
- Return type:
bool