inkscape.decoupeFlexible/living_hinge.inx
2026-10-01 15:21:24 +02:00

98 lines
5.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Textes source en anglais, traduits par le catalogue « livinghinge »
(locale/<langue>/LC_MESSAGES/livinghinge.mo). Après toute modification
d'un texte : python i18n.py, puis compléter po/fr.po et relancer.
-->
<inkscape-extension translationdomain="livinghinge"
xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Living Hinge Fill</name>
<id>fr.alexp.livinghinge</id>
<param name="tab" type="notebook">
<page name="pattern" gui-text="Pattern">
<param name="slot_length" type="float" precision="3" min="0.01" max="10000"
gui-text="Slot length:">20.0</param>
<param name="slot_width" type="float" precision="3" min="0.01" max="1000"
gui-text="Slot width:">3.0</param>
<param name="bridge" type="float" precision="3" min="0" max="10000"
gui-text="Bridge (material between two slots of a column):">2.0</param>
<param name="pitch" type="float" precision="3" min="0.01" max="10000"
gui-text="Column pitch (centre to centre):">5.0</param>
<param name="unit" type="optiongroup" appearance="combo" gui-text="Unit:">
<!-- Les unités ne se traduisent pas -->
<option translatable="no" value="mm">mm</option>
<option translatable="no" value="cm">cm</option>
<option translatable="no" value="px">px</option>
<option translatable="no" value="pt">pt</option>
<option translatable="no" value="in">in</option>
</param>
<separator/>
<param name="stagger" type="float" precision="1" min="0" max="100"
gui-text="Stagger of odd columns (% of length + bridge):"
gui-description="50 % gives the classic staggered living hinge; 0 % aligns all the columns.">50.0</param>
<param name="angle" type="float" precision="1" min="-180" max="180"
gui-text="Pattern angle (°, 0 = vertical slots):"
gui-description="The panel bends around an axis parallel to the slots.">0.0</param>
</page>
<page name="random" gui-text="Random">
<param name="random_lengths" type="bool"
gui-text="Random slot lengths">false</param>
<param name="random_min" type="float" precision="3" min="0" max="10000"
gui-text="Shortest random slot:"
gui-description="Never less than the slot width, which gives a round hole.">3.0</param>
<param name="seed" type="int" min="0" max="999999"
gui-text="Random seed:"
gui-description="Same seed, same pattern; change it to draw another one.">1</param>
<separator/>
<label>Each slot gets a random length between this shortest value and the slot length of the "Pattern" tab. Every column is filled from margin to margin: a slot starts right at the top and another ends right at the bottom, so all columns begin and end at the same level. Bridge and column pitch stay constant; the stagger and the minimum length of a shortened slot are not used.</label>
</page>
<page name="fill" gui-text="Fill">
<param name="margin" type="float" precision="3" min="0" max="10000"
gui-text="Margin between the slots and the edge:">2.0</param>
<param name="min_length" type="float" precision="3" min="0" max="10000"
gui-text="Minimum length of a shortened slot:"
gui-description="Slots cut short by the edge are dropped below this length.">6.0</param>
<separator/>
<param name="stroke_color" type="color" appearance="colorbutton"
gui-text="Stroke color:">255</param>
<param name="stroke_width" type="float" precision="3" min="0.001" max="100"
gui-text="Stroke width:">0.2</param>
<param name="keep_original" type="bool"
gui-text="Keep the original shape">true</param>
</page>
<page name="help" gui-text="Help">
<!-- Schéma généré par docs/schema_parametres.py, en anglais :
Inkscape ne traduit pas le chemin d'une image. Affiché aux
3/4 du PNG (900 px) pour limiter la hauteur de l'onglet. -->
<image width="675" height="617">images/parameters_en.png</image>
<separator/>
<!-- Un paragraphe par ligne : Inkscape le replie à la largeur de
l'onglet ; des retours à la ligne forcés le laisseraient étroit. -->
<label xml:space="preserve">Select one or more closed shapes (rectangles, ellipses, paths, even with holes, or groups of them), then run the extension. Texts, images and clones are ignored.
Each shape is filled with oblong slots arranged in staggered columns: once cut, the panel bends around an axis parallel to the slots. Longer slots, thinner bridges and a tighter column pitch make it more flexible, and more fragile.
Near the edge and around holes, slots are shortened and rounded again so that they stay at the margin; those that would become shorter than the minimum length are dropped. The pattern is centred on each shape.
In the "Random" tab, slots can take random lengths, from a round hole to the full slot length, for a more organic look.
The slots are drawn as a single path, in a group named "Living hinge" placed just above the shape. All lengths use the unit chosen in the "Pattern" tab.</label>
</page>
</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="AlexDesign"/>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">living_hinge.py</command>
</script>
</inkscape-extension>