PlotterConfig#

class PlotterConfig(name: str, paper_configs: list[vpype.config.PaperConfig], plotter_unit_length: float, pen_count: int, info: str = '')#

Data class containing configuration for a given plotter type.

Methods

from_config

paper_config

Return the paper configuration for paper or none if not found.

paper_config_from_size

Look for a paper configuration matching paper_format and return it if found.

Attributes

info

information printed to the user when plotter is used

name

name of the plotter

paper_configs

list of PaperConfig instance

plotter_unit_length

physical size of plotter units (in pixel)

pen_count

number of pen supported by the plotter

Parameters:

Methods#

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

data (dict[str, Any]) --

Return type:

PlotterConfig

PlotterConfig.paper_config(paper: str) vpype.config.PaperConfig | None#

Return the paper configuration for paper or none if not found.

Parameters:

paper (str) -- desired paper format designator

Returns:

the PaperConfig instance corresponding to paper or None if not found

Return type:

vpype.config.PaperConfig | None

PlotterConfig.paper_config_from_size(page_size: tuple[float, float] | None) vpype.config.PaperConfig | None#

Look for a paper configuration matching paper_format and return it if found.

Parameters:

page_size (tuple[float, float] | None) -- tuple of desired page size (may be None, in which case None is returned

Returns:

the PaperConfig instance corresponding to paper_format or None if not found

Return type:

vpype.config.PaperConfig | None

Attributes#

PlotterConfig.info: str = ''#

information printed to the user when plotter is used

PlotterConfig.name: str#

name of the plotter

PlotterConfig.paper_configs: list[vpype.config.PaperConfig]#

list of PaperConfig instance

PlotterConfig.plotter_unit_length: float#

physical size of plotter units (in pixel)

PlotterConfig.pen_count: int#

number of pen supported by the plotter