polyhedron_3d.inx 6.21 KB
Newer Older
1 2 3 4 5 6 7
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
    <_name>3D Polyhedron</_name>
    <id>math.polyhedron.3d</id>
    <dependency type="executable" location="extensions">polyhedron_3d.py</dependency>
    <dependency type="executable" location="extensions">inkex.py</dependency>
    <param name="tab" type="notebook">
8
        <page name="common" _gui-text="Model file">
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
            <param name="obj" type="enum" _gui-text="Object:">
                <_item value="cube">Cube</_item>
                <_item value="trunc_cube">Truncated Cube</_item>
                <_item value="snub_cube">Snub Cube</_item>
                <_item value="cuboct">Cuboctahedron</_item>
                <_item value="tet">Tetrahedron</_item>
                <_item value="trunc_tet">Truncated Tetrahedron</_item>
                <_item value="oct">Octahedron</_item>
                <_item value="trunc_oct">Truncated Octahedron</_item>
                <_item value="icos">Icosahedron</_item>
                <_item value="trunc_icos">Truncated Icosahedron</_item>
                <_item value="small_triam_icos">Small Triambic Icosahedron</_item>
                <_item value="dodec">Dodecahedron</_item>
                <_item value="trunc_dodec">Truncated Dodecahedron</_item>
                <_item value="snub_dodec">Snub Dodecahedron</_item>
                <_item value="great_dodec">Great Dodecahedron</_item>
                <_item value="great_stel_dodec">Great Stellated Dodecahedron</_item>
                <_item value="from_file">Load from file</_item>
27
                </param>
28 29 30 31
            <param name="spec_file" type="string" _gui-text="Filename:">great_rhombicuboct.obj</param>
            <param name="type" type="enum" _gui-text="Object Type:">
                <_item value="face">Face-Specified</_item>
                <_item value="edge">Edge-Specified</_item></param>
32
            <param name="cw_wound"  type="boolean" _gui-text="Clockwise wound object">0</param>
33 34
         </page>
         <page name="view" _gui-text="View">
35
            <param name="r1_ax" type="optiongroup" appearance="minimal" _gui-text="Rotate around:">
36 37 38
                <_option value="x">X-Axis</_option>
                <_option value="y">Y-Axis</_option>
                <_option value="z">Z-Axis</_option></param>
39
            <param name="r1_ang" type="float" min="-360" max="360" _gui-text="Rotation (deg):">0</param>
40
            <param name="r2_ax" type="optiongroup" appearance="minimal" _gui-text="Then rotate around:">
41 42 43
                <_option value="x">X-Axis</_option>
                <_option value="y">Y-Axis</_option>
                <_option value="z">Z-Axis</_option></param>
44
            <param name="r2_ang" type="float" min="-360" max="360" _gui-text="Rotation (deg):">0</param>
45
            <param name="r3_ax" type="optiongroup" appearance="minimal" _gui-text="Then rotate around:">
46 47 48
                <_option value="x">X-Axis</_option>
                <_option value="y">Y-Axis</_option>
                <_option value="z">Z-Axis</_option></param>
49
            <param name="r3_ang" type="float" min="-360" max="360" _gui-text="Rotation (deg):">0</param>
50
            <param name="r4_ax" type="optiongroup" appearance="minimal" _gui-text="Then rotate around:">
51 52 53
                <_option value="x">X-Axis</_option>
                <_option value="y">Y-Axis</_option>
                <_option value="z">Z-Axis</_option></param>
54
            <param name="r4_ang" type="float" min="-360" max="360" _gui-text="Rotation (deg):">0</param>
55
            <param name="r5_ax" type="optiongroup" appearance="minimal" _gui-text="Then rotate around:">
56 57 58
                <_option value="x">X-Axis</_option>
                <_option value="y">Y-Axis</_option>
                <_option value="z">Z-Axis</_option></param>
59
            <param name="r5_ang" type="float" min="-360" max="360" _gui-text="Rotation (deg):">0</param>
60
            <param name="r6_ax" type="optiongroup" appearance="minimal" _gui-text="Then rotate around:">
61 62 63
                <_option value="x">X-Axis</_option>
                <_option value="y">Y-Axis</_option>
                <_option value="z">Z-Axis</_option></param>
64
            <param name="r6_ang" type="float" min="-360" max="360" _gui-text="Rotation (deg):">0</param>
65 66
        </page>
        <page name="style" _gui-text="Style">
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
            <param name="scl" type="float" min="0" max="10000" _gui-text="Scaling factor:">100</param>
            <param name="f_r" type="int" min="0" max="255" _gui-text="Fill color, Red:">255</param>
            <param name="f_g" type="int" min="0" max="255" _gui-text="Fill color, Green:">0</param>
            <param name="f_b" type="int" min="0" max="255" _gui-text="Fill color, Blue:">0</param>
            <param name="f_opac" type="int" min="0" max="100" _gui-text="Fill opacity (%):">100</param>
            <param name="s_opac" type="int" min="0" max="100" _gui-text="Stroke opacity (%):">100</param>
            <param name="th" type="float" min="0" max="100" _gui-text="Stroke width (px):">2</param>
            <param name="shade" type="boolean" _gui-text="Shading">1</param>
            <param name="lv_x" type="float" min="-100" max="100" _gui-text="Light X:">1</param>
            <param name="lv_y" type="float" min="-100" max="100" _gui-text="Light Y:">1</param>
            <param name="lv_z" type="float" min="-100" max="100" _gui-text="Light Z:">-2</param>
            <param name="show" type="enum" _gui-text="Show:">
                <_item value="fce">Faces</_item>
                <_item value="edg">Edges</_item>
                <_item value="vtx">Vertices</_item>
            </param>
83
            <param name="back"  type="boolean" _gui-text="Draw back-facing polygons">0</param>
84 85 86 87
            <param name="z_sort" type="enum"  _gui-text="Z-sort faces by:">
                <_item value="max">Maximum</_item>
                <_item value="min">Minimum</_item>
                <_item value="mean">Mean</_item></param>
88 89 90 91
        </page>
    </param>
    <effect>
        <object-type>all</object-type>
92 93 94
        <effects-menu>
            <submenu _name="Render"/>
        </effects-menu>
95 96 97 98 99
    </effect>
    <script>
        <command reldir="extensions" interpreter="python">polyhedron_3d.py</command>
    </script>
</inkscape-extension>