Island

The Island module.

class uv_align_distribute.island.Island(island)[source]

Create Island from a set() of faces.

Parameters:island (set()) – a set() of face indexes.
BBox()[source]

Return the bounding box of the island.

Returns:a Rectangle rappresenting the bounding box of the island.
Return type:Rectangle
angle()[source]

Return the island angle.

Returns:the angle of the island in radians.
Return type:float
isIsomorphic(other)[source]

Test for isomorphism.

Return a verterx mapping between two island if they are isomorphic or ‘None’ if there is no isomorphism. The returned mapped vertex index, correspond to the mesh vertex index and not the uv one.

Parameters:other (Island) – the other island
Returns:mapping between vertex or None
Return type:dict, None
move(vector)[source]

Move the island by vector.

Move the island by ‘vector’, by adding ‘vector’ to the curretnt uv coords.

Parameters:vector – the vector to add.
Return type:mathutils.Vector
rotate(angle)[source]

Rotate the island on it’s center by ‘angle(radians)’.

Parameters:angle – the angle(radians) of rotation.
Return type:float
scale(scaleX, scaleY)[source]

Scale the island by ‘scaleX, scaleY’.

Parameters:
  • scaleX (float) – x scale factor.
  • scaleY (float) – y scale factor
size()[source]

Return the island size.

Returns:the size of the island(bounding box).
Return type:Size
snapToUnselected(targetIslands, threshold)[source]

Snap this island to ‘targetIsland’.

Use threshold to adjust vertex macthing. targetIsland is the island to use to search for nearest vertex.

Parameters:
  • targetIsland (Island) – the target island for snapping
  • threshold (float) – distance from one vert to the others