Skip to content

macro2

macro2

Container for aperture macro elements.

ApertureMacro2

Bases: FrozenGeneralModel

Container for the elements contained within an aperture macro.

Source code in src/pygerber/gerberx3/parser2/macro2/macro2.py
class ApertureMacro2(FrozenGeneralModel):
    """Container for the elements contained within an aperture macro."""

    name: str
    statements: ReadonlyStatementBuffer2

    def on_parser2_eval_statement(self, context: Parser2Context) -> None:
        """Evaluate macro to create concrete macro aperture."""
        for stmt in self.statements:
            stmt.on_parser2_eval_statement(context)

on_parser2_eval_statement

on_parser2_eval_statement(context: Parser2Context) -> None

Evaluate macro to create concrete macro aperture.

Source code in src/pygerber/gerberx3/parser2/macro2/macro2.py
def on_parser2_eval_statement(self, context: Parser2Context) -> None:
    """Evaluate macro to create concrete macro aperture."""
    for stmt in self.statements:
        stmt.on_parser2_eval_statement(context)