g54_select_aperture
g54_select_aperture ¶
Wrapper for G70 token.
Backend ¶
Bases: ABC
Drawing backend interface.
Source code in src/pygerber/backend/abstract/backend_cls.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
__init__ ¶
create_aperture_handle ¶
Create new aperture handle.
Source code in src/pygerber/backend/abstract/backend_cls.py
get_private_aperture_handle ¶
get_private_aperture_handle(
public_aperture_handle: PublicApertureHandle,
) -> PrivateApertureHandle
Get private aperture handle.
draw ¶
Execute all draw actions to create visualization.
Source code in src/pygerber/backend/abstract/backend_cls.py
finalize_aperture_creation ¶
get_result_handle
abstractmethod
¶
get_aperture_handle_cls
abstractmethod
¶
get_draw_circle_cls
abstractmethod
¶
get_draw_rectangle_cls
abstractmethod
¶
get_draw_polygon_cls
abstractmethod
¶
get_draw_commands_handle_cls
abstractmethod
¶
get_draw_paste_cls
abstractmethod
¶
get_draw_region_cls
abstractmethod
¶
get_draw_vector_line_cls
abstractmethod
¶
get_draw_arc_cls
abstractmethod
¶
DrawCommand ¶
Bases: ABC
Description of aperture component.
Source code in src/pygerber/backend/abstract/draw_commands/draw_command.py
State ¶
Bases: FrozenGeneralModel
GerberX3 interpreter state.
Source code in src/pygerber/gerberx3/parser/state.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
region_boundary_points
class-attribute
instance-attribute
¶
Points defining the shape of the region.
is_output_image_negation_required
class-attribute
instance-attribute
¶
In Gerber specification deprecated IP command is mentioned. It can set image polarity to either positive, the usual one, or to negative. Under negative image polarity, image generation is different. Its purpose is to create a negative image, clear areas in a dark background. The entire image plane in the background is initially dark instead of clear. The effect of dark and clear polarity is toggled. The entire image is simply reversed, dark becomes white and vice versa. This effect can be achieved by simply inverting colors of output image.
apertures
class-attribute
instance-attribute
¶
Collection of all apertures defined until given point in code.
macros
class-attribute
instance-attribute
¶
Collection of all macros defined until given point in code.
get_units ¶
get_coordinate_parser ¶
Get coordinate parser or raise CoordinateFormatNotSetError.
get_current_aperture ¶
Get current aperture or raise ApertureNotSelectedError.
parse_coordinate ¶
Parse, include substitution with current and conversion to Offset.
Source code in src/pygerber/gerberx3/parser/state.py
DNNSelectAperture ¶
Bases: CommandToken
4.6 Current Aperture (Dnn).¶
The command Dnn (nn≥10) sets the current aperture graphics state parameter. The syntax is:
D
- Command code.<aperture number>
- The aperture number (integer ≥10). An aperture with that number must be in the apertures dictionary.
D-commands 0 to 9 are reserved and cannot be used for apertures. The D01 and D03 commands use the current aperture to create track and flash graphical objects.
Example¶
See section 4.6 of The Gerber Layer Format Specification
Source code in src/pygerber/gerberx3/tokenizer/tokens/dnn_select_aperture.py
new
classmethod
¶
Create instance of this class.
Created to be used as callback in ParserElement.set_parse_action()
.
Source code in src/pygerber/gerberx3/tokenizer/tokens/dnn_select_aperture.py
update_drawing_state ¶
Set current aperture.
Source code in src/pygerber/gerberx3/tokenizer/tokens/dnn_select_aperture.py
get_gerber_code ¶
Get gerber code represented by this token.
G54SelectAperture ¶
Bases: DNNSelectAperture
Wrapper for G54DNN token.
Select aperture.
This historic code optionally precedes an aperture selection Dnn command. It has no effect. Sometimes used. Deprecated in 2012.
See section 8.1.1 of The Gerber Layer Format Specification Revision 2023.03 - https://argmaster.github.io/pygerber/latest/gerber_specification/revision_2023_03.html
Source code in src/pygerber/gerberx3/tokenizer/tokens/g54_select_aperture.py
warn_deprecated_code ¶
Display warning about deprecated code.