Skip to content

shape_segment

shape_segment

base module contains ShapeSegment class used as base class for all Shape segments.

ShapeSegment

Bases: ModelType

Base class for shape segment types.

Source code in src/pygerber/vm/commands/shape_segments/shape_segment.py
class ShapeSegment(ModelType):
    """Base class for shape segment types."""

    @pp.cached_property
    def outer_box(self) -> Box:
        """Get outer box of shape segment."""
        raise NotImplementedError

    def transform(self, transform: Matrix3x3) -> Self:
        """Transform line."""
        raise NotImplementedError

outer_box

outer_box() -> Box

Get outer box of shape segment.

Source code in src/pygerber/vm/commands/shape_segments/shape_segment.py
@pp.cached_property
def outer_box(self) -> Box:
    """Get outer box of shape segment."""
    raise NotImplementedError

transform

transform(transform: Matrix3x3) -> Self

Transform line.

Source code in src/pygerber/vm/commands/shape_segments/shape_segment.py
def transform(self, transform: Matrix3x3) -> Self:
    """Transform line."""
    raise NotImplementedError