GreedySort¶
-
class
pyslm.hatching.
GreedySort
(hatchAngle=0.0, hatchTol=None)¶ Bases:
pyslm.hatching.sorting.BaseSort
The greedy sort approach is a heuristic approach to sorting the scan vectors based on the current hatch angle specified in
pyslm.hatching.sorting.LinearSort.hatchAngle
and clustering vectors together based on the hatch group distance -pyslm.hatching.sorting.LinearSort.hatchTol
.The approach finds clusters of scan vectors based on their connectivity based on a threshold
Attributes Summary
The hatch angle reference across the scan vectors to be sorted
The hatch group tolerance specifies the arbitrary distance used for grouping the scan vectors into ‘scanning clusters’
Used to set the sorting mode (default sort along x)
Methods Summary
sort
(scanVectors)Sorts the scan vectors
Attributes Documentation
-
hatchAngle
¶ The hatch angle reference across the scan vectors to be sorted
- Return type:
float
-
hatchTol
¶ The hatch group tolerance specifies the arbitrary distance used for grouping the scan vectors into ‘scanning clusters’
-
sortY
¶ Used to set the sorting mode (default sort along x)
- Return type:
bool
Methods Documentation
-
sort
(scanVectors)¶ Sorts the scan vectors
-