Island¶

class
pyslm.hatching.
Island
(origin=array([[0., 0.]]), orientation=0.0, islandWidth=0.0, islandOverlap=0.0, hatchDistance=0.1)¶ Bases:
pyslm.hatching.hatching.InnerHatchRegion
Island represents a square subregion containing a series of orthogonal hatches which represents a typically a checkerboard scan strategy.
Attributes Summary
The distance between adjacent hatch vectors
The length of overlap between adjacent islands in both directions \((x', y')\)
The square island width
Methods Summary
boundary
()Returns the transformed boundary obtained from
localBoundary()
into the global coordinate system \((x,y)\).generateInternalHatch
([isOdd])Generates a set of hatches orthogonal to the island’s coordinate system \((x', y')\).
hatch
()Generates a set of hatches orthogonal to the island’s coordinate system depending on if the sum of
posId
is even or odd.Returns the local square boundary based on the island width (
islandWidth
) and the island overlap (islandOverlap
).Attributes Documentation

hatchDistance
¶ The distance between adjacent hatch vectors
 Return type:
float

islandOverlap
¶ The length of overlap between adjacent islands in both directions \((x', y')\)
 Return type:
float

islandWidth
¶ The square island width
 Return type:
float
Methods Documentation

boundary
()¶ Returns the transformed boundary obtained from
localBoundary()
into the global coordinate system \((x,y)\). Return type:
Polygon
 Returns:
Boundary polygon

generateInternalHatch
(isOdd=True)¶ Generates a set of hatches orthogonal to the island’s coordinate system \((x', y')\).
 Parameters:
isOdd (
bool
) – The chosen orientation of the hatching Return type:
ndarray
 Returns:
(nx3) Set of sorted hatch coordinates

hatch
()¶ Generates a set of hatches orthogonal to the island’s coordinate system depending on if the sum of
posId
is even or odd. The returned hatch vectors are transformed and sorted depending on the direction. Return type:
ndarray
 Returns:
The transformed and ordered hatch vectors

localBoundary
()¶ Returns the local square boundary based on the island width (
islandWidth
) and the island overlap (islandOverlap
). The island overlap provides an offset from the original boundary, so the user must compensate the actual overlap by a factor of a half. The boundary is cached into a static class attribute :attr:Island._boundary` since this remains constant typically across the entire hatching process. If the user desires to change this the user should reimplement the class and this method. Return type:
ndarray
 Returns:
Coordinates representing the local boundary
