Commits

Manfred Moitzi  committed b5860eb

added SmartPart WavyBox

  • Participants
  • Parent commits 37e3d3d

Comments (0)

Files changed (9)

File .idea/workspace.xml

 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="d10fe02a-bdc8-4418-9494-70adbe7601f3" name="Default" comment="">
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/WavyBox.smt" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/WavyBox.ini" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/WavyBox.Part2D.mako" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/WavyBox.Part3D.mako" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/WavyBox.PartDialog.mako" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/WavyBox.PartParameter.mako" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/vectors2.mako" afterPath="$PROJECT_DIR$/lib/vectors2.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/vectors3.mako" afterPath="$PROJECT_DIR$/lib/vectors3.mako" />
     </list>
     <ignored path="mako2smt.iws" />
     <ignored path=".idea/workspace.xml" />
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="basic.mako" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/lib/basic.mako">
+      <file leaf-file-name="WavyBox.Part3D.mako" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/scripts/WavyBox.Part3D.mako">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.5715706">
+            <state line="119" column="0" selection-start="2693" selection-end="2693" vertical-scroll-proportion="-35.48">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="WavyBox.PartDialog.mako" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/scripts/WavyBox.PartDialog.mako">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="43" column="0" selection-start="1329" selection-end="1329" vertical-scroll-proportion="0.72664016">
               <folding />
             </state>
           </provider>
   <component name="IdeDocumentHistory">
     <option name="changedFiles">
       <list>
-        <option value="$PROJECT_DIR$/ibeams/scripts/I.data.mako" />
-        <option value="$PROJECT_DIR$/ibeams/scripts/I.Part3D.mako" />
-        <option value="$PROJECT_DIR$/ibeams/scripts/I.PartDialog.mako" />
-        <option value="$PROJECT_DIR$/ibeams/scripts/I.PartParameter.mako" />
-        <option value="$PROJECT_DIR$/ibeams/scripts/IPE.data.mako" />
-        <option value="$PROJECT_DIR$/ibeams/scripts/IPE.Part3D.mako" />
-        <option value="$PROJECT_DIR$/ibeams/scripts/IPE.PartDialog.mako" />
-        <option value="$PROJECT_DIR$/ibeams/scripts/IPE.PartParameter.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-A.data.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-A.Part3D.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-A.PartDialog.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-B.Part3D.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-B.PartDialog.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-B.PartParameter.mako" />
+        <option value="$PROJECT_DIR$/lib/vectors2.mako" />
+        <option value="$PROJECT_DIR$/lib/vectors3.mako" />
+        <option value="$PROJECT_DIR$/scripts/BoxWithWavyTop.Part3D.mako" />
+        <option value="$PROJECT_DIR$/scripts/BoxWithWavyTop.PartDialog.mako" />
+        <option value="$PROJECT_DIR$/scripts/BoxWithWavyTop.PartParameter.mako" />
+        <option value="$PROJECT_DIR$/scripts/WavyBox.Part3D.mako" />
+        <option value="$PROJECT_DIR$/scripts/WavyBox.PartParameter.mako" />
+        <option value="$PROJECT_DIR$/scripts/WavyBox.PartDialog.mako" />
       </list>
     </option>
   </component>
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
           </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="mako2smt" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="mako2smt" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="scripts" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="mako2smt" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="mako2smt" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lib" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
         </subPane>
       </pane>
       <pane id="Scope" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_treeWidth3" value="952" />
     <property name="restartRequiresConfirmation" value="true" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_treeOrder3" value="3" />
+    <property name="options.searchVisible" value="true" />
     <property name="options.splitter.details.proportions" value="0.2" />
-    <property name="options.searchVisible" value="true" />
   </component>
   <component name="PyConsoleOptionsProvider">
     <option name="myPythonConsoleState">
     <frame x="-8" y="-8" width="1874" height="1216" extended-state="6" />
     <editor active="false" />
     <layout>
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32954547" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Structure" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2218543" sideWeight="0.67045456" order="4" side_tool="true" content_ui="tabs" />
-      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2665563" sideWeight="0.67045456" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2831126" sideWeight="0.67045456" order="0" side_tool="false" content_ui="combo" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39962122" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32954547" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32954547" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
     </breakpoint-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-M.Part3D.mako">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-M.data.mako">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-B.PartParameter.mako">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-B.PartDialog.mako">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-B.Part3D.mako">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0">
-          <folding />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-B.data.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0">
-          <folding />
-        </state>
+        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-A.PartParameter.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0">
-          <folding />
-        </state>
+        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-A.PartDialog.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0">
-          <folding />
-        </state>
+        <state line="0" column="4" selection-start="4" selection-end="4" vertical-scroll-proportion="-0.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/Klothoide.PartParameter.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/Klothoide.Part2D.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/CAVIC2.PartParameter.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/CAVIC2.PartDialog.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/CAVIC2.Part2D.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/clothoid.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/basic.mako">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/vectors2.mako">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="42" column="40" selection-start="965" selection-end="965" vertical-scroll-proportion="-28.56" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/vectors3.mako">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="47" column="40" selection-start="1121" selection-end="1121" vertical-scroll-proportion="-28.0" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-A.Part3D.mako">
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/basic.mako">
+    <entry file="file://$PROJECT_DIR$/scripts/WavyBox.Part3D.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.5715706">
+        <state line="119" column="0" selection-start="2693" selection-end="2693" vertical-scroll-proportion="-35.48">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/scripts/WavyBox.PartParameter.mako">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="9" column="29" selection-start="211" selection-end="211" vertical-scroll-proportion="0.15208748">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/scripts/WavyBox.PartDialog.mako">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="43" column="0" selection-start="1329" selection-end="1329" vertical-scroll-proportion="0.72664016">
           <folding />
         </state>
       </provider>
+[Parts]
+PartParameter = WavyBox.PartParameter.mako
+Part3D = WavyBox.Part3D.mako
+Part2D = WavyBox.Part2D.mako
+PartDialog = WavyBox.PartDialog.mako
+
+<?xml version="1.0" encoding="UTF-8"?>
+<ScriptObject><Version>1.0</Version>
+<ScriptVersion>1.0</ScriptVersion>
+<Name><![CDATA[WavyBox]]></Name>
+<LibPath><![CDATA[]]></LibPath>
+<Type>1</Type>
+<SubType>0</SubType>
+<UUID>599f992b-ae0d-462d-b073-333559fc2743</UUID>
+<Language>de</Language>
+<StringTable>
+</StringTable>
+<RelativeOrigin>0.5000000000000000 0.5000000000000000 0.5000000000000000</RelativeOrigin>
+<AbsoluteOrigin>0.0000000000000000 0.0000000000000000 0.0000000000000000</AbsoluteOrigin>
+<SeparateExecParts>1</SeparateExecParts>
+<Group>0</Group>
+<AutoPlaceResourceObjects>1</AutoPlaceResourceObjects>
+<AutoReferenceBox>0</AutoReferenceBox>
+<Scale>1</Scale>
+<Use3DPreview>0</Use3DPreview>
+<Link>0</Link>
+<Consider>0</Consider>
+<SimplePlacing>0</SimplePlacing>
+<HeightReference>0</HeightReference>
+<HeightOffset>0.0000000000000000</HeightOffset>
+<UnitFactor>1.0000000000000000</UnitFactor>
+<PositionNumber>1</PositionNumber>
+<IsLocked>0</IsLocked>
+<IsEncrypted>0</IsEncrypted>
+<Key><![CDATA[]]></Key>
+<DependentFiles>
+</DependentFiles>
+<Parameters>
+<Type>1</Type>
+<AutoUpdateValues>1</AutoUpdateValues>
+<MapPenToColor>0</MapPenToColor>
+<Parameter>
+<Identifier>height2</Identifier>
+<Name><![CDATA[Z Kontrollpunkt 1]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>1</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>2.732522084385</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>height3</Identifier>
+<Name><![CDATA[Z Kontrollpunkt 2]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>1</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.549894661556</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>height4</Identifier>
+<Name><![CDATA[Endh�he]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>1</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>1.949176786467</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>object_color</Identifier>
+<Name><![CDATA[Objektfarbe]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>7</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>object_layer</Identifier>
+<Name><![CDATA[Layer]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>10</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>3740.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>object_pen</Identifier>
+<Name><![CDATA[Objektstift]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>8</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>3.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>object_stroke</Identifier>
+<Name><![CDATA[Objektstrichart]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>9</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>ref_x</Identifier>
+<Name><![CDATA[L�nge]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>1</Type>
+<Attribute>-1</Attribute>
+<SystemID>1</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>4.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>ref_y</Identifier>
+<Name><![CDATA[Breite]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>1</Type>
+<Attribute>-1</Attribute>
+<SystemID>2</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.300000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>ref_z</Identifier>
+<Name><![CDATA[Starth�he]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>1</Type>
+<Attribute>-1</Attribute>
+<SystemID>3</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>2.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>show_tangents</Identifier>
+<Name><![CDATA[Tangenten]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>4</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>4</Type>
+<StringValue></StringValue>
+<DoubleValue>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>subdiv</Identifier>
+<Name><![CDATA[Unterteilung]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>5</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>5</Type>
+<StringValue></StringValue>
+<DoubleValue>50.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>tangent_color</Identifier>
+<Name><![CDATA[Tangentenfarbe]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>7</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>6.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>tangent_pen</Identifier>
+<Name><![CDATA[Tangentenstift]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>8</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>5</Type>
+<StringValue></StringValue>
+<DoubleValue>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>tangent_stroke</Identifier>
+<Name><![CDATA[Tangentenstrichart]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>9</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>5</Type>
+<StringValue></StringValue>
+<DoubleValue>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>x2</Identifier>
+<Name><![CDATA[X Kontrollpunkt 1]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>1</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>1.003445800431</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>x3</Identifier>
+<Name><![CDATA[X Kontrollpunkt 2]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>1</Type>
+<Attribute>-1</Attribute>
+<SystemID>0</SystemID>
+<Expandable>0</Expandable>
+<Hidden>0</Hidden>
+<Lock>0</Lock>
+<Export>0</Export>
+<Save>1</Save>
+<CurrentValue>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>2.380617372577</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+</Parameters>
+<Script><PartParameter>
+<Enable>1</Enable>
+<Text><![CDATA[! WavyBox
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+VALUES "x2" RANGE (0, ref_x)
+VALUES "x3" RANGE (0, ref_x)
+
+VALUES "subdiv" RANGE (2, )
+
+! reset top to a flat surface
+IF GLOB_UI_BUTTON_ID = 1000 THEN
+    delta_h = height4 - REF_Z
+    PARAMETERS height2 = REF_Z + delta_h * (x2 / REF_X)
+    PARAMETERS height3 = REF_Z + delta_h * (x3 / REF_X)
+ENDIF
+]]></Text>
+</PartParameter>
+<PartMaster>
+<Enable>1</Enable>
+<Text><![CDATA[]]></Text>
+</PartMaster>
+<Part2D>
+<Enable>1</Enable>
+<Text><![CDATA[! WavyBox
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+LAYER object_layer
+COLOR object_color
+PEN object_pen
+STROKE object_stroke
+RECT2 0, 0, REF_X, REF_Y
+
+HANDLE2 0, 0, 1, REF_X, 1
+HANDLE2 REF_X, 0, 1, REF_X, 2
+HANDLE2 -1, 0, 1, REF_X, 3
+HANDLE2 0, 0, 2, REF_Y, 1
+HANDLE2 0, REF_Y, 2, REF_Y, 2
+HANDLE2 0, -1, 2, REF_Y, 3
+
+END
+
+!---------------------------------------------------------
+
+
+
+
+
+
+
+]]></Text>
+</Part2D>
+<Part3D>
+<Enable>1</Enable>
+<Text><![CDATA[! WavyBox
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+! Array bezier_points defines the top wave
+! bezier_points[n][i] ... n=point number, i=axis (1=x-axis, 2=z-axis)
+DIM bezier_points[4][2] ! global bezier curve definition points
+! start point
+bezier_points[1][1] = 0.
+bezier_points[1][2] = ref_z
+! control point 1
+bezier_points[2][1] = x2
+bezier_points[2][2] = height2
+! control point 2
+bezier_points[3][1] = x3
+bezier_points[3][2] = height3
+! end point
+bezier_points[4][1] = ref_x
+bezier_points[4][2] = height4
+
+DIM result_point[3] ! global result point
+
+delta_t = 1.0 / subdiv
+PUT 0, 0
+
+FOR i = 0 TO subdiv
+    t = delta_t * i
+    DIM _scalar_[4]
+_scalar_[1] = (1. - t)^3
+_scalar_[2] = 3. * (1. - t)^2 * t
+_scalar_[3] = 3. * (1. - t) * t^2
+_scalar_[4] = t^3
+
+FOR n = 1 to 2
+    result_point[n] = 0.
+NEXT n
+    
+FOR n = 1 TO 4
+    FOR axis = 1 to 2
+        result_point[axis] = result_point[axis] + bezier_points[n][axis] * _scalar_[n]
+    NEXT axis
+NEXT n
+    PUT result_point[1], result_point[2]
+NEXT i
+
+PUT REF_X, 0
+PUT 0, 0
+n = subdiv+4
+
+LAYER object_layer
+COLOR object_color
+PEN object_pen
+STROKE object_stroke
+ROTX 90
+TRANSZ -REF_Y
+PRISM n, REF_Y, GET(n*2)
+RESTORE 2
+
+! def bezier curve handles
+HANDLE 0, 0, 0,  1, ref_z, 1
+HANDLE 0, 0, ref_z,  1, ref_z, 2
+HANDLE 0, 0, -1,  1, ref_z, 3
+HANDLE x2, 0, 0,  2, height2, 1
+HANDLE x2, 0, height2,  2, height2, 2
+HANDLE x2, 0, -1,  2, height2, 3
+HANDLE 0, 0, height2,  2, x2, 1
+HANDLE x2, 0, height2,  2, x2, 2
+HANDLE -1, 0, height2,  2, x2, 3
+HANDLE x3, 0, 0,  3, height3, 1
+HANDLE x3, 0, height3,  3, height3, 2
+HANDLE x3, 0, -1,  3, height3, 3
+HANDLE 0, 0, height3,  3, x3, 1
+HANDLE x3, 0, height3,  3, x3, 2
+HANDLE -1, 0, height3,  3, x3, 3
+HANDLE ref_x, 0, 0,  4, height4, 1
+HANDLE ref_x, 0, height4,  4, height4, 2
+HANDLE ref_x, 0, -1,  4, height4, 3
+
+! def width handle
+HANDLE 0, 0, 0,  5, ref_y, 1
+HANDLE 0, ref_y, 0,  5, ref_y, 2
+HANDLE 0, -1, 0,  5, ref_y, 3
+
+! def length handle
+HANDLE 0, 0, 0,  6, ref_x, 1
+HANDLE ref_x, 0, 0,  6, ref_x, 2
+HANDLE -1, 0, 0,  6, ref_x, 3
+
+COLOR tangent_color
+PEN tangent_pen
+STROKE tangent_stroke
+
+IF PREV_MODE THEN ! show control tangents
+    PREV_LINE 0, 0, REF_Z, x2, 0, height2
+PREV_LINE x3, 0, height3, REF_X, 0, height4
+ELSE
+    IF (show_tangents)THEN ! show control tangents
+        LINE 0, 0, REF_Z, x2, 0, height2
+LINE x3, 0, height3, REF_X, 0, height4
+    ENDIF
+ENDIF
+END
+
+!---------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+]]></Text>
+</Part3D>
+<PartDialog>
+<Enable>1</Enable>
+<Text><![CDATA[! WavyBox
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+HIDE REF_Z
+
+I_PALETTE `Quader mit Bezierkurve als Oberkante`, 1, 
+"(c) 2012 Manfred Moitzi", "link=http://smartparts.tzb-moitzi.at TZBM", 
+"General Public License v3 (GPLv3)", "link=http://www.gnu.org/licenses/ Lizenz"
+
+I_SECTION `Basisform`
+I_INFIELD "ref_x" , 0 , 0 , 0 , 0
+I_INFIELD "ref_y" , 0 , 0 , 0 , 0
+I_INFIELD "ref_z" , 0 , 0 , 1 , 1
+I_INFIELD "height4" , 0 , 0 , 1 , 1
+
+I_SECTION `Eigenschaften`
+I_INFIELD "subdiv" , 0 , 0 , 1 , 1 I_TOOLTIP `Anzahl Teilfl�chen zur Kurvenann�herung`
+I_INFIELD "show_tangents" , 0 , 0 , 1 , 1 I_TOOLTIP `Tangenten immer anzeigen`
+I_SECTION_END
+
+I_SECTION `Format`
+I_INFIELD "object_layer" , 0 , 0 , 1 , 1 
+I_INFIELD "object_color" , 0 , 0 , 1 , 1 
+I_INFIELD "object_pen" , 0 , 0 , 1 , 1 
+I_INFIELD "object_stroke" , 0 , 0 , 1 , 1 
+I_INFIELD "tangent_color" , 0 , 0 , 1 , 1 
+I_INFIELD "tangent_pen" , 0 , 0 , 1 , 1 
+I_INFIELD "tangent_stroke" , 0 , 0 , 1 , 1 
+I_SECTION_END
+
+I_SECTION `Kontrollpunkte`
+I_INFIELD "x2" , 0 , 0 , 1 , 1
+I_INFIELD "height2" , 0 , 0 , 1 , 1
+I_INFIELD "x3" , 0 , 0 , 1 , 1
+I_INFIELD "height3" , 0 , 0 , 1 , 1
+I_SECTION_END
+
+I_SECTION `Zusatzfunktionen`
+I_ROW `ebene Oberkante`, 1
+I_BUTTON I_FUNCTION "Oberkante begradigen", 0, 0, 1, 35, 1000
+I_ROW_END
+I_SECTION_END
+]]></Text>
+</PartDialog>
+</Script>
+<Drawing2D>
+</Drawing2D>
+<Drawing3D>
+</Drawing3D>
+<Pictures>
+<ImportBitmaps>0</ImportBitmaps>
+<ManageInList>0</ManageInList>
+<Picture Name="0" Type="png" Width="146" Height="159"><![CDATA[89504E470D0A1A0A0000000D49484452000000920000009F080600000012E58050000000017352474200AECE1CE90000000467414D410000B18F0BFC6105000000097048597300000EC300000EC301C76FA8640000093049444154785EED9D8B7224270C45FDFF3FBD59AFDD9536067400F1BE5BE54A620B21AECE486A66BCF9F8A33F52C041810F071F722105FE082441E0A280407291514ED601E9639D508445B902F3B2F709CEFBAB3C76AD58488166903EFEC2F07C65CF2570164ABB7F285520BDE1F9FCF7E7CF0FA8048E7FB616F65804520EA01F6DEA1BAE94FDC27A28B44A0510482110FFAA50F095AA4CE1F72BE3D4B2C515C882946B55B1D9E83D2BC5C0FAD4E2FDFDC5B55178050A44414A551C6B367A40B1AA101ACE0B0E21D3F90AFC06E9BB65C5DA59588542205255281CC653FF3D5F0E4550ABC02F9048EB29012A55A5ACAA557B20AD9BA3403548B1AA12AB50B92A959AA9E648A15D5B146806A906A8D4D04DAA61CB61B5B69F026E2011A0626D2EFC9E06F17EC9EEE9D91DA4375061E061C5494123987AA6BC8FEF6E20BDDB97353BE59EEAFA1C5B5EBD15E80A126D5BAA4CDE691DEFAF3B4856AB8B0DD8B9FBA9F1126947A2C0309072AD2ED5DADE07D0131D49E73C9BA120E51EFB53A0E8AE691E1C253B0F078954A6D435410AC49203CBB68F025340CA0141066FB5B93E30B4789D0692C7135DCBC1B5D65781A920B53ED1A932F9C2D0E26D09904AE6A6F0B082A925FD7E6B9701A9666ECA55343F89E48928B014483198721547570324C5636C960529F7C66DEEC96E8C6CDAE5D788513373F49E4BC8E5E43B6E55A6F9602F5791DE73CF0314B95BD2BC3417A66541AAB91A104CF3605A1E247A35402F38E7497DF6CE5B8094BB1A0801AA99F9CE4EF198D36D0352EA6A800CE6BD1F0EC6A46AED5DB604C9FA4C77ECB3E16BA761FFE8B602492D6E5DE0B6032905136D716A737D60DC1224F22467DD8CF791F35EAFDB8294AB4CB43ADD9B76FF936F0D12A94CA9EB01B5385F98B607890CE029C904931F4C4780A43B263F206A3D1D07923564A77E21B35640ADFB52E01890722D8E5C60AACDB5BD248E02291CAC4B01124CF5301D07D22305FD886E289D60AA83E958903480D70151BBEA0A90488B7B0BA8AA548ED3D120913BA6DC2D78B99CF7AE381EA4144C7A1BC517FA2B40226FA5E8579CDAC0BA06A45C65B26622EBE76D293863F5552091CA140EDDD6AF449D8141FB29AE03C91AC0C34BCD1458EDD29FE5E14A904ADB5C383FA9D5FD7E115C0B1269731AC079D5BC1AA4D2CAA44BCB3458D783442A930670BB3209A46F8DACB9A7E42FB2B0653FCF4220BD729AFAD01BF9BE05E279E8FC3C91400A326CDD1B599FC03C1D98D4F90452441952817273D38D3009A444D6ADCAF42CD367C0BF94104899F251FB29CBD4B5C2C9954A2019D92DAD38EF19CAFA40DD49600924904DD2E66EBF1E104800A45CABA2009D7E3D209020480F4C5675BAF57A40201580643DA9D18FEF9E589D04520548EF566755A05B7EB940205582543337D1F6D810D2B4A502A9517AFAB84F87F2C670A62D17484ED293F928F5B6CA09179802C90924DAB66A672AC730BBB812481D646D79D33704B243785D5C0AA42EB2FE7D13F3E34BDAD20A4467AE4E6157BB2D0269D74356ABD3B8B0666E8A6DB9C37B7618A452511A7370CC72F2E2A34F748FDDC80B4D0AB1091276F4B7948F3CE06EA4955C4CC6340FBFD713AAB76F9CFF3021EF03D78051B36637286AE3B5AA530940B1AB8416B872F0909C462B12A5302568EBFADA44EDB22E555DAC7BA630A139306360D0EFE58A4B32E7358B68C204545EA95805A9852C05610AB692F6555591AC47560A5178B09A7537AD09A1AA69731634EFDCFE8303CEB5D5203D09F4AC289EBE4E078C56A5589E2C981E801E881024DF776239DD7FCD48BDEF3104147F1958ADCF82265681C22A3414A437F95C06361F78F93BDD0F1D94A3B3CF771B4B15094B3B049BE524368C13C7D4AFA72FBAE715760F3C465B22FA239B5A513D5B94A7AFDAF31CB32E537D96AA483D2B94806AC0B910A09271A56B458A01D520C38FA52470AFBDB6F603DB57F6698B3C91111B4F213D2B8AA72FCF332EE1ABB2FA2CDDDA745D30102D4780966D6D02AA23501D00DA0AA49260691AAE999F1CE61FA229D113D990CD3C6C3C671E4F5F1E6773F5D1B1FA6C3723594F098470929CA3801A0C5049B720F942EFB591A496DA7842E0E9ABF41CCDF693003A06A49283D06491570EF5D5D56ED0FC43CE4034433664B3DE369E15C5D397FBB927579FA366A42BE7A705012AE908DB54A4102ECFAA424470AF3C9F0E176A5FD68BD73A3FD170DAB06D05FF950B9FF03CC134E35EB8FA5CD3DA5207DD02A8CD00BAA2B56D05D4A6005D0BD2FBE09E15CA6C552983CD01BA1EA41201082443E72712D0601BF2A2443683E376DDCE13024F5FAE87ECEC0C41021E7A7C1E8B3A1FD672EF090111D68A67A79F93F3229B9D0E6DC5EA0594971F2BDE157E8E20B9A522850921E29024DE0014D10AD9104177B4F184C0D3D76A5A22486EAD48EF64794240445F0D142B1E722664636D74CACFBD80F2F2B38AAE081255A4DFE922C291249F0214D103D910D14EB3F184C0D3D70C9D1124AA48F9D4784240123203146B4F1237B2B136BAE1E75E4079F919A939824415A92C254454E27127A0C899910D11E6261B4F084802666B4B624436B30FB2EAFE5E4079F9E9A5138244ADAD5D7E2234D96555A0C8F9900D11E1761B4F083C7D79E40541A28AE421F5FF3E3C212009F48D3EEE8DC4816C46047BDA1E5E4079F969D11741A28AD422B1BD9624C1F692FF9F0392F52D36E40CC8A62508ADF5858024CC5B73B227B2F10EEC567F5E6DCACB0FCD038244AD8DCAE967E70582971FEB6402C95268F2CF49824888BD812271221B7218D9D429E0090149664D94C42FB2A9D95C6BCA14F002CACBCF3B7A048966A4B284F7B6F602C1CBCFE7790552EFAC77F44F9247B6F7008AC4826C48C0B2F157C00382272A92E8D409C85A64E32F913C9628E00554AD1F048966A49294CEB5AD05218CBAD48F409A9BF76EBB93C492CDA91F62876C4850B219AB406955C9CD3F1604D6CFF193DD5889B45B8902238012482519D9DCB62750026973386AC22749277EDF7E884F64433696CD3A0A78572704891EFFD701C03B126FA072F121D8BC0F287F63156805EA8124078B401A9BD3A9BB9164C7020CE7A5981FE2FB88BFD5766A0617DABCA63AA5C0291EC817D241A13829500294D5D2A82F5524A7E4ADE8864080DA969EDA564CEFF898ACAAD3F216CBB35615697C5EA7EC98AA4E644622010B24A2D241362150E4A98D1C5F2011950EB479807AFFB3E59802A945BD03D692619B1C5320119564632A20904C8964401410484425D9980AFC072471000E17D776D60000000049454E44AE426082]]></Picture>
+</Pictures>
+</ScriptObject>

File lib/vectors2.mako

 % if DEBUG:
 ! scale 2D vector: ${vector} * ${scalar}
 % endif
-${result}[1] = ${vector}[1] * scalar
-${result}[2] = ${vector}[2] * scalar
+${result}[1] = ${vector}[1] * (${scalar})
+${result}[2] = ${vector}[2] * (${scalar})
 </%def>
 
 <%def name="unit(result, vector)" filter="trim">

File lib/vectors3.mako

 % if DEBUG:
 ! scale 3D vector: ${vector} * ${scalar}
 % endif
-${result}[1] = ${vector}[1] * scalar
-${result}[2] = ${vector}[2] * scalar
-${result}[3] = ${vector}[3] * scalar
+${result}[1] = ${vector}[1] * (${scalar})
+${result}[2] = ${vector}[2] * (${scalar})
+${result}[3] = ${vector}[3] * (${scalar})
 </%def>
 
 <%def name="unit(result, vector)" filter="trim">

File scripts/WavyBox.Part2D.mako

+! WavyBox
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+LAYER object_layer
+COLOR object_color
+PEN object_pen
+STROKE object_stroke
+RECT2 0, 0, REF_X, REF_Y
+
+${x_handle("REF_X", 1)}
+${y_handle("REF_Y", 2)}
+
+END
+
+!---------------------------------------------------------
+
+<%def name="bezier_point(DefPoint, t, axis=2)" filter="trim">
+DIM _scalar_[4]
+_scalar_[1] = (1. - ${t})^3
+_scalar_[2] = 3. * (1. - ${t})^2 * t
+_scalar_[3] = 3. * (1. - ${t}) * t^2
+_scalar_[4] = ${t}^3
+
+FOR n = 1 to ${axis}
+    result_point[n] = 0.
+NEXT n
+    
+FOR n = 1 TO 4
+    FOR axis = 1 to ${axis}
+        result_point[axis] = result_point[axis] + ${DefPoint}[n][axis] * _scalar_[n]
+    NEXT axis
+NEXT n
+
+</%def>
+
+<%def name="x_handle(name, id)" filter="trim">
+HANDLE2 0, 0, ${id}, ${name}, 1
+HANDLE2 ${name}, 0, ${id}, ${name}, 2
+HANDLE2 -1, 0, ${id}, ${name}, 3
+</%def>
+
+<%def name="y_handle(name, id)" filter="trim">
+HANDLE2 0, 0, ${id}, ${name}, 1
+HANDLE2 0, ${name}, ${id}, ${name}, 2
+HANDLE2 0, -1, ${id}, ${name}, 3
+</%def>
+

File scripts/WavyBox.Part3D.mako

+! WavyBox
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+! Array bezier_points defines the top wave
+! bezier_points[n][i] ... n=point number, i=axis (1=x-axis, 2=z-axis)
+DIM bezier_points[4][2] ! global bezier curve definition points
+! start point
+bezier_points[1][1] = 0.
+bezier_points[1][2] = ref_z
+! control point 1
+bezier_points[2][1] = x2
+bezier_points[2][2] = height2
+! control point 2
+bezier_points[3][1] = x3
+bezier_points[3][2] = height3
+! end point
+bezier_points[4][1] = ref_x
+bezier_points[4][2] = height4
+
+DIM result_point[3] ! global result point
+
+delta_t = 1.0 / subdiv
+PUT 0, 0
+
+FOR i = 0 TO subdiv
+    t = delta_t * i
+    ${bezier_point("bezier_points", "t")}
+    PUT result_point[1], result_point[2]
+NEXT i
+
+PUT REF_X, 0
+PUT 0, 0
+n = subdiv+4
+
+LAYER object_layer
+COLOR object_color
+PEN object_pen
+STROKE object_stroke
+ROTX 90
+TRANSZ -REF_Y
+PRISM n, REF_Y, GET(n*2)
+RESTORE 2
+
+! def bezier curve handles
+${z_handle_at_x('ref_z', 0, id=1)}
+${xz_handle('x2', 'height2', id=2)}
+${xz_handle('x3', 'height3', id=3)}
+${z_handle_at_x('height4', 'ref_x', id=4)}
+
+! def width handle
+${y_handle('ref_y', id=5)}
+
+! def length handle
+${x_handle('ref_x', id=6)}
+
+COLOR tangent_color
+PEN tangent_pen
+STROKE tangent_stroke
+
+IF PREV_MODE THEN ! show control tangents
+    ${draw_tangents('PREV_LINE')}
+ELSE
+    IF (show_tangents)THEN ! show control tangents
+        ${draw_tangents('LINE')}
+    ENDIF
+ENDIF
+END
+
+!---------------------------------------------------------
+
+<%def name="bezier_point(DefPoint, t, axis=2)" filter="trim">
+DIM _scalar_[4]
+_scalar_[1] = (1. - ${t})^3
+_scalar_[2] = 3. * (1. - ${t})^2 * t
+_scalar_[3] = 3. * (1. - ${t}) * t^2
+_scalar_[4] = ${t}^3
+
+FOR n = 1 to ${axis}
+    result_point[n] = 0.
+NEXT n
+    
+FOR n = 1 TO 4
+    FOR axis = 1 to ${axis}
+        result_point[axis] = result_point[axis] + ${DefPoint}[n][axis] * _scalar_[n]
+    NEXT axis
+NEXT n
+
+</%def>
+
+<%def name="xz_handle(x, z, id)" filter="trim">
+${z_handle_at_x(z, x, id)}
+${x_handle_at_z(x, z, id)}
+</%def>
+
+<%def name="x_handle_at_z(x, z, id)" filter="trim">
+HANDLE 0, 0, ${z},  ${id}, ${x}, 1
+HANDLE ${x}, 0, ${z},  ${id}, ${x}, 2
+HANDLE -1, 0, ${z},  ${id}, ${x}, 3
+</%def>
+
+<%def name="y_handle(y, id)" filter="trim">
+HANDLE 0, 0, 0,  ${id}, ${y}, 1
+HANDLE 0, ${y}, 0,  ${id}, ${y}, 2
+HANDLE 0, -1, 0,  ${id}, ${y}, 3
+</%def>
+
+<%def name="x_handle(x, id)" filter="trim">
+${x_handle_at_z(x, 0, id)}
+</%def>
+
+<%def name="z_handle_at_x(z, x, id)" filter="trim">
+HANDLE ${x}, 0, 0,  ${id}, ${z}, 1
+HANDLE ${x}, 0, ${z},  ${id}, ${z}, 2
+HANDLE ${x}, 0, -1,  ${id}, ${z}, 3
+</%def>
+
+<%def name="draw_tangents(cmd)" filter="trim">
+${cmd} 0, 0, REF_Z, x2, 0, height2
+${cmd} x3, 0, height3, REF_X, 0, height4
+</%def>

File scripts/WavyBox.PartDialog.mako

+! WavyBox
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+HIDE REF_Z
+
+I_PALETTE `Quader mit Bezierkurve als Oberkante`, 1, 
+"(c) 2012 Manfred Moitzi", "link=http://smartparts.tzb-moitzi.at TZBM", 
+"General Public License v3 (GPLv3)", "link=http://www.gnu.org/licenses/ Lizenz"
+
+I_SECTION `Basisform`
+I_INFIELD "ref_x" , 0 , 0 , 0 , 0
+I_INFIELD "ref_y" , 0 , 0 , 0 , 0
+I_INFIELD "ref_z" , 0 , 0 , 1 , 1
+I_INFIELD "height4" , 0 , 0 , 1 , 1
+
+I_SECTION `Eigenschaften`
+I_INFIELD "subdiv" , 0 , 0 , 1 , 1 I_TOOLTIP `Anzahl Teilflächen zur Kurvenannäherung`
+I_INFIELD "show_tangents" , 0 , 0 , 1 , 1 I_TOOLTIP `Tangenten immer anzeigen`
+I_SECTION_END
+
+I_SECTION `Format`
+I_INFIELD "object_layer" , 0 , 0 , 1 , 1 
+I_INFIELD "object_color" , 0 , 0 , 1 , 1 
+I_INFIELD "object_pen" , 0 , 0 , 1 , 1 
+I_INFIELD "object_stroke" , 0 , 0 , 1 , 1 
+I_INFIELD "tangent_color" , 0 , 0 , 1 , 1 
+I_INFIELD "tangent_pen" , 0 , 0 , 1 , 1 
+I_INFIELD "tangent_stroke" , 0 , 0 , 1 , 1 
+I_SECTION_END
+
+I_SECTION `Kontrollpunkte`
+I_INFIELD "x2" , 0 , 0 , 1 , 1
+I_INFIELD "height2" , 0 , 0 , 1 , 1
+I_INFIELD "x3" , 0 , 0 , 1 , 1
+I_INFIELD "height3" , 0 , 0 , 1 , 1
+I_SECTION_END
+
+I_SECTION `Zusatzfunktionen`
+I_ROW `ebene Oberkante`, 1
+I_BUTTON I_FUNCTION "Oberkante begradigen", 0, 0, 1, 35, 1000
+I_ROW_END
+I_SECTION_END

File scripts/WavyBox.PartParameter.mako

+! WavyBox
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+VALUES "x2" RANGE (0, ref_x)
+VALUES "x3" RANGE (0, ref_x)
+
+VALUES "subdiv" RANGE (2, )
+
+! reset top to a flat surface
+IF GLOB_UI_BUTTON_ID = 1000 THEN
+    delta_h = height4 - REF_Z
+    PARAMETERS height2 = REF_Z + delta_h * (x2 / REF_X)
+    PARAMETERS height3 = REF_Z + delta_h * (x3 / REF_X)
+ENDIF