Skip to content

enums

The enums module contains enumerations used in the Gerber X3 formatter.

MacroSplitMode

Bases: Enum

Macro split mode.

NoSplit class-attribute instance-attribute

NoSplit = 'NoSplit'

Disable macro definition splitting.

SplitOnPrimitives class-attribute instance-attribute

SplitOnPrimitives = 'SplitOnPrimitives'

Enable splitting macro definition on primitives.

SplitOnParameters class-attribute instance-attribute

SplitOnParameters = 'SplitOnParameters'

Enable splitting macro definition on primitive parameters.

MacroEndInNewLine

Bases: Enum

Macro end in new line.

Yes class-attribute instance-attribute

Yes = 'Yes'

Move % sign ending macro to new line.

No class-attribute instance-attribute

No = 'No'

keep % sign in same line as last primitive.

FloatTrimTrailingZeros

Bases: Enum

Float trim trailing zeros.

Yes class-attribute instance-attribute

Yes = 'Yes'

Enable trimming of trailing zeros.

No class-attribute instance-attribute

No = 'No'

Disable trimming of trailing zeros.

EmptyLineBeforePolaritySwitch

Bases: Enum

Empty line before polarity switch.

Yes class-attribute instance-attribute

Yes = 'Yes'

Enable adding empty line before polarity switch.

No class-attribute instance-attribute

No = 'No'

Disable adding empty line before polarity switch.

KeepNonStandaloneCodes

Bases: Enum

Keep non standalone codes.

SeparateCodes class-attribute instance-attribute

SeparateCodes = 'SeparateCodes'

Separate non standalone codes into standalone equivalents.

Keep class-attribute instance-attribute

Keep = 'Keep'

Keep non standalone codes as they are.

RemoveG54

Bases: Enum

Remove G54 command.

Remove class-attribute instance-attribute

Remove = 'Remove'

Remove G54 command from output.

Keep class-attribute instance-attribute

Keep = 'Keep'

Keep G54 command in output.

RemoveG55

Bases: Enum

Remove G55 command.

Remove class-attribute instance-attribute

Remove = 'Remove'

Remove G55 command from output.

Keep class-attribute instance-attribute

Keep = 'Keep'

Keep G55 command in output.

ExplicitParenthesis

Bases: Enum

Explicit parenthesis.

AddExplicit class-attribute instance-attribute

AddExplicit = 'AddExplicit'

Add explicit parenthesis to all mathematical operations.

KeepOriginal class-attribute instance-attribute

KeepOriginal = 'KeepOriginal'

Keep original parenthesis in mathematical operations.

StripWhitespace

Bases: Enum

Strip whitespace.

StripAll class-attribute instance-attribute

StripAll = 'StripAll'

Strip all whitespace from the output.

Default class-attribute instance-attribute

Default = 'Default'

Use implicit whitespace rules and those defined by other options.