inkscape.circlePacking/circle_packing.inx
2026-10-01 11:57:58 +02:00

79 lines
4.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Textes source en anglais, traduits par le catalogue « circlepacking »
(locale/<langue>/LC_MESSAGES/circlepacking.mo). Après toute modification
d'un texte : python i18n.py, puis compléter po/fr.po et relancer.
-->
<inkscape-extension translationdomain="circlepacking"
xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Circle Packing Fill</name>
<id>fr.alexp.circlepacking</id>
<param name="tab" type="notebook">
<page name="options" gui-text="Circles">
<param name="shape_mode" type="optiongroup" appearance="combo"
gui-text="Placed shape:">
<option value="circle">Circle</option>
<option value="custom">Custom shape (last selected object)</option>
</param>
<param name="min_radius" type="float" precision="3" min="0.001" max="10000"
gui-text="Minimum radius:">1.0</param>
<param name="max_radius" type="float" precision="3" min="0.001" max="10000"
gui-text="Maximum radius:">20.0</param>
<param name="gap" type="float" precision="3" min="0" max="10000"
gui-text="Gap between circles:">0.5</param>
<param name="margin" type="float" precision="3" min="0" max="10000"
gui-text="Inner margin to the outline:">0.5</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>
</page>
<page name="algo" gui-text="Algorithm">
<param name="attempts" type="int" min="1" max="10000000"
gui-text="Number of attempts:">20000</param>
<param name="max_circles" type="int" min="0" max="1000000"
gui-text="Maximum number of circles (0 = unlimited):">5000</param>
<param name="seed" type="int" min="0" max="2147483647"
gui-text="Random seed (0 = random):">0</param>
<param name="flatness" type="float" precision="3" min="0.001" max="10"
gui-text="Curve sampling fineness:">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 (path, rectangle, circle, ellipse, polygon), then run the extension. Inner subpaths are treated as holes (even-odd rule).
The generated circles inherit the style (fill, stroke) of the source shape and are placed in a group, ordered from neighbour to neighbour to shorten the travel of a laser cutter.
Custom shape: paste the shape you want into the document, select the shapes to fill, then add the motif to the selection last (Shift+click). The last selected object is used as the motif and is not filled. Each copy is scaled to fit the computed disc, rotated at random, and keeps the style of the motif.
More attempts give a denser fill but a longer computation.</label>
</page>
</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="AlexDesign"/>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">circle_packing.py</command>
</script>
</inkscape-extension>