Files
inkscape.calibrationDecoupe…/board_photo_import.inx
T
2026-09-27 12:55:02 +02:00

144 lines
9.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Textes source en anglais, traduits par le catalogue « board_photo »
(locale/<langue>/LC_MESSAGES/board_photo.mo), commun aux entrées
de menu. Après toute modification d'un texte : python i18n.py, puis
compléter po/fr.po et relancer.
Les réglages de l'onglet « Work area » doivent rester identiques à ceux
de board_photo_markers.inx (mêmes noms, mêmes défauts).
-->
<inkscape-extension translationdomain="board_photo"
xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Board photo: import and calibrate</name>
<id>fr.alexp.board_photo.import</id>
<param name="tab" type="notebook">
<page name="work_area" gui-text="Work area">
<label appearance="header">Honeycomb = laser work area (mm)</label>
<param name="work_width" type="float" precision="1" min="10" max="5000"
gui-text="Width (mm):">400.0</param>
<param name="work_height" type="float" precision="1" min="10" max="5000"
gui-text="Height (mm):">400.0</param>
<param name="set_page" type="bool"
gui-text="Set the page to the work area size">true</param>
<separator/>
<label appearance="header">Calibration markers</label>
<param name="marker_placement" type="optiongroup" appearance="radio"
gui-text="Marker position:">
<option value="corners">Around the honeycomb: the inner corner of each paper piece touches a corner of the honeycomb</option>
<option value="custom">Custom: centre of the origin marker and spacing below</option>
</param>
<param name="marker_size" type="float" precision="1" min="5" max="200"
gui-text="Marker size (mm):"
gui-description="Side of the black square; the paper piece is twice as large">20.0</param>
<label>Around the honeycomb, everything is deduced: the bottom left corner of the honeycomb is the laser origin (bottom left of the page), and the spacing is the honeycomb size plus twice the marker size. The values below are only used for a custom position.</label>
<param name="origin_x" type="float" precision="2" min="-1000" max="5000"
gui-text="Origin marker centre X (mm):"
gui-description="Distance from the laser origin to the centre of the two-dot marker, along X; negative when the markers are around the work area (left of the origin)">30.0</param>
<param name="origin_y" type="float" precision="2" min="-1000" max="5000"
gui-text="Origin marker centre Y (mm):"
gui-description="Distance from the laser origin to the centre of the two-dot marker, along Y (upwards); negative when the markers are around the work area (below the origin)">30.0</param>
<param name="spacing_x" type="float" precision="2" min="1" max="5000"
gui-text="Spacing between markers X (mm):">340.0</param>
<param name="spacing_y" type="float" precision="2" min="1" max="5000"
gui-text="Spacing between markers Y (mm):">340.0</param>
</page>
<page name="photo" gui-text="Photo">
<param name="photo_source" type="optiongroup" appearance="radio"
gui-text="Photo source:">
<option value="file">Photo file</option>
<option value="remote">Remote camera (capture server)</option>
</param>
<separator/>
<label appearance="header">Photo file</label>
<param name="photo" type="path" mode="file"
filetypes="jpg,jpeg,png,tif,tiff,bmp,webp"
gui-text="Photo of the board:"
gui-description="Photo taken from above, showing the 4 markers"></param>
<separator/>
<label appearance="header">Remote camera</label>
<param name="remote_host" type="string"
gui-text="Address of the remote machine (IP or IP:port):"
gui-description="Machine running the capture server, for example 192.168.1.20"></param>
<param name="remote_port" type="int" min="1" max="65535"
gui-text="Port:">5000</param>
<param name="remote_endpoint" type="optiongroup" appearance="combo"
gui-text="Picture:">
<option value="capture">Take a new photo (/capture)</option>
<option value="old">Use the last photo taken (/old)</option>
</param>
<param name="remote_rotation" type="optiongroup" appearance="combo"
gui-text="Rotation of the picture:"
gui-description="Turns the received picture clockwise, for a camera mounted sideways or upside down">
<option value="0">None (0°)</option>
<option value="90">90° clockwise</option>
<option value="180">180°</option>
<option value="270">270° clockwise (90° anticlockwise)</option>
</param>
<param name="remote_timeout" type="int" min="1" max="300"
gui-text="Timeout (s):">20</param>
<separator/>
<param name="resolution" type="float" precision="1" min="1" max="20"
gui-text="Resolution of the calibrated photo (px/mm):"
gui-description="4 px/mm = 0.25 mm per pixel; higher values make a heavier document">4.0</param>
<param name="jpeg_quality" type="int" min="30" max="100"
gui-text="JPEG quality:">85</param>
</page>
<page name="board" gui-text="Board detection">
<param name="vectorize" type="bool"
gui-text="Vectorize the board outline and holes">true</param>
<param name="board_tone" type="optiongroup" appearance="combo"
gui-text="Board tone:">
<option value="lighter">Lighter than the bed (light wood on honeycomb)</option>
<option value="darker">Darker than the bed (dark board on light surface)</option>
</param>
<param name="threshold" type="int" min="0" max="255"
gui-text="Threshold (0 = automatic):"
gui-description="Grey level between board and bed; 0 computes it automatically (Otsu)">0</param>
<param name="smoothing" type="float" precision="2" min="0" max="10"
gui-text="Smoothing (mm):"
gui-description="Removes specks and fills small notches smaller than about twice this value">0.5</param>
<param name="min_hole_area" type="float" precision="1" min="0" max="10000"
gui-text="Minimum hole area (mm²):"
gui-description="Smaller holes are ignored (filled)">4.0</param>
<param name="simplify" type="float" precision="2" min="0" max="5"
gui-text="Outline tolerance (mm):"
gui-description="Maximum deviation allowed when simplifying the outline">0.3</param>
<param name="outline_color" type="color" appearance="colorbutton"
gui-text="Outline colour:">426885887</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. -->
<image width="675" height="521">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">1. Print the 4 markers (Board photo: print calibration markers, A4 sheet) and stick them at the corners of the honeycomb.
2. Lay the board on the bed and take a photo from above showing the 4 markers.
3. With nothing selected, choose the photo file, or the address of the remote camera (capture server), and apply: the photo is straightened and placed at the exact scale of the work area, with the board outline and holes.
4. Draw or place the shapes in the "Cuts" layer, on the board, then export them with "Export to LaserGRBL".
If the markers are not found, the raw photo is placed with 4 red targets: move them onto the marker centres, select the layer content (Ctrl+A) and apply again.
Markers around the honeycomb (default): stick the 4 printed pieces so that the inner corner of each piece touches a corner of the honeycomb, the two-dot marker at the bottom left. The bottom left corner of the honeycomb is then the laser origin, i.e. the bottom left of the page, as expected by the export to LaserGRBL.
Coordinates are in mm from the laser origin (bottom left of the work area).</label>
</page>
</param>
<effect needs-live-preview="false">
<object-type>all</object-type>
<effects-menu>
<submenu name="AlexDesign"/>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">board_photo_import.py</command>
</script>
</inkscape-extension>