added docs to split and break bezier extension

This commit is contained in:
Mario Voigt 2021-06-02 20:14:08 +02:00
parent abdc94eb00
commit d95e0ce262
2 changed files with 60 additions and 16 deletions

View File

@ -2,6 +2,8 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Split And Break Bezier At t</name>
<id>fablabchemnitz.de.split_and_break_bezier_at_t</id>
<param name="tab" type="notebook">
<page name="tab_settings" gui-text="Settings">
<param name="split_select" type="optiongroup" appearance="radio" gui-text="Split by" gui-description="Choose to split by length or percentage">
<option value="length">length</option>
<option value="t">percentage (t)</option>
@ -17,8 +19,35 @@
</param>
<param name="target_length" type="float" min="0.0" precision="4" gui-text="Length">0.5000</param>
<param name="target_t" type="float" min="0.0000" max="1.0000" precision="4" appearance="full" gui-text="t">0.5000</param>
<label xml:space="preserve">Splits a path at value t=0..1 (t=0.5 means 50%) or at a defined length with unit.
</page>
<page name="tab_about" gui-text="About">
<label appearance="header">Split And Break Bezier At t</label>
<label>Splits a path at value t=0..1 (t=0.5 means 50%) or at a defined length with unit.
Applies independently for each sub path in selection. Use 'Path > Reverse' to change the cutting direction.</label>
<label>2021 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label>
<spacer/>
<label appearance="header">Online Documentation</label>
<label appearance="url">https://y.stadtfabrikanten.org/splitandbreakbezieratt</label>
<spacer/>
<label appearance="header">Contributing</label>
<label appearance="url">https://gitea.fablabchemnitz.de/MarioVoigt/mightyscape-1.X</label>
<label appearance="url">mailto:mario.voigt@stadtfabrikanten.org</label>
<spacer/>
<label appearance="header">MightyScape Extension Collection</label>
<label>This piece of software is part of the MightyScape for Inkscape Extension Collection and is licensed under GNU GPL v3</label>
<label appearance="url">https://y.stadtfabrikanten.org/mightyscape-overview</label>
</page>
<page name="tab_donate" gui-text="Donate">
<label appearance="header">Coffee + Pizza</label>
<label>We are the Stadtfabrikanten, running the FabLab Chemnitz since 2016. A FabLab is an open workshop that gives people access to machines and digital tools like 3D printers, laser cutters and CNC milling machines.</label>
<spacer/>
<label>You like our work and want to support us? You can donate to our non-profit organization by different ways:</label>
<label appearance="url">https://y.stadtfabrikanten.org/donate</label>
<spacer/>
<label>Thanks for using our extension and helping us!</label>
<image>../000_about_fablabchemnitz.svg</image>
</page>
</param>
<effect>
<object-type>path</object-type>
<effects-menu>

View File

@ -1,5 +1,19 @@
#!/usr/bin/env python3
"""
Extension for InkScape 1.0
Author: Mario Voigt / FabLab Chemnitz
Mail: mario.voigt@stadtfabrikanten.org
Date: 01.06.2021
Last patch: 02.06.2021
License: GNU GPL v3
Splits a path at value t=0..1 (t=0.5 means 50%) or at a defined length with unit.
Applies independently for each sub path in selection. Use 'Path > Reverse' to change the cutting direction.
"""
import copy
import inkex
from inkex import bezier, CubicSuperPath, PathElement, Path
@ -38,6 +52,7 @@ class SplitAndBreakBezierAtT(inkex.EffectExtension):
return breakelements
def add_arguments(self, pars):
pars.add_argument('--tab')
pars.add_argument('--split_select', default="t")
pars.add_argument('--unit', default="mm")
pars.add_argument('--target_length', type=float, default=0.5)