jitx.shapes package#
Shapes and geometry#
This module provides the core Shape and ShapeGeometry
classes for representing geometric objects with optional transformations.
Shapes can be converted between different representations (primitive, shapely)
and positioned using transforms.
- class Shape(geometry, transform)[source]#
Bases:
Generic[CoShapeGeometry]A shape with geometry and an optional transform.
Shapes combine geometric data with positioning information, allowing geometric objects to be placed and transformed in 2D space.
- Parameters:
geometry (CoShapeGeometry)
transform (Transform | None)
-
geometry:
TypeVar(CoShapeGeometry, bound= ShapeGeometry, covariant=True)# The geometric data for this shape.
- to_shapely()[source]#
Convert the given shape into a ‘shapely’ native format including the transform.
- Returns:
A
ShapelyGeometryshape with all of the points of the geometry transformed by thetransformproject of this shape.
- class ShapeGeometry[source]#
-
Shape geometry is raw shape information, without a transform.
- property geometry#
- property transform#