Layer¶
- class pyslm.geometry.Layer(z=0, id=0)¶
Bases:
objectA 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 ofLayerGeometryincluding 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 inlayerIdor 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
LayerGeometrysections 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
Layeris given as an integer to ensure that no rounding errors are given to the slm system.Methods Summary
appendGeometry(geom)Complimentary method to match libSLM API.
Returns a list of all
ContourGeometrystored in the layer.getGeometry([scanMode])Contains all the layer geometry groups in the layer.
Returns a list of all
HatchGeometrystored in the layer.Returns a list of all
PointsGeometrystored in the layer.isLoaded()Indicates if the layer is loaded.
Attributes Documentation
- geometry¶
LayerGeometrysections 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
Layeris given as an integer to ensure that no rounding errors are given to the slm system. 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
LayerGeometryand derived classes into the Layer in sequential order.- Parameters:
geom (
LayerGeometry) – The LayerGeometry to add to the layer- Return type:
None
- getContourGeometry()¶
Returns a list of all
ContourGeometrystored in the layer.- Return type:
List[ContourGeometry]
- getGeometry(scanMode=0)¶
Contains all the layer geometry groups in the layer.
- Return type:
List[Any]
- getHatchGeometry()¶
Returns a list of all
HatchGeometrystored in the layer.- Return type:
List[HatchGeometry]
- getPointsGeometry()¶
Returns a list of all
PointsGeometrystored in the layer.- Return type:
List[PointsGeometry]
- isLoaded()¶
Indicates if the layer is loaded.
- Return type:
bool