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-0.92-deprecated/fablabchemnitz_flat_projection.inx
2019-11-14 20:05:10 +01:00

117 lines
8.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<!-- Syntax see: http://wiki.inkscape.org/wiki/index.php/INX_Parameters -->
<name>Flat Projection</name>
<id>fablabchemnitz.de.flat_projection</id>
<dependency type="extension">org.inkscape.output.svg.inkscape</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<dependency type="executable" location="extensions">fablabchemnitz_flat_projection.py</dependency>
<param name="tab" type="notebook">
<page name="view" gui-text="View">
<param name="settings_what" type="description" xml:space="preserve">Flat-projection rotates an object into 3D space, then projects it back on the 2D plane.</param>
<param name="header_cut" type="description" appearance="header">Optionally rotate before projection</param>
<param name="spacer" type="description"> </param>
<param name="depth" type="float" min="0" max="1000" gui-text="Depth ('z-size') [mm]">3.2</param>
<param name="spacer" type="description"> </param>
<param name="rotation_type" type="notebook">
<page name="standard_rotation" gui-text="Standard Rotation">
<param name="standard_rotation" type="enum" gui-text="">
<item value="none">None (front)</item>
<item value="x-90">X-Axis: -90° (top)</item>
<item value="x+90">X-Axis: +90° (bottom)</item>
<item value="y-90">Y-Axis: -90° (right)</item>
<item value="y+90">Y-Axis: +90° (left)</item>
<item value="y+180">Y-Axis: +180° (back)</item>
</param>
<param name="spacer" type="description"> </param>
<param name="spacer" type="description"> </param>
<param name="standard_rotation_extra" type="string" gui-text="Additional rotations:">X:0; Y:0; Z:0</param>
</page>
<page name="manual_rotation" gui-text="Free Rotation">
<param name="manual_rotation_x" type="float" min="-360" max="360" appearance="full" gui-text="X-Axis [°]: ">90</param>
<param name="manual_rotation_y" type="float" min="-360" max="360" appearance="full" gui-text="Y-Axis [°]: ">0</param>
<param name="manual_rotation_z" type="float" min="-360" max="360" appearance="full" gui-text="Z-Axis [°]: ">0</param>
<param name="manual_rotation_extra" type="string" gui-text="Additional rotations:">X:0; Y:0; Z:0</param>
</page>
</param>
<param name="spacer" type="description"> </param>
<param name="header_cut" type="description" appearance="header">Projection</param>
<param name="projection_type" type="notebook">
<page name="standard_projection" gui-text="ISO Standard">
<param name="standard_projection" type="enum" gui-text="">
<item value="42,7">Dimetric left: 42°, 7°</item>
<item value="7,42">Dimetric right: 7°, 42°</item>
<item value="30,30">Isometric right: 30°, 30°</item>
<item value="30,30l">Isometric left: 30°, 30°</item>
</param>
<param name="spacer" type="description"> </param>
<param name="standard_projection_autoscale" type="boolean" gui-text="preserve scale 1:1">true</param>
<param name="standard_projection_autoscale_help" type="description">Projecting a 3D object back onto a 2D plane usually shortens apparent lengths. With dimetric and isometric projections this can be compensated to preserve scale. (The z-axis in dimetric projection has scale 0.5)</param>
</page>
<page name="trimetric_projection" gui-text="Free Trimetric">
<param name="trimetric_projection_y" type="float" min="-180" max="180" appearance="full" gui-text="Rotate Y [°]: ">22.1</param>
<param name="trimetric_projection_x" type="float" min="-180" max="180" appearance="full" gui-text="Rotate X [°]: ">19.4</param>
<param name="trimetric_projection_help" type="description">We first apply Y-axis, then X-axis rotation.
Examples: For Dimetric use y=22.1°; x=19.4° -- for Isometric use y=45°; x=35.26439°.</param>
</page>
</param>
</page>
<page name="colors" gui-text="Colors">
<param name="apply_depth" type="enum" gui-text="Apply depth to:">
<item value="red">stroke color red</item>
<item value="red_black">stroke color red or black</item>
<item value="green">stroke color green</item>
<item value="green_blue">stroke color green or blue</item>
<item value="not_red">any stroke color except red</item>
<item value="not_red_black">any stroke color except red or black</item>
<item value="not_green">any stroke color except green</item>
<item value="not_green_blue">any stroke color except green or blue</item>
<item value="any">any stroke color</item>
<item value="none">nothing</item>
</param>
<param name="spacer" type="description"> </param>
<param name="shading" type="float" min="0" max="100" gui-text="Flat shading [%]">10</param>
<param name="shading_help" type="description">Compute lightness change of surfaces. Surfaces with a normal at 90° with the ray direction are unaffected. 100% colors a face white, when its normal is the ray direction, and black when it is opposite. Use 0 to disable shading.</param>
<param name="ray_direction" type="string" gui-text="Direction of the light source [x,y,z]">1,-2,-1</param>
</page>
<page name="advanced" gui-text="Advanced">
<param name="spacer" type="description"> </param>
<param name="stroke_width" type="string" gui-text="Override stroke-width [mm]">0.1</param>
<param name="stroke_width_help" type="description">Enforce a uniform stroke-width on generated objects. Enter '=' to use the stroke-widths as computed by inksvg.py -- (sometimes wrong!)</param>
<param name="spacer" type="description"> </param>
<param name="dest_layer" gui-hidden="false" type="string" gui-text="Destination layer name">3d-proj</param>
<param name="spacer" type="description"> </param>
<param name="smoothness" type="float" min="0.0001" max="5" gui-text="Smoothing">0.2</param>
<param name="smoothness_help" type="description">Used when rendering curves. Smaller values are smoother. Range: 0.0001 to 5</param>
<param name="spacer" type="description"> </param>
<param name="with_front" type="boolean" gui-text="Render front wall">true</param>
<param name="with_front_desc" type="description">Almost always on. Remove e.g. to show a hollow shell.</param>
<param name="with_sides" type="boolean" gui-text="Render side walls">true</param>
<param name="with_sides_desc" type="description">Render perimeter faces. May take awhile for complex shapes.</param>
<param name="with_back" type="boolean" gui-text="Render back wall">true</param>
<param name="with_back_desc" type="description">Disabling both side walls and back walls is the same as applying depth==0.0</param>
</page>
<page name="about" gui-text="About ">
<param name="about_what" type="description" xml:space="preserve">The flat-projection extension transforms paths to create the illusion of a 3D projection. This can be used to visualize how (e.g. lasercut) parts are assembled into three-dimensional objects.
</param>
<param name="about_who" type="description" xml:space="preserve">From https://github.com/jnweiger/inkscape-flat-projection
(C) 2019 by Jürgen Weigert [juergen@fabmail.org]
</param>
<!-- Keep in sync with src/flatproj.py line 110 __version__ = ... -->
<param name="about_version" type="description">Version 0.9.5</param>
</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 reldir="extensions" interpreter="python">fablabchemnitz_flat_projection.py</command>
</script>
</inkscape-extension>