Skip to content

Commit abeab37

Browse files
committed
Fixed Ignore-hidden and ignore-locked from Inkscape.
Added options to inx. file
1 parent d061809 commit abeab37

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

gcodeplot.inx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@
3838

3939
</page>
4040
<page name="fitting" _gui-text="Fitting and Extracting">
41+
<label appearance="header">Fitting</label>
42+
4143
<param name="scale" type="enum" _gui-text="Scaling mode:" _gui-description="Method for scaling to print area (Default: none; should be 'none' if tool-offset option is set in cutter tab)">
42-
<item value="n">none (needed if tool offset&gt;0)</item>
44+
<item value="n">none (needed if tool offset &gt; 0)</item>
4345
<item value="f">fit</item>
4446
<item value="d">down-only</item>
4547
</param>
@@ -55,12 +57,16 @@
5557
<item value="center">center</item>
5658
<item value="top">right</item>
5759
</param>
58-
60+
<separator />
61+
<label appearance="header">Extracting</label>
62+
<param name="ignore-hidden" type="bool" gui-text="Ignore hidden elements" _gui-description="If checked, hidden layers, groups and elements will be discarded"></param>
63+
<param name="ignore-locked" type="bool" gui-text="Ignore locked elements" _gui-description="If checked, locked layers, groups and elements will be discarded"></param>
5964
<hbox>
6065
<param name="boolean-extract-color" type="bool" gui-text="Extract only one color from drawing" _gui-description="Uncheck to include all colors; otherwise, choose the color to extract."></param>
6166
<spacer size="expand"/>
6267
<param name="extract-color" type="color" gui-text=" " appearance="colorbutton" _gui-description="The color to extract. Alpha values are discarded"></param>
6368
</hbox>
69+
6470
</page>
6571
<page name="drawing" _gui-text="Drawing Settings">
6672
<param name="shading-threshold" type="float" min="0" max="1" precision="2" _gui-text="Shading threshold:" _gui-description="Shade whenever the shade is below this value, where 0=black and 1=white. To turn off shading, set to 0. (Default: 1, shade everything other than white).">1</param>

gcodeplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,8 @@ def parse_arguments(argparser:cArgumentParser):
816816
argparser.add_argument('-R', '--extract-color', metavar='C', default=None, type=parser.rgbFromColor, help='extract color (specified in SVG format , e.g., rgb(1,0,0) or #ff0000 or red)')
817817
argparser.add_argument('-L', '--stroke-all', action=argparse.BooleanOptionalAction, default=False, help='stroke even regions specified by SVG to have no stroke')
818818
argparser.add_argument('-e', '--direction', metavar='ANGLE', default=None, type=lambda value: None if value.lower() == 'none' else float(value), help='for slanted pens: prefer to draw in given direction (degrees; 0=positive x, 90=positive y, none=no preferred direction) [default none]')
819-
argparser.add_argument('--ignore-hidden', action=argparse.BooleanOptionalAction, default=True, help='ignore hidden SVG elements')
820-
argparser.add_argument('--ignore-locked', action=argparse.BooleanOptionalAction, default=True, help='ignore locked SVG elements (for Inkscape SVG only)')
819+
argparser.add_argument('--ignore-hidden', action=CustomBooleanAction, default=True, help='ignore hidden SVG elements')
820+
argparser.add_argument('--ignore-locked', action=CustomBooleanAction, default=True, help='ignore locked SVG elements (for Inkscape SVG only)')
821821

822822

823823
argparser.add_argument('-o', '--optimization-time', metavar='T', default=60, type=int, help='max time to spend optimizing (seconds; set to 0 to turn off optimization) [default 60]')

0 commit comments

Comments
 (0)