LinearSort

class pyslm.hatching.LinearSort(hatchAngle=0.0)

Bases: 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 that acts as the reference axis which the scan vectors to be sorted across.

Methods Summary

sort(scanVectors)

Sorts the scan vectors in a particular order

Attributes Documentation

hatchAngle

The hatch angle that acts as the reference axis which the scan vectors to be sorted across. This is provided in degrees.

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