PaperConfig#

class PaperConfig(name: str, y_axis_up: bool, origin_location: tuple[float, float], paper_size: tuple[float, float] | None = None, paper_orientation: str | None = None, x_range: tuple[int, int] | None = None, y_range: tuple[int, int] | None = None, origin_location_reference: str | None = 'topleft', info: str = '', rotate_180: bool = False, set_ps: int | None = None, final_pu_params: str | None = None, aka_names: list[str] = <factory>)#

Data class containing configuration for a give plotter type/paper size combinations.

Methods

Attributes

final_pu_params

if not None, these params are added to the final PU command

info

information printed to the user when paper is used

origin_location_reference

reference for origin_location

paper_orientation

orientation of the plotter coordinate system on paper

paper_size

X/Y axis convention of the plotter

rotate_180

if True, the geometries are rotated by 180 degrees on the page

set_ps

if not None, call PS with corresponding value

x_range

admissible range of X coordinates

y_range

admissible range of Y coordinates

name

name of the paper format

y_axis_up

if True, the Y axis point upwards instead of downwards

origin_location

location on paper of the (0, 0) plotter unit coordinates

aka_names

alternative paper names (will be found by paper_config()

Parameters:

Methods#

classmethod PaperConfig.from_config(data: dict[str, Any]) PaperConfig#
Parameters:

data (dict[str, Any]) --

Return type:

PaperConfig

Attributes#

PaperConfig.final_pu_params: None | str = None#

if not None, these params are added to the final PU command

PaperConfig.info: str = ''#

information printed to the user when paper is used

PaperConfig.origin_location_reference: str | None = 'topleft'#

reference for origin_location

PaperConfig.paper_orientation: None | str = None#

orientation of the plotter coordinate system on paper

PaperConfig.paper_size: tuple[float, float] | None = None#

X/Y axis convention of the plotter

PaperConfig.rotate_180: bool = False#

if True, the geometries are rotated by 180 degrees on the page

PaperConfig.set_ps: int | None = None#

if not None, call PS with corresponding value

PaperConfig.x_range: tuple[int, int] | None = None#

admissible range of X coordinates

PaperConfig.y_range: tuple[int, int] | None = None#

admissible range of Y coordinates

PaperConfig.name: str#

name of the paper format

PaperConfig.y_axis_up: bool#

if True, the Y axis point upwards instead of downwards

PaperConfig.origin_location: tuple[float, float]#

location on paper of the (0, 0) plotter unit coordinates

PaperConfig.aka_names: list[str]#

alternative paper names (will be found by paper_config()