LinearSort

class pyslm.hatching.LinearSort

Bases: pyslm.hatching.sorting.BaseSort

A linear sort approaches to sorting the scan vectors based on the current hatch angle specified in pyslm.hatching.sorting.LinearSort.hatchAngle. The approach takes the dot product of the hatch mid-point and the projection along the X-axis is sorted in ascending order (+ve X direction).

Attributes Summary

hatchAngle

The hatch angle reference across the scan vectors to be sorted

Methods Summary

sort(scanVectors)

Sorts the scan vectors in a particular order

Attributes Documentation

hatchAngle

The hatch angle reference across the scan vectors to be sorted

Return type:

float

Methods Documentation

sort(scanVectors)

Sorts the scan vectors in a particular order

Parameters:

vectors – The un-sorted array of scan vectors

Return type:

ndarray

Returns:

The sorted array of scan vectors