added docs to split and break bezier extension
This commit is contained in:
parent
abdc94eb00
commit
d95e0ce262
@ -2,23 +2,52 @@
|
|||||||
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
|
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
|
||||||
<name>Split And Break Bezier At t</name>
|
<name>Split And Break Bezier At t</name>
|
||||||
<id>fablabchemnitz.de.split_and_break_bezier_at_t</id>
|
<id>fablabchemnitz.de.split_and_break_bezier_at_t</id>
|
||||||
<param name="split_select" type="optiongroup" appearance="radio" gui-text="Split by" gui-description="Choose to split by length or percentage">
|
<param name="tab" type="notebook">
|
||||||
<option value="length">length</option>
|
<page name="tab_settings" gui-text="Settings">
|
||||||
<option value="t">percentage (t)</option>
|
<param name="split_select" type="optiongroup" appearance="radio" gui-text="Split by" gui-description="Choose to split by length or percentage">
|
||||||
</param>
|
<option value="length">length</option>
|
||||||
<param name="unit" type="optiongroup" appearance="combo" gui-text="Units">
|
<option value="t">percentage (t)</option>
|
||||||
<option value="mm">mm</option>
|
</param>
|
||||||
<option value="cm">cm</option>
|
<param name="unit" type="optiongroup" appearance="combo" gui-text="Units">
|
||||||
<option value="m">m</option>
|
<option value="mm">mm</option>
|
||||||
<option value="in">in</option>
|
<option value="cm">cm</option>
|
||||||
<option value="pt">pt</option>
|
<option value="m">m</option>
|
||||||
<option value="px">px</option>
|
<option value="in">in</option>
|
||||||
<option value="pc">pc</option>
|
<option value="pt">pt</option>
|
||||||
</param>
|
<option value="px">px</option>
|
||||||
<param name="target_length" type="float" min="0.0" precision="4" gui-text="Length">0.5000</param>
|
<option value="pc">pc</option>
|
||||||
<param name="target_t" type="float" min="0.0000" max="1.0000" precision="4" appearance="full" gui-text="t">0.5000</param>
|
</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.
|
<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>
|
||||||
|
</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>
|
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>
|
<effect>
|
||||||
<object-type>path</object-type>
|
<object-type>path</object-type>
|
||||||
<effects-menu>
|
<effects-menu>
|
||||||
|
@ -1,5 +1,19 @@
|
|||||||
#!/usr/bin/env python3
|
#!/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 copy
|
||||||
import inkex
|
import inkex
|
||||||
from inkex import bezier, CubicSuperPath, PathElement, Path
|
from inkex import bezier, CubicSuperPath, PathElement, Path
|
||||||
@ -38,6 +52,7 @@ class SplitAndBreakBezierAtT(inkex.EffectExtension):
|
|||||||
return breakelements
|
return breakelements
|
||||||
|
|
||||||
def add_arguments(self, pars):
|
def add_arguments(self, pars):
|
||||||
|
pars.add_argument('--tab')
|
||||||
pars.add_argument('--split_select', default="t")
|
pars.add_argument('--split_select', default="t")
|
||||||
pars.add_argument('--unit', default="mm")
|
pars.add_argument('--unit', default="mm")
|
||||||
pars.add_argument('--target_length', type=float, default=0.5)
|
pars.add_argument('--target_length', type=float, default=0.5)
|
||||||
|
Reference in New Issue
Block a user