toShapeContours
Converts this PShape instance into a list of ShapeContour objects.
This function processes the shape based on its family type:
If the shape is a
GROUP, it recursively converts its children into contours.If the shape is a
PATH, it converts it directly to a single ShapeContour.If the shape is
GEOMETRY, it constructs contours based on vertex information.
Unsupported shape families will throw an error.
Return
A list of ShapeContour objects representing the contours of this PShape.