2020-07-30 01:16:18 +02:00
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
2020-08-07 20:19:46 +02:00
<name>Paths to OpenSCAD</name>
2020-07-30 01:16:18 +02:00
<id>fablabchemnitz.de.paths2openscad</id>
<param name="tab" type="notebook">
2020-08-07 20:19:46 +02:00
<page name="splash" gui-text="Paths to OpenSCAD">
2021-04-27 14:38:04 +02:00
<param type="path" name="fname" gui-text="Ausgabedatei" mode="file_new" filetypes="scad">{NAME}.scad</param>
<label>Use '{NAME}.scad' here to use the name from svg.</label>
2020-08-07 20:19:46 +02:00
<param name="zsize" type="float" min="0" max="1000" precision="2" gui-text="Depth (Z) [mm]">5.0</param>
2021-04-27 14:38:04 +02:00
<label>Default 3D extrude depth (when no zsize is parsed from an svg object).</label>
2020-08-07 20:19:46 +02:00
<param name="parsedesc" type="bool" gui-text="Description parsing">true</param>
2021-04-27 14:38:04 +02:00
<label>Read the extruded zsize, zoffset, scale per svg object from its description or ID. See the Extrusion Syntax tab for details.</label>
<spacer/>
2020-08-07 20:19:46 +02:00
<param name="scadview" type="bool" gui-text="View in OpenSCAD">false</param>
2021-04-27 14:38:04 +02:00
<label>Start OpenSCAD to view the 3D-model.</label>
<spacer/>
2020-08-07 20:19:46 +02:00
<param name="scad2stl" type="bool" gui-text="Convert to STL">false</param>
2021-04-27 14:38:04 +02:00
<label>Also save an .stl file next to the specified output file.</label>
<spacer/>
2020-08-07 20:19:46 +02:00
<param name="stlpost" type="bool" gui-text="STL postprocessing">false</param>
2021-04-27 14:38:04 +02:00
<label>Start e.g. a slicer after converting to STL. See the Commands tab for details.</label>
2020-08-07 20:19:46 +02:00
<param name="stlmodule" type="bool" gui-text="Only create a module">false</param>
2021-04-27 14:38:04 +02:00
<spacer/>
2020-07-30 01:16:18 +02:00
</page>
2020-08-07 20:19:46 +02:00
<page name="tuning" gui-text="Tuning">
<param name="smoothness" type="float" min="0.0001" max="5" precision="4" gui-text="Smoothing">0.2</param>
2021-04-27 14:38:04 +02:00
<label>Used when rendering curves. Smaller values are smoother. Range: 0.0001 to 5</label>
<param type="float" name="chamfer" min="0.0" gui-text="Add chamfer radius [mm]">0</param>
2020-08-07 20:19:46 +02:00
<param name="chamfer_fn" type="optiongroup" appearance="combo" gui-text="Chamfer präzision ($fn)">
2020-07-30 01:16:18 +02:00
<option value="4">4: Rough (fast)</option>
<option value="12">12: Medium (slow)</option>
<option value="16">16: Fine (slower)</option>
<option value="32">32: Perfekt (slowest)</option>
</param>
2021-04-27 14:38:04 +02:00
<label appearance="header">Outline Mode</label>
<label xml:space="preserve">Objects are extruded into 3D either in normal mode, or in outline mode. Normally filled areas are extruded, ignoring the line width. Objects with no fill are rendered in outline mode.
2020-07-30 01:16:18 +02:00
2021-04-27 14:38:04 +02:00
Note: the 'Scale: XX %' instruction has no effect in outline mode.</label>
2020-08-07 20:19:46 +02:00
<param name="min_line_width" type="float" min="0.1" max="10" gui-text="Minimum line width [mm]">1.0</param>
2020-07-30 01:16:18 +02:00
<param type="float" name="line_width_scale_perc" min="1" max="10000" gui-text="Scale line width [%]">100.0</param>
2020-08-07 20:19:46 +02:00
<param name="line_fn" type="optiongroup" appearance="combo" gui-text="Line width precision ($fn)">
2020-07-30 01:16:18 +02:00
<option value="4">4: Rough (fast)</option>
<option value="8">8: Medium (slow)</option>
<option value="16">16: Fine (slower)</option>
<option value="32">32: Perfekt (slowest)</option>
</param>
2020-08-07 20:19:46 +02:00
<param name="force_line" type="bool" gui-text="Force outline mode, ignore fill">false</param>
2021-04-27 14:38:04 +02:00
<spacer/>
2020-07-30 01:16:18 +02:00
</page>
2020-08-07 20:19:46 +02:00
<page name="commands" gui-text="Commands">
2021-04-27 14:38:04 +02:00
<label>Placeholders: You can use '{NAME}.scad' for the OpenSCAD file to read as specified as 'Output file' in the main tab. You can use '{NAME}.stl' for an STL file to write.</label>
<label>Beware, Windows and Mac users: The shipped defaults are for Linux.</label>
<label>Mac: /Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD</label>
<spacer/>
2020-07-30 01:16:18 +02:00
<!-- CAUTION: keep this command in sync with the default INX_SCADVIEW in paths2openscad.py -->
2020-08-07 20:19:46 +02:00
<param name="scadviewcmd" type="string" gui-text="View in OpenSCAD: ">openscad '{NAME}.scad'</param>
2021-04-27 14:38:04 +02:00
<label>Is only started, if no command of the same name is running. Always started non-blocking. A running OpenSCAD automatically picks up changed file contents. Defaults:</label>
<label>Linux: openscad '{NAME}.scad'</label>
<spacer/>
2020-07-30 01:16:18 +02:00
<!-- CAUTION: keep this command in sync with the default INX_SCAD2STL in paths2openscad.py -->
2020-08-07 20:19:46 +02:00
<param name="scad2stlcmd" type="string" gui-text="Convert to STL: ">openscad '{NAME}.scad' -o '{NAME}.stl'</param>
2021-04-27 14:38:04 +02:00
<label>Automatically run, when STL postprocessing is requested.</label>
<spacer/>
2020-07-30 01:16:18 +02:00
<!-- CAUTION: keep this command in sync with the default INX_STL_POSTPROCESSING in paths2openscad.py -->
2020-08-07 20:19:46 +02:00
<param name="stlpostcmd" type="string" gui-text="STL postprocessing: ">cura '{NAME}.stl' &</param>
2021-04-27 14:38:04 +02:00
<label>Append an '&' for non-blocking.</label>
<spacer/>
2020-07-30 01:16:18 +02:00
</page>
2020-08-07 20:19:46 +02:00
<page name="extrusion" gui-text="Extrusion Syntax">
2021-04-27 14:38:04 +02:00
<label xml:space="preserve">The depth (Z-Axis) and other parameters can be defined through an svg object's description. The menu 'Object->Object Properties ...' (Shift-Ctrl-O) shows details of one selected object.
2020-07-30 01:16:18 +02:00
If an object's ID is in either name_XXX_mm or name_XXXmm
format, then XXX is translated into zsize in millimeters.
Use . or _ as separator for a decimal number.
Note that all whitespace or comma are saved as '_' in ID.
2021-04-27 14:38:04 +02:00
</label>
<label appearance="header">Syntax for the object property description</label>
<label xml:space="preserve">Depth: 10 mm
2020-07-30 01:16:18 +02:00
Linear extrusion length (or Z-Size)) of the object.
Antimatter: true
Object is part of the difference set, which is
cut away from all other objects.
Offset: 4.5 mm
Move an object upwards to create a balcony (or window).
Taper: 90 % or Taper: 120,60 %
Scale the object along its Z-axis. The bottom surface always
is as drawn, but the top surface is scaled to this value.
If two values are given (separated by Komma), different
scaling applies along X- and Y-axis.
2021-04-27 14:38:04 +02:00
Parameters in the objects take precedence over groups.</label>
2020-07-30 01:16:18 +02:00
</page>
2020-08-07 20:19:46 +02:00
<page name="info" gui-text="About ...">
2021-04-27 14:38:04 +02:00
<label xml:space="preserve">
2020-07-30 01:16:18 +02:00
This extension converts Inkscape paths to
extruded polygons in OpenSCAD. Before
using, some objects must firat be converted to paths
with the "Path > Object to Path" menu item.
Inkscape's units of pixels are converted
to millimeters using the SVG standard's
definition of 96 px = 1 inch = 25.4 mm.
(Before inkscape 0.92 the standard was 90 px per inch,
Adobe products often use 75 px per inch)
v0.25
Dan Newman (dan newman @ mtbaldy us)
Josef Skladanka (jskladan @ redhat com)
Juergen Weigert (juergen @ fabmail org)
Find updates at https://github.com/fablabnbg/inkscape-paths2openscad/releases
<!-- keep the version numnber in sync with paths2openscad.py header comments and translated copies -->
2021-04-27 14:38:04 +02:00
</label>
2020-07-30 01:16:18 +02:00
</page>
</param>
<effect needs-live-preview="false">
<object-type>all</object-type>
<effects-menu>
2020-08-07 20:19:46 +02:00
<submenu name="FabLab Chemnitz">
<submenu name="Import/Export/Transfer"/>
2020-07-30 01:16:18 +02:00
</submenu>
</effects-menu>
</effect>
<script>
2020-09-03 00:35:27 +02:00
<command location="inx" interpreter="python">paths2openscad.py</command>
2020-07-30 01:16:18 +02:00
</script>
</inkscape-extension>