diff options
Diffstat (limited to 'projects/gerbolyze/index.html')
-rw-r--r-- | projects/gerbolyze/index.html | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/projects/gerbolyze/index.html b/projects/gerbolyze/index.html index 461c199..d17382c 100644 --- a/projects/gerbolyze/index.html +++ b/projects/gerbolyze/index.html @@ -118,8 +118,8 @@ anime silkscreen.</p> <ol class="arabic"> <li><p class="first">Generate a scale-accurate template of the finished PCB from your CAD tool's gerber output:</p> <pre class="code literal-block"> -$ gerbolyze template --top template_top.svg [--bottom template_bottom.svg] my_gerber_dir -</pre> +<span class="lineno"></span><span class="line">$ gerbolyze template --top template_top.svg [--bottom template_bottom.svg] my_gerber_dir +</span></pre> </li> <li><p class="first">Load the resulting template image <a class="reference external" href="https://inkscape.org/">Inkscape</a> or another SVG editing program. Put your artwork on the appropriate SVG layer. Dark colors become filled gerber primitives, bright colors become unfilled primitives. You can directly put @@ -128,24 +128,24 @@ images, too. Masks are not supported.</p> </li> <li><p class="first">Vectorize the edited SVG template image drectly into the PCB's gerber files:</p> <pre class="code literal-block"> -$ gerbolyze paste --top template_top_edited.svg [--bottom ...] my_gerber_dir output_gerber_dir -</pre> +<span class="lineno"></span><span class="line">$ gerbolyze paste --top template_top_edited.svg [--bottom ...] my_gerber_dir output_gerber_dir +</span></pre> </li> </ol> </div> <div class="section" id="quick-start-installation-any-platform"> <h2><a class="toc-backref" href="#toc-entry-2">Quick Start Installation (Any Platform)</a></h2> <pre class="code shell literal-block"> -python<span class="whitespace"> </span>-m<span class="whitespace"> </span>pip<span class="whitespace"> </span>install<span class="whitespace"> </span>--user<span class="whitespace"> </span>gerbolyze -</pre> +<span class="lineno"></span><span class="line">python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>--user<span class="w"> </span>gerbolyze +</span></pre> <p>To uninstall, run</p> <pre class="code shell literal-block"> -python<span class="whitespace"> </span>-m<span class="whitespace"> </span>pip<span class="whitespace"> </span>uninstall<span class="whitespace"> </span>gerbolyze<span class="whitespace"> </span>gerbonara<span class="whitespace"> </span>resvg-wasi<span class="whitespace"> </span>svg-flatten-wasi -</pre> +<span class="lineno"></span><span class="line">python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>uninstall<span class="w"> </span>gerbolyze<span class="w"> </span>gerbonara<span class="w"> </span>resvg-wasi<span class="w"> </span>svg-flatten-wasi +</span></pre> <p>To update, run</p> <pre class="code shell literal-block"> -python<span class="whitespace"> </span>-m<span class="whitespace"> </span>pip<span class="whitespace"> </span>install<span class="whitespace"> </span>--user<span class="whitespace"> </span>--upgrade<span class="whitespace"> </span>--upgrade-strategy<span class="whitespace"> </span>eager<span class="whitespace"> </span>gerbolyze -</pre> +<span class="lineno"></span><span class="line">python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>--user<span class="w"> </span>--upgrade<span class="w"> </span>--upgrade-strategy<span class="w"> </span>eager<span class="w"> </span>gerbolyze +</span></pre> </div> <div class="section" id="speeding-up-gerbolyze-using-natively-built-binaries"> <h2><a class="toc-backref" href="#toc-entry-3">Speeding up gerbolyze using natively-built binaries</a></h2> @@ -167,14 +167,14 @@ binary that gerbolyze uses by giving it the absoulute path to a binary in the <t environment variables.</p> <div class="section" id="build-from-source-any-distro"> <h3><a class="toc-backref" href="#toc-entry-4">Build from source (any distro)</a></h3> -<pre class="code shell literal-block"> -git<span class="whitespace"> </span>clone<span class="whitespace"> </span>--recurse-submodules<span class="whitespace"> </span>https://git.jaseg.de/gerbolyze.git<span class="whitespace"> -</span><span class="name builtin">cd</span><span class="whitespace"> </span>gerbolyze<span class="whitespace"> - -</span>python3<span class="whitespace"> </span>-m<span class="whitespace"> </span>venv<span class="whitespace"> -</span><span class="name builtin">source</span><span class="whitespace"> </span>venv/bin/activate<span class="whitespace"> -</span>python3<span class="whitespace"> </span>setup.py<span class="whitespace"> </span>install -</pre> +<pre class="code sh literal-block"> +<span class="lineno"></span><span class="line">git<span class="w"> </span>clone<span class="w"> </span>--recurse-submodules<span class="w"> </span>https://git.jaseg.de/gerbolyze.git<span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span><span class="nb">cd</span><span class="w"> </span>gerbolyze<span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span>python3<span class="w"> </span>-m<span class="w"> </span>venv<span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span><span class="nb">source</span><span class="w"> </span>venv/bin/activate<span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span>python3<span class="w"> </span>setup.py<span class="w"> </span>install +</span></pre> </div> </div> <div class="section" id="features"> @@ -258,20 +258,20 @@ modified template and let gerbolyze process your design.</p> <h2><a class="toc-backref" href="#toc-entry-8">Command-line usage</a></h2> <p id="command-line-usage-1">Generate SVG template from Gerber files:</p> <pre class="code shell literal-block"> -gerbolyze<span class="whitespace"> </span>template<span class="whitespace"> </span><span class="operator">[</span>options<span class="operator">]</span><span class="whitespace"> </span><span class="operator">[</span>--top<span class="punctuation">|</span>--bottom<span class="operator">]</span><span class="whitespace"> </span>input_dir_or.zip<span class="whitespace"> </span>output.svg -</pre> +<span class="lineno"></span><span class="line">gerbolyze<span class="w"> </span>template<span class="w"> </span><span class="o">[</span>options<span class="o">]</span><span class="w"> </span><span class="o">[</span>--top<span class="p">|</span>--bottom<span class="o">]</span><span class="w"> </span>input_dir_or.zip<span class="w"> </span>output.svg +</span></pre> <p>Render design from an SVG made with the template above into a set of gerber files:</p> <pre class="code shell literal-block"> -gerbolyze<span class="whitespace"> </span>paste<span class="whitespace"> </span><span class="operator">[</span>options<span class="operator">]</span><span class="whitespace"> </span>artwork.svg<span class="whitespace"> </span>input_dir_or.zip<span class="whitespace"> </span>output_dir_or.zip -</pre> +<span class="lineno"></span><span class="line">gerbolyze<span class="w"> </span>paste<span class="w"> </span><span class="o">[</span>options<span class="o">]</span><span class="w"> </span>artwork.svg<span class="w"> </span>input_dir_or.zip<span class="w"> </span>output_dir_or.zip +</span></pre> <p>Use svg-flatten to convert an SVG file into Gerber or flattened SVG:</p> <pre class="code shell literal-block"> -svg-flatten<span class="whitespace"> </span><span class="operator">[</span>options<span class="operator">]</span><span class="whitespace"> </span>--format<span class="whitespace"> </span><span class="operator">[</span>gerber<span class="punctuation">|</span>svg<span class="operator">]</span><span class="whitespace"> </span><span class="operator">[</span>input_file.svg<span class="operator">]</span><span class="whitespace"> </span><span class="operator">[</span>output_file<span class="operator">]</span> -</pre> +<span class="lineno"></span><span class="line">svg-flatten<span class="w"> </span><span class="o">[</span>options<span class="o">]</span><span class="w"> </span>--format<span class="w"> </span><span class="o">[</span>gerber<span class="p">|</span>svg<span class="o">]</span><span class="w"> </span><span class="o">[</span>input_file.svg<span class="o">]</span><span class="w"> </span><span class="o">[</span>output_file<span class="o">]</span> +</span></pre> <p>Use svg-flatten to convert an SVG file into the given layer of a KiCAD S-Expression (<tt class="docutils literal">.kicad_mod</tt>) file:</p> <pre class="code shell literal-block"> -svg-flatten<span class="whitespace"> </span><span class="operator">[</span>options<span class="operator">]</span><span class="whitespace"> </span>--format<span class="whitespace"> </span>kicad<span class="whitespace"> </span>--sexp-layer<span class="whitespace"> </span>F.SilkS<span class="whitespace"> </span>--sexp-mod-name<span class="whitespace"> </span>My_Module<span class="whitespace"> </span><span class="operator">[</span>input_file.svg<span class="operator">]</span><span class="whitespace"> </span><span class="operator">[</span>output_file<span class="operator">]</span> -</pre> +<span class="lineno"></span><span class="line">svg-flatten<span class="w"> </span><span class="o">[</span>options<span class="o">]</span><span class="w"> </span>--format<span class="w"> </span>kicad<span class="w"> </span>--sexp-layer<span class="w"> </span>F.SilkS<span class="w"> </span>--sexp-mod-name<span class="w"> </span>My_Module<span class="w"> </span><span class="o">[</span>input_file.svg<span class="o">]</span><span class="w"> </span><span class="o">[</span>output_file<span class="o">]</span> +</span></pre> <p>Use svg-flatten to convert an SVG file into a <tt class="docutils literal">.kicad_mod</tt> with SVG layers fed into separate KiCAD layers based on their IDs like the popular <tt class="docutils literal">svg2mod</tt> is doing:</p> <dl class="docutils"> @@ -285,8 +285,8 @@ the layer names KiCAD exposes in the UI (even though most of them match up!).</p </dd> </dl> <pre class="code shell literal-block"> -svg-flatten<span class="whitespace"> </span><span class="operator">[</span>options<span class="operator">]</span><span class="whitespace"> </span>--format<span class="whitespace"> </span>kicad<span class="whitespace"> </span>--sexp-mod-name<span class="whitespace"> </span>My_Module<span class="whitespace"> </span><span class="operator">[</span>input_file.svg<span class="operator">]</span><span class="whitespace"> </span><span class="operator">[</span>output_file<span class="operator">]</span> -</pre> +<span class="lineno"></span><span class="line">svg-flatten<span class="w"> </span><span class="o">[</span>options<span class="o">]</span><span class="w"> </span>--format<span class="w"> </span>kicad<span class="w"> </span>--sexp-mod-name<span class="w"> </span>My_Module<span class="w"> </span><span class="o">[</span>input_file.svg<span class="o">]</span><span class="w"> </span><span class="o">[</span>output_file<span class="o">]</span> +</span></pre> <div class="section" id="gerbolyze-template"> <h3><a class="toc-backref" href="#toc-entry-9"><tt class="docutils literal">gerbolyze template</tt></a></h3> <p>Usage: <tt class="docutils literal">gerbolyze template [OPTIONS] INPUT</tt></p> @@ -364,8 +364,8 @@ halftone primitives all over the place. The subtraction script has cut out an ar existing silkscreen. You can turn off this behavior by passing <tt class="docutils literal"><span class="pre">--no-subtract</span></tt> or pass your own "script".</p> <p>The syntax of these scripts is:</p> <pre class="code literal-block"> -{target layer} -= {source layer} {dilation} [; ...] -</pre> +<span class="lineno"></span><span class="line">{target layer} -= {source layer} {dilation} [; ...] +</span></pre> <p>The target layer must be <tt class="docutils literal"><span class="pre">out.{layer</span> name}</tt> and the source layer <tt class="docutils literal"><span class="pre">in.{layer</span> name}</tt>. The layer names are gerbolyze's internal layer names, i.e.: <tt class="docutils literal">paste, silk, mask, copper, outline, drill</tt></p> <p>The dilation value is optional, but can be a float with a leading <tt class="docutils literal">+</tt> or <tt class="docutils literal">-</tt>. If given, before subtraction the @@ -374,11 +374,11 @@ source layer's features will be extended by that many mm. If not given, the dila <p>Multiple commands can be separated by semicolons <tt class="docutils literal">;</tt> or line breaks.</p> <p>The default subtraction script is:</p> <pre class="code literal-block"> -out.silk -= in.mask -out.silk -= in.silk+0.5 -out.mask -= in.mask+0.5 -out.copper -= in.copper+0.5 -</pre> +<span class="lineno"></span><span class="line">out.silk -= in.mask</span> +<span class="lineno"></span><span class="line">out.silk -= in.silk+0.5</span> +<span class="lineno"></span><span class="line">out.mask -= in.mask+0.5</span> +<span class="lineno"></span><span class="line">out.copper -= in.copper+0.5 +</span></pre> </div> </div> <div class="section" id="svg-flatten-1"> |