Skip to content

Commit

Permalink
Fixed Ignore-hidden and ignore-locked from Inkscape.
Browse files Browse the repository at this point in the history
Added options to inx. file
  • Loading branch information
Iridium-IO committed Jan 1, 2024
1 parent d061809 commit abeab37
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions gcodeplot.inx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@

</page>
<page name="fitting" _gui-text="Fitting and Extracting">
<label appearance="header">Fitting</label>

<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)">
<item value="n">none (needed if tool offset&gt;0)</item>
<item value="n">none (needed if tool offset &gt; 0)</item>
<item value="f">fit</item>
<item value="d">down-only</item>
</param>
Expand All @@ -55,12 +57,16 @@
<item value="center">center</item>
<item value="top">right</item>
</param>

<separator />
<label appearance="header">Extracting</label>
<param name="ignore-hidden" type="bool" gui-text="Ignore hidden elements" _gui-description="If checked, hidden layers, groups and elements will be discarded"></param>
<param name="ignore-locked" type="bool" gui-text="Ignore locked elements" _gui-description="If checked, locked layers, groups and elements will be discarded"></param>
<hbox>
<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>
<spacer size="expand"/>
<param name="extract-color" type="color" gui-text=" " appearance="colorbutton" _gui-description="The color to extract. Alpha values are discarded"></param>
</hbox>

</page>
<page name="drawing" _gui-text="Drawing Settings">
<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>
Expand Down
4 changes: 2 additions & 2 deletions gcodeplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,8 @@ def parse_arguments(argparser:cArgumentParser):
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)')
argparser.add_argument('-L', '--stroke-all', action=argparse.BooleanOptionalAction, default=False, help='stroke even regions specified by SVG to have no stroke')
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]')
argparser.add_argument('--ignore-hidden', action=argparse.BooleanOptionalAction, default=True, help='ignore hidden SVG elements')
argparser.add_argument('--ignore-locked', action=argparse.BooleanOptionalAction, default=True, help='ignore locked SVG elements (for Inkscape SVG only)')
argparser.add_argument('--ignore-hidden', action=CustomBooleanAction, default=True, help='ignore hidden SVG elements')
argparser.add_argument('--ignore-locked', action=CustomBooleanAction, default=True, help='ignore locked SVG elements (for Inkscape SVG only)')


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]')
Expand Down

0 comments on commit abeab37

Please sign in to comment.