This repository has been archived on 2023-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
mightyscape-1.1-deprecated/extensions/fablabchemnitz/scale_to_real/scale_to_real.inx

89 lines
5.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Scale To Real</name>
<id>fablabchemnitz.de.scale_to_real</id>
<param name="tab" type="notebook">
<page name="realscale" gui-text="RealScale">
<label appearance="header">Measurement</label>
<param name="length" type="float" min="0.1" max="100000.0" precision="3" gui-text="Length of scaling path:" gui-description="Real-world length of the scaling path">100.0</param>
<param name="unit" type="optiongroup" appearance="combo" gui-text="Unit: " gui-description="Real-world unit for drawing">
<option value="px">px</option>
<option value="pc">pc</option>
<option value="pt">pt</option>
<option value="in">in</option>
<option value="mm">mm</option>
<option value="cm">cm</option>
</param>
<label appearance="header">Scale Drawing</label>
<param name="choosescale" gui-text="Scale Category" gui-description="Select which kind of scaling you would like to use, then select the actual scale in the corresponding dropdown." type="optiongroup" appearance="combo">
<option value="metric">Metric</option>
<option value="imperial">Imperial</option>
<option value="custom">Custom</option>
</param>
<param name="metric" type="optiongroup" appearance="combo" gui-text="Metric Scale:" gui-description="Metric scales for drawings">
<option value="1">1:1</option>
<option value="2">1:2</option>
<option value="5">1:5</option>
<option value="10">1:10</option>
<option value="20">1:20</option>
<option value="25">1:25</option>
<option value="50">1:50</option>
<option value="100">1:100</option>
<option value="200">1:200</option>
<option value="250">1:250</option>
<option value="500">1:500</option>
<option value="1000">1:1000</option>
<option value="1250">1:1250</option>
<option value="2500">1:2500</option>
</param>
<param name="imperial" type="optiongroup" appearance="combo" gui-text="Imperial Scale:" gui-description="Imperial scales for drawings">
<option value="1">1:1</option>
<option value="2">1:2</option>
<option value="4">1:4</option>
<option value="8">1:8</option>
<option value="16">1:16</option>
<option value="24">1:24</option>
<option value="32">1:32</option>
<option value="48">1:48</option>
<option value="64">1:64</option>
<option value="96">1:96</option>
<option value="128">1:128</option>
</param>
<param name="custom_scale" type="float" min="0.00001" max="2000000" gui-text="Custom Scale Value (1: value)" precision="5" gui-description="Enter a custom drawing scale factor. Enlarge your drawing by entering a value smaller than 1.">45</param>
<label appearance="header">Scale Rule</label>
<param name="showscale" type="bool" gui-text="Generate Scale Rule" gui-description="Draw the scale rule on the page">true</param>
<param name="unitlength" type="optiongroup" appearance="combo" gui-text="Half scale length" gui-description="Number of units in one half of scale rule">
<option value="1">1</option>
<option value="10">10</option>
<option value="100">100</option>
</param>
</page>
<page name="help" gui-text="Help">
<label appearance="header">Usage</label>
<label xml:space="preserve">Scale an object (or a group) by indicating the length of a scaling path in real-life units (useful for scaling architectural drawings, for example):
• Create a straight two-point line of known length by drawing on the object you want to scale (e.g. if you know how long a wall is in your drawing, draw the line from one end of the wall to the other).
• Select the line first, then the drawing (which must be a group or a single object).
• Length: indicate how long the line you drew is in the real world (e.g. how long the wall is).
• Unit: indicate the unit the measurement is in, but remember that your drawing can become huge if you choose km or even m. Fix this with "Scale Drawing".
• Scale Drawing: Select a scale category, then a value other than 1:1 from the dropdown for the selected scale category to scale the drawing. For upscaling, select "Custom" and enter a custom value smaller than 1.
• Scale Rule: You can display the scale with a ruler. The number of units used along the ruler can be selected (e.g. to make the ruler show marks for one, ten or one hundred centimeters).</label>
</page>
</param>
<effect needs-live-preview="true">
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Modify existing Path(s)"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">scale_to_real.py</command>
</script>
</inkscape-extension>