Hatcher

class pyslm.hatching.Hatcher

Bases: pyslm.hatching.hatching.BaseHatcher

Provides a generic SLM Hatcher ‘recipe’ with standard parameters for defining the hatch across regions. This includes generating multiple contour offsets and then a generic hatch infill pattern by re-implementing the BaseHatcher.hatch() method. This class may be derived from to provide additional or customised behavior.

Attributes Summary

contourOffset

The contour offset is the distance between the contour or border scans

hatchAngle

The base hatch angle used for hatching the region expressed in degrees \([-180,180]\)

hatchDistance

The distance between adjacent hatch scan vectors

hatchSortMethod

The hatch sort method used once the hatch vectors have been generated

hatchingEnabled

If the internal hatch region should be processed (default: True)

layerAngleIncrement

An additional offset used to increment the hatch angle between layers in degrees.

numInnerContours

The total number of inner contours to generate by offsets from the boundary region.

numOuterContours

The total number of outer contours to generate by offsets from the boundary region.

scanContourFirst

Determines if the contour/border vectors LayerGeometry are scanned first before the hatch vectors.

spotCompensation

The spot (laser point) compensation factor is the distance to offset the outer-boundary and other internal hatch features in order to factor in the exposure radius of the laser.

volumeOffsetHatch

An additional offset may be added (positive or negative) between the contour/border scans and the internal hatching for the bulk volume.

Methods Summary

hatch(boundaryFeature)

Generates a series of contour or boundary offsets along with a basic full region internal hatch.

Attributes Documentation

contourOffset

The contour offset is the distance between the contour or border scans

Return type:

float

hatchAngle

The base hatch angle used for hatching the region expressed in degrees \([-180,180]\)

Return type:

float

hatchDistance

The distance between adjacent hatch scan vectors

Return type:

float

hatchSortMethod

The hatch sort method used once the hatch vectors have been generated

hatchingEnabled

If the internal hatch region should be processed (default: True)

Return type:

bool

layerAngleIncrement

An additional offset used to increment the hatch angle between layers in degrees. This is typically set to 66.6 \(^\circ\) per layer to provide additional uniformity of the scan vectors across multiple layers. By default this is set to 0.0

Return type:

float

numInnerContours

The total number of inner contours to generate by offsets from the boundary region.

Return type:

int

numOuterContours

The total number of outer contours to generate by offsets from the boundary region.

Return type:

int

scanContourFirst

Determines if the contour/border vectors LayerGeometry are scanned first before the hatch vectors. By default this is set to False.

Return type:

bool

spotCompensation

The spot (laser point) compensation factor is the distance to offset the outer-boundary and other internal hatch features in order to factor in the exposure radius of the laser.

Return type:

float

volumeOffsetHatch

An additional offset may be added (positive or negative) between the contour/border scans and the internal hatching for the bulk volume.

Return type:

float

Methods Documentation

hatch(boundaryFeature)

Generates a series of contour or boundary offsets along with a basic full region internal hatch.

Parameters:

boundaryFeature – The collection of boundaries of closed polygons within a layer.

Return type:

Optional[Layer]

Returns:

A Layer object containing a list of LayerGeometry objects generated