Commits

Manfred Moitzi committed 469d325

added Curve_N2 Smartpart

  • Participants
  • Parent commits 820e30d

Comments (0)

Files changed (13)

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$/Spline2.smt" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Spline2.ini" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/Spline2.Part2D.mako" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/Spline2.PartDialog.mako" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/Spline2.PartParameter.mako" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/Spline2.PartMaster.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Spline2.smt" afterPath="$PROJECT_DIR$/Spline2.smt" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Spline2.ini" afterPath="$PROJECT_DIR$/Spline2.ini" />
     </list>
     <ignored path="mako2smt.iws" />
     <ignored path=".idea/workspace.xml" />
       <file leaf-file-name="Spline2.Part2D.mako" pinned="false" current="true" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/scripts/Spline2.Part2D.mako">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="31" column="7" selection-start="725" selection-end="725" vertical-scroll-proportion="0.5238569">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Spline2.PartParameter.mako" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/scripts/Spline2.PartParameter.mako">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="30" column="15" selection-start="778" selection-end="778" vertical-scroll-proportion="-20.4">
+            <state line="12" column="0" selection-start="232" selection-end="232" vertical-scroll-proportion="0.2027833">
               <folding />
             </state>
           </provider>
       <sortByType />
     </navigator>
     <panes>
-      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <PATH>
           </PATH>
         </subPane>
       </pane>
+      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
     <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">
       <created>1352188363256</created>
       <updated>1352188363256</updated>
     </task>
-    <option name="localTasksCounter" value="25" />
+    <task id="LOCAL-00025" summary="added Spline2D Smartpart">
+      <created>1352561205080</created>
+      <updated>1352561205080</updated>
+    </task>
+    <option name="localTasksCounter" value="26" />
     <servers />
   </component>
   <component name="ToolWindowManager">
       <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="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.28642383" sideWeight="0.67045456" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2897351" 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" />
     <option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
     <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
     <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
-    <option name="LAST_COMMIT_MESSAGE" value="added simple profiling tools and code polish" />
+    <option name="LAST_COMMIT_MESSAGE" value="added Spline2D Smartpart" />
     <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
     <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
     <MESSAGE value="refactoring of smartpart &quot;CAVIC2&quot;" />
     <MESSAGE value="further refactorings of smartpart &quot;CAVIC2&quot;" />
     <MESSAGE value="added simple profiling tools and code polish" />
+    <MESSAGE value="added Spline2D Smartpart" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/WavyBox.Part3D.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="119" column="0" selection-start="2693" selection-end="2693" vertical-scroll-proportion="0.88170975">
-          <folding />
-        </state>
+        <state line="119" column="0" selection-start="2693" selection-end="2693" vertical-scroll-proportion="0.88170975" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/ibeams/scripts/HE-A.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>
+        <state line="0" column="4" selection-start="4" selection-end="4" 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="3" column="0" selection-start="0" selection-end="125" vertical-scroll-proportion="-2.04">
-          <folding />
-        </state>
+        <state line="3" column="0" selection-start="0" selection-end="125" vertical-scroll-proportion="-2.04" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/WavyBox.PartDialog.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="24" column="39" selection-start="824" selection-end="824" vertical-scroll-proportion="0.4055666">
-          <folding />
-        </state>
+        <state line="24" column="39" selection-start="824" selection-end="824" vertical-scroll-proportion="0.4055666" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/WavyBox.PartParameter.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="15" column="0" selection-start="153" selection-end="393" vertical-scroll-proportion="0.25347912">
-          <folding />
-        </state>
+        <state line="15" column="0" selection-start="153" selection-end="393" vertical-scroll-proportion="0.25347912" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/scripts/Spline2.PartDialog.mako">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="24" column="17" selection-start="672" selection-end="672" vertical-scroll-proportion="0.4055666" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/Spline2.PartParameter.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="30" column="15" selection-start="778" selection-end="778" vertical-scroll-proportion="-20.4">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/scripts/Spline2.PartDialog.mako">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="24" column="17" selection-start="672" selection-end="672" vertical-scroll-proportion="0.4055666">
-          <folding />
-        </state>
+        <state line="30" column="15" selection-start="778" selection-end="778" vertical-scroll-proportion="0.50695825" />
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/Spline2.Part2D.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="31" column="7" selection-start="725" selection-end="725" vertical-scroll-proportion="0.5238569">
+        <state line="12" column="0" selection-start="232" selection-end="232" vertical-scroll-proportion="0.2027833">
           <folding />
         </state>
       </provider>

File Curve_N2.ini

+[Parts]
+PartMaster = Curve_N2.PartMaster.mako
+PartParameter = Curve_N2.PartParameter.mako
+Part2D = Curve_N2.Part2D.mako
+PartDialog = Curve_N2.PartDialog.mako
+

File Curve_N2.smt

+<?xml version="1.0" encoding="UTF-8"?>
+<ScriptObject><Version>1.0</Version>
+<ScriptVersion>1.0</ScriptVersion>
+<Name><![CDATA[Curve_N2]]></Name>
+<LibPath><![CDATA[]]></LibPath>
+<Type>1</Type>
+<SubType>0</SubType>
+<UUID>b09ca99d-58e4-4cbb-acc6-63599e77c34e</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>1</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>cursor_pos</Identifier>
+<Name><![CDATA[Markierung]]></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>6</Type>
+<StringValue></StringValue>
+<DoubleValue>7.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>curve_color</Identifier>
+<Name><![CDATA[Farbe]]></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>5</Type>
+<StringValue></StringValue>
+<DoubleValue>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>curve_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>5</Type>
+<StringValue></StringValue>
+<DoubleValue>3700.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>curve_pen</Identifier>
+<Name><![CDATA[Stift]]></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>3.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>curve_stroke</Identifier>
+<Name><![CDATA[Strich]]></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>pcount</Identifier>
+<Name><![CDATA[Anzahl St�tzpunkte]]></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>6</Type>
+<StringValue></StringValue>
+<DoubleValue>7.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>REF_X</Identifier>
+<Name><![CDATA[X-Abmessung]]></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>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>REF_Y</Identifier>
+<Name><![CDATA[Y-Abmessung]]></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>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>REF_Z</Identifier>
+<Name><![CDATA[Z-Abmessung]]></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>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>x</Identifier>
+<Name><![CDATA[X Koordinaten]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>6</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.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+<ValueArray>
+<Dimension>1</Dimension>
+<Bounds>
+<Bound Expandable="0">20</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+</Bounds>
+<Values>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>2.526249456000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.592869189333</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>-0.802979344000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.636218522667</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>3.540623856000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>3.193829189333</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>1.537884656000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>3.373618517333</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+</Values>
+</ValueArray>
+</Parameter>
+<Parameter>
+<Identifier>y</Identifier>
+<Name><![CDATA[Y Koordinaten]]></Name>
+<Group><![CDATA[]]></Group>
+<Type>6</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.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+<ValueArray>
+<Dimension>1</Dimension>
+<Bounds>
+<Bound Expandable="0">20</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+<Bound Expandable="0">0</Bound>
+</Bounds>
+<Values>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>-0.116720789333</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>-0.810310122667</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.949672810667</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>2.865713344000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>2.284832277333</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.498839744000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.724256277333</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>-0.998768640000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>1.508800599956</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>-5.018089813442</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>-3.589984750987</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>-2.100304490970</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>0.000000000000</DoubleValue>
+</Value>
+</Values>
+</ValueArray>
+</Parameter>
+</Parameters>
+<Script><PartParameter>
+<Enable>1</Enable>
+<Text><![CDATA[! Curve_N2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+VALUES "pcount" RANGE [min_count, max_count]
+VALUES "cursor_pos" RANGE [1, max_count]
+
+IF GLOB_UI_BUTTON_ID = cmd_move_left THEN
+   PARAMETERS cursor_pos = MAX(cursor_pos - 1, 1)
+ENDIF
+
+IF GLOB_UI_BUTTON_ID = cmd_move_right THEN
+   PARAMETERS cursor_pos = MIN(cursor_pos + 1, pcount)
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_delete) AND  (pcount > min_count) THEN
+   PARAMETERS pcount = pcount - 1
+   IF cursor_pos > pcount THEN
+      PARAMETERS cursor_pos = pcount
+   ELSE
+   
+FOR i =  (cursor_pos + 1) TO max_count
+   PARAMETERS x[i-1] = x[i]
+   PARAMETERS y[i-1] = y[i]
+NEXT i
+
+   ENDIF
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_insert_right) AND (pcount < max_count) THEN
+   
+FOR i =  max_count TO (cursor_pos+1) STEP -1
+   PARAMETERS x[i] = x[i-1]
+   PARAMETERS y[i] = y[i-1]
+NEXT i
+   
+    PARAMETERS x[cursor_pos+1] = (x[cursor_pos] + x[cursor_pos+1]) / 2
+    PARAMETERS y[cursor_pos+1] = (y[cursor_pos] + y[cursor_pos+1]) / 2
+   PARAMETERS pcount = pcount + 1
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_insert_left) AND (pcount < max_count) AND (cursor_pos > 1)THEN
+   
+FOR i =  max_count TO (cursor_pos+1) STEP -1
+   PARAMETERS x[i] = x[i-1]
+   PARAMETERS y[i] = y[i-1]
+NEXT i
+   
+    PARAMETERS x[cursor_pos] = (x[cursor_pos] + x[cursor_pos-1]) / 2
+    PARAMETERS y[cursor_pos] = (y[cursor_pos] + y[cursor_pos-1]) / 2
+   PARAMETERS pcount = pcount + 1, cursor_pos = cursor_pos + 1
+ENDIF
+
+!---------------------------------------------------
+
+
+
+]]></Text>
+</PartParameter>
+<PartMaster>
+<Enable>1</Enable>
+<Text><![CDATA[! Curve_N2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+max_count = 20
+min_count = 3
+cmd_delete = 1001
+cmd_insert_left = 1002
+cmd_insert_right = 1003
+cmd_move_left = 1004
+cmd_move_right = 1005]]></Text>
+</PartMaster>
+<Part2D>
+<Enable>1</Enable>
+<Text><![CDATA[! Curve_N2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+id = 1 
+
+FOR n = 1 TO pcount 
+   PUT x [ n ] , y [ n ] 
+   
+   HANDLE2 0 , y [ n ] , id , x [ n ] , 1 
+   HANDLE2 x [ n ] , y [ n ] , id , x [ n ] , 2 
+   HANDLE2 -1 , y [ n ] , id , x [ n ] , 3 
+   
+   HANDLE2 x [ n ] , 0 , id , y [ n ] , 1 
+   HANDLE2 x [ n ] , y [ n ] , id , y [ n ] , 2 
+   HANDLE2 x [ n ] , -1 , id , y [ n ] , 3 
+   id = id + 1 
+   
+NEXT n 
+
+! draw curve_n2
+COLOR curve_color 
+PEN curve_pen 
+STROKE curve_stroke 
+LAYER curve_layer 
+CURVE_N2 pcount , 1 , GET ( 2 * pcount ) 
+
+! draw cursor
+IF PREV_MODE THEN 
+   COLOR 6 
+   PREV_ARC2 x [ cursor_pos ] , y [ cursor_pos ] , 0.1 , 0 , 360 
+   FOR n = 1 TO pcount - 1 
+      PREV_LINE2 x [ n ] , y [ n ] , x [ n + 1 ] , y [ n + 1 ] 
+   NEXT n 
+ENDIF 
+
+END 
+
+!--------------------------------------------------]]></Text>
+</Part2D>
+<Part3D>
+<Enable>0</Enable>
+<Text><![CDATA[]]></Text>
+</Part3D>
+<PartDialog>
+<Enable>1</Enable>
+<Text><![CDATA[! Curve_N2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+
+
+I_PALETTE `2D NURBS Kurve`, 1,
+"(c) 2012 Manfred Moitzi", "link=http://smartparts.tzb-moitzi.at TZBM",
+"General Public License v3 (GPLv3)", "link=http://www.gnu.org/licenses/ Lizenz"
+
+LOCK pcount
+
+I_SECTION `Eigenschaften`
+I_INFIELD "pcount", 0, 0, 1, 1
+I_SECTION_END
+
+I_SECTION `Format`
+I_INFIELD "curve_pen", 0, 0, 1, 1
+I_INFIELD "curve_stroke", 0, 0, 1, 1
+I_INFIELD "curve_color", 0, 0, 1, 1
+I_INFIELD "curve_layer", 0, 0, 1, 1
+I_SECTION_END
+
+
+row_height = 35
+I_SECTION `Funktionen`
+I_ROW "move" , 1
+I_BUTTON I_FUNCTION , `gehe links` , 0 , 0 , 1 , row_height , cmd_move_left
+I_BUTTON I_FUNCTION , `gehe rechts` , 0 , 0 , 1 , row_height , cmd_move_right
+I_ROW_END
+
+I_ROW "insert" , 1
+I_BUTTON I_FUNCTION , `einf�gen links` , 0 , 0 , 1 , row_height , cmd_insert_left
+I_BUTTON I_FUNCTION , `einf�gen rechts` , 0 , 0 , 1 , row_height , cmd_insert_right
+I_BUTTON I_FUNCTION , `entfernen` , 0 , 0 , 1 , row_height , cmd_delete
+I_ROW_END
+I_SECTION_END
+
+
+I_SECTION `Werte` 
+I_ROW `X Koordinaten` , 0 
+I_INFIELD_2 x[cursor_pos], 0 , 0 , 1 , 22
+I_ROW `Y Koordinaten` , 0 
+I_INFIELD_2 y[cursor_pos], 0 , 0 , 1 , 22
+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[89504E470D0A1A0A0000000D49484452000000920000009F080600000012E58050000000017352474200AECE1CE90000000467414D410000B18F0BFC6105000000097048597300000EC300000EC301C76FA864000004D449444154785EEDDBD16EDB30104451FFFF4FA77050A38A1A5B123524679637409E2AAF5733C78C91D48F2FBE484090C04330831124F0052410481200922446860009039204802489912140C2802401204962640890302049004892181902240C481200922446860009039204802489912140C2802401204962640890302049004892181902240C481200922446860009039204802489912140C2802401204962640890302049004892181902240C481200922446860009039204802489912140C2802401204962640890302049004892181902240C481200922446860009039204802489912140C2802401204962640890302049004892181902240C481200922446860009039204802489912125203D1E8FAF966FEAD7251005E91D96D6383EE16B9DB9EAE3AC21ED8B1E59D2CCE71E799FAAE7B284F42A5175938A398E3B29EE4B35C30A524259093BAA705C99630129B19CC49DAFC0B87AED544815CAD8BE97BA1A7EA5EBA740AA00E8370455EFEB0CF8E1909E6157FF5AE11EF71D0E6B75B557EB72F7DBFB74582DD0FF5EA90B9CC0CF7BEE7A22AD78C4BF7BEFD4FB053B7B7E374820FA596DF53CBA40AA1E5AEBABBF722E724895C36A05B47D5CD57CA490AA86A400541D930C1288CE73AB981590CEF72FBDB21A2609A46AA148C5BC19562D33208D50B300A6DB90AABDB246BAAA941D9046CAD93D1790FE06522988599EAA6478EB44AA12C22C44DF7FEC2CF247DD664855029889E8F5DC15B204928124201994506185652155B871278015F26CFAD156E1C681A44D0048DA3C9BA65578615E8654E1A69BDAEEF8A00A9902A92390B3A381743629AEFB98009000723B810A88BE7F437F25892A377DE59E7B5F5B255320F596F2617E15449C48131155FA832D902642AA741A016912A46A888004245902BCD99645796E50C5D3E8F28954ED0DE2B9EA7557554504249D91C3DF5C574604A40190AA037A4578E93D123FDACEC97BE2797D9F7B44FE55401274B885B3CA09B48F6D0948FBA25B4E8B77335685731B52A51F6F9F7070CA5C3BAA2F9F4895205D8B8AAB3F2500247C4812009224468600090392049A20F13E49927DA921402A55E7BC9B6986C4A934AF34C7670692632B813BDD82C4A914D878A7956F430253A766C2C60229AC30D775259038955CEB1DB7970C1298C695E6F84C40726C25702729244EA54001A295E590C0246A266C4C17482F4CFCEFC1300D37D6ED06E9B513986EB413F4D0EE90F85117A4E1C6AA432055C6D4F241821B7DD93E7418A44AEF9B56FCDCDA91E0A190B6EF9BD2DE3B81E733A52990524081E7E81CFAF7EF5321ED41399C52E0398F677BA505A41F0B6D3E37DF1BD66F1F906C8B9147D941DA5772F469D833152A3EB27DE67956BEC61ED2513947D07A9F6A47FBADF2EFF1905629CAFD3E81E4DE50C87E400A29CA7D4D20B93714B21F90428A725F1348EE0D85EC07A490A2DCD704927B4321FB0129A428F73581E4DE50C87E400A29CA7D4D20B93714B21F90428A725F1348EE0D85EC07A490A2DCD704927B4321FB0129A428F73581E4DE50C87E400A29CA7D4D20B93714B21F90428A725F1348EE0D85EC07A490A2DCD704927B4321FB0129A428F73581E4DE50C87E400A29CA7D4D20B93714B21F90428A725F1348EE0D85EC07A490A2DCD704927B4321FB0129A428F73581E4DE50C87E400A29CA7D4D20B93714B21F90428A725F1348EE0D85ECF707D5FC8C1CD5E854170000000049454E44AE426082]]></Picture>
+</Pictures>
+</ScriptObject>
 [Parts]
+PartMaster = Spline2.PartMaster.mako
 PartParameter = Spline2.PartParameter.mako
 Part2D = Spline2.Part2D.mako
 PartDialog = Spline2.PartDialog.mako
-<?xml version="1.0" encoding="UTF-8"?>
-<ScriptObject><Version>1.0</Version>
+<?xml version="1.0" encoding="UTF-8"?><ScriptObject><Version>1.0</Version>
 <ScriptVersion>1.0</ScriptVersion>
 <Name><![CDATA[Spline2]]></Name>
 <LibPath><![CDATA[]]></LibPath>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <Values>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>23.719009585299</DoubleValue>
+<StringValue/>
+<DoubleValue>20.568219391915</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>330.524110996754</DoubleValue>
+<StringValue/>
+<DoubleValue>325.764293822495</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>333.434948822922</DoubleValue>
+<StringValue/>
+<DoubleValue>20.568219391915</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>304.470751823369</DoubleValue>
+<StringValue/>
+<DoubleValue>20.568219391915</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>303.621508442905</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 </Values>
 <CurrentValue>
 <Value>
 <Type>4</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <Parameter>
+<Identifier>cursor_pos</Identifier>
+<Name><![CDATA[Markierung]]></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>6</Type>
+<StringValue/>
+<DoubleValue>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
 <Identifier>pcount</Identifier>
 <Name><![CDATA[Anzahl St�tzpunkte]]></Name>
 <Group><![CDATA[]]></Group>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>4.000000000000</DoubleValue>
+<StringValue/>
+<DoubleValue>3.000000010000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>3700.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>3.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>6.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.800000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <Values>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>-1.126976848528</DoubleValue>
+<StringValue/>
+<DoubleValue>-1.550310166667</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>0.353892557264</DoubleValue>
+<StringValue/>
+<DoubleValue>0.213312953403</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>1.332850890598</DoubleValue>
+<StringValue/>
+<DoubleValue>1.971823166667</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>2.893892557264</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>6.032819767857</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>8.268741835337</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>7.486746687354</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>-0.286105600000</DoubleValue>
 </Value>
 </Values>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <Values>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
+<DoubleValue>-0.604075500000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue/>
+<DoubleValue>0.502933533319</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue/>
+<DoubleValue>-0.593238166667</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue/>
+<DoubleValue>1.508800599956</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue/>
+<DoubleValue>-5.018089813442</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue/>
+<DoubleValue>-3.589984750987</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue/>
+<DoubleValue>-2.100304490970</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>2.143800599956</DoubleValue>
-</Value>
-<Value>
-<Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>0.291717266623</DoubleValue>
-</Value>
-<Value>
-<Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>1.508800599956</DoubleValue>
-</Value>
-<Value>
-<Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>-5.018089813442</DoubleValue>
-</Value>
-<Value>
-<Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>-3.589984750987</DoubleValue>
-</Value>
-<Value>
-<Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>-2.100304490970</DoubleValue>
-</Value>
-<Value>
-<Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
-<DoubleValue>0.000000000000</DoubleValue>
-</Value>
-<Value>
-<Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 </Values>
 ! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
 ! License: GPLv3, www.fsf.org
 
-VALUES "pcount" RANGE ( 3 , 20 ] 
+VALUES "pcount" RANGE [min_count, max_count]
+VALUES "cursor_pos" RANGE [1, max_count]
 
-IF GLOB_UI_BUTTON_ID = 1001 THEN 
-   dx = x [ pcount ] - x [ pcount - 1 ] 
-   dy = y [ pcount ] - y [ pcount - 1 ] 
-   PARAMETERS pcount = pcount + 1 
-   PARAMETERS x [ pcount ] = x [ pcount - 1 ] + dx 
-   PARAMETERS y [ pcount ] = y [ pcount - 1 ] + dy 
-ENDIF 
+IF GLOB_UI_BUTTON_ID = cmd_move_left THEN
+	PARAMETERS cursor_pos = MAX(cursor_pos - 1, 1)
+ENDIF
 
-IF GLOB_UI_BUTTON_ID = 1002 THEN 
-   PARAMETERS pcount = pcount - 1 
-ENDIF 
+IF GLOB_UI_BUTTON_ID = cmd_move_right THEN
+	PARAMETERS cursor_pos = MIN(cursor_pos + 1, pcount)
+ENDIF
 
-IF GLOB_UI_BUTTON_ID = 1003 THEN 
-   dx = ( x [ pcount ] - x [ 1 ] ) / ( pcount - 1 ) 
-   dy = ( y [ pcount ] - y [ 1 ] ) / ( pcount - 1 ) 
-   IF dx <> 0 THEN 
-      alpha = ATAN ( dy / dx ) 
-      ELSE 
-      IF dy > 0 THEN 
-         alpha = 90 
-         ELSE 
-         alpha = -90 
-      ENDIF 
-   ENDIF 
-   PARAMETERS angle [ 1 ] = alpha 
-   FOR i = 2 TO pcount 
-      PARAMETERS x [ i ] = x [ 1 ] + dx * ( i - 1 ) 
-      PARAMETERS y [ i ] = y [ 1 ] + dy * ( i - 1 ) 
-      PARAMETERS angle [ i ] = alpha 
-   NEXT i 
-ENDIF ]]></Text>
+IF (GLOB_UI_BUTTON_ID = cmd_delete) AND  (pcount > min_count) THEN
+	PARAMETERS pcount = pcount - 1
+	IF cursor_pos > pcount THEN
+		PARAMETERS cursor_pos = pcount
+	ELSE
+	
+FOR i =  (cursor_pos + 1) TO max_count
+	PARAMETERS x[i-1] = x[i]
+	PARAMETERS y[i-1] = y[i]
+	PARAMETERS angle[i-1] = angle[i]
+NEXT i
+
+	ENDIF
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_insert_right) AND (pcount < max_count) THEN
+	
+FOR i =  max_count TO (cursor_pos+1) STEP -1
+	PARAMETERS x[i] = x[i-1]
+	PARAMETERS y[i] = y[i-1]
+	PARAMETERS angle[i] = angle[i-1]
+NEXT i
+   
+    PARAMETERS x[cursor_pos+1] = (x[cursor_pos] + x[cursor_pos+1]) / 2
+    PARAMETERS y[cursor_pos+1] = (y[cursor_pos] + y[cursor_pos+1]) / 2
+	PARAMETERS pcount = pcount + 1
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_insert_left) AND (pcount < max_count) AND (cursor_pos > 1)THEN
+	
+FOR i =  max_count TO (cursor_pos+1) STEP -1
+	PARAMETERS x[i] = x[i-1]
+	PARAMETERS y[i] = y[i-1]
+	PARAMETERS angle[i] = angle[i-1]
+NEXT i
+   
+    PARAMETERS x[cursor_pos] = (x[cursor_pos] + x[cursor_pos-1]) / 2
+    PARAMETERS y[cursor_pos] = (y[cursor_pos] + y[cursor_pos-1]) / 2
+	PARAMETERS pcount = pcount + 1, cursor_pos = cursor_pos + 1
+ENDIF
+
+!---------------------------------------------------
+
+
+
+]]></Text>
 </PartParameter>
 <PartMaster>
-<Enable>0</Enable>
-<Text><![CDATA[]]></Text>
+<Enable>1</Enable>
+<Text><![CDATA[! Spline2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+max_count = 20
+min_count = 3
+cmd_delete = 1001
+cmd_insert_left = 1002
+cmd_insert_right = 1003
+cmd_move_left = 1004
+cmd_move_right = 1005]]></Text>
 </PartMaster>
 <Part2D>
 <Enable>1</Enable>
 <Text><![CDATA[! Spline2.smt
 ! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
 ! License: GPLv3, www.fsf.org
-id = 1 
+id = 1
 
-FOR n = 1 TO pcount 
-   PUT x [ n ] , y [ n ] , angle [ n ] 
-   
-   HANDLE2 0 , y [ n ] , id , x [ n ] , 1 
-   HANDLE2 x [ n ] , y [ n ] , id , x [ n ] , 2 
-   HANDLE2 -1 , y [ n ] , id , x [ n ] , 3 
-   
-   HANDLE2 x [ n ] , 0 , id , y [ n ] , 1 
-   HANDLE2 x [ n ] , y [ n ] , id , y [ n ] , 2 
-   HANDLE2 x [ n ] , -1 , id , y [ n ] , 3 
-   id = id + 1  
-   
-   IF NOT ( autosmooth ) THEN 
-      dx = COS ( angle [ n ] ) * tangent_length 
-      dy = SIN ( angle [ n ] ) * tangent_length 
-      HANDLE2 x [ n ] + tangent_length , y [ n ] , id , angle [ n ] , 4 ! base handle
-      HANDLE2 x [ n ] + dx , y [ n ] + dy , id , angle [ n ] , 5 ! moving handle
-      HANDLE2 x [ n ] , y [ n ] , id , angle [ n ] , 6 ! center of angle
-      IF PREV_MODE THEN 
-         COLOR tangent_color 
-         PREV_LINE2 x [ n ] - dx , y [ n ] - dy , x [ n ] + dx , y [ n ] + dy 
-      ENDIF 
-      id = id + 1 
-   ENDIF 
-NEXT n 
+FOR n = 1 to pcount
+PUT x[n], y[n], angle[n]
 
-flags = autosmooth * 2 
-COLOR spline_color 
-PEN spline_pen 
-STROKE spline_stroke 
-LAYER spline_layer 
-SPLINE2 pcount , flags , GET ( 3 * pcount ) 
+    HANDLE2 0, y[n], id, x[n], 1
+    HANDLE2 x[n], y[n], id, x[n], 2
+    HANDLE2 -1, y[n], id, x[n], 3
 
-END 
-!--------------------------------------------------]]></Text>
+    HANDLE2 x[n], 0, id, y[n], 1
+    HANDLE2 x[n], y[n], id, y[n], 2
+    HANDLE2 x[n], -1, id, y[n], 3
+    id = id + 1
+
+IF NOT(autosmooth) THEN
+    
+    dx = COS(angle[n]) * tangent_length
+    dy = SIN(angle[n]) * tangent_length
+    HANDLE2 x[n]+tangent_length, y[n], id, angle[n], 4 ! base handle
+    HANDLE2 x[n]+dx, y[n]+dy, id, angle[n], 5 ! moving handle
+    HANDLE2 x[n], y[n], id, angle[n], 6 ! center of angle
+    IF PREV_MODE THEN
+        COLOR tangent_color
+        PREV_LINE2 x[n]-dx, y[n]-dy, x[n]+dx, y[n]+dy
+    ENDIF
+    id = id + 1
+
+ENDIF
+NEXT n
+
+! draw spline
+flags = autosmooth * 2
+COLOR spline_color
+PEN spline_pen
+STROKE spline_stroke
+LAYER spline_layer
+SPLINE2 pcount, flags, GET(3 * pcount)
+
+! draw cursor
+IF PREV_MODE THEN
+	COLOR tangent_color
+	cursor_size = tangent_length / 4
+	PREV_ARC2 x[cursor_pos], y[cursor_pos], cursor_size/2, 0, 360
+ENDIF
+
+END
+
+!--------------------------------------------------
+
+
+
+]]></Text>
 </Part2D>
 <Part3D>
 <Enable>0</Enable>
 ! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
 ! License: GPLv3, www.fsf.org
 
-I_PALETTE `2D Spline` , 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_PALETTE `2D Spline`, 1,
+"(c) 2012 Manfred Moitzi", "link=http://smartparts.tzb-moitzi.at TZBM",
+"General Public License v3 (GPLv3)", "link=http://www.gnu.org/licenses/ Lizenz"
 
-LOCK pcount 
+LOCK pcount
 
-I_SECTION "Eigenschaften" 
-I_INFIELD "pcount" , 0 , 0 , 1 , 1 
-I_INFIELD "autosmooth" , 0 , 0 , 1 , 1 
-I_INFIELD "tangent_length" , 0 , 0 , 1 , 1 
-I_SECTION_END 
+I_SECTION `Eigenschaften`
+I_INFIELD "pcount", 0, 0, 1, 1
+I_INFIELD "autosmooth", 0, 0, 1, 1
+I_INFIELD "tangent_length", 0, 0, 1, 1
+I_SECTION_END
 
-I_SECTION "Format" 
-I_INFIELD "spline_pen" , 0 , 0 , 1 , 1 
-I_INFIELD "spline_stroke" , 0 , 0 , 1 , 1 
-I_INFIELD "spline_color" , 0 , 0 , 1 , 1 
-I_INFIELD "spline_layer" , 0 , 0 , 1 , 1 
-I_INFIELD "tangent_color" , 0 , 0 , 1 , 1 
-I_SECTION_END 
+I_SECTION `Format`
+I_INFIELD "spline_pen", 0, 0, 1, 1
+I_INFIELD "spline_stroke", 0, 0, 1, 1
+I_INFIELD "spline_color", 0, 0, 1, 1
+I_INFIELD "spline_layer", 0, 0, 1, 1
+I_INFIELD "tangent_color", 0, 0, 1, 1
+I_SECTION_END
 
-I_SECTION "Punkt" 
-I_ROW "Punkte" , 1 
-I_BUTTON I_FUNCTION , `anf�gen` , 0 , 0 , 1 , 35 , 1001 
-I_BUTTON I_FUNCTION , `entfernen` , 0 , 0 , 1 , 35 , 1002 
-I_BUTTON I_FUNCTION , `zur�cksetzen` , 0 , 0 , 1 , 35 , 1003 
-I_ROW_END 
-I_SECTION_END ]]></Text>
+
+row_height = 35
+I_SECTION `Funktionen`
+I_ROW "move" , 1
+I_BUTTON I_FUNCTION , `gehe links` , 0 , 0 , 1 , row_height , cmd_move_left
+I_BUTTON I_FUNCTION , `gehe rechts` , 0 , 0 , 1 , row_height , cmd_move_right
+I_ROW_END
+
+I_ROW "insert" , 1
+I_BUTTON I_FUNCTION , `einf�gen links` , 0 , 0 , 1 , row_height , cmd_insert_left
+I_BUTTON I_FUNCTION , `einf�gen rechts` , 0 , 0 , 1 , row_height , cmd_insert_right
+I_BUTTON I_FUNCTION , `entfernen` , 0 , 0 , 1 , row_height , cmd_delete
+I_ROW_END
+I_SECTION_END
+
+
+I_SECTION `Werte` 
+I_ROW `X Koordinaten` , 0 
+I_INFIELD_2 x[cursor_pos], 0 , 0 , 1 , 22
+I_ROW `Y Koordinaten` , 0 
+I_INFIELD_2 y[cursor_pos], 0 , 0 , 1 , 22
+I_ROW `Winkel` , 0 
+I_INFIELD_2 angle[cursor_pos], 0 , 0 , 1 , 22
+I_SECTION_END
+
+
+]]></Text>
 </PartDialog>
 </Script>
 <Drawing2D>

File scripts/Curve_N2.Part2D.mako

+! Curve_N2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+id = 1
+
+FOR n = 1 to pcount
+PUT x[n], y[n]
+${xy_handle('n')}
+NEXT n
+
+! draw curve_n2
+COLOR curve_color
+PEN curve_pen
+STROKE curve_stroke
+LAYER curve_layer
+CURVE_N2 pcount, 1, GET(2 * pcount)
+
+! draw cursor
+IF PREV_MODE THEN
+	COLOR 6
+	PREV_ARC2 x[cursor_pos], y[cursor_pos], 0.25, 0, 360
+	FOR n = 1 TO pcount-1
+		PREV_LINE2 x[n], y[n], x[n+1]m y[n+1]
+	NEXT n
+ENDIF
+
+END
+
+!--------------------------------------------------
+<%def name="xy_handle(n)">
+    HANDLE2 0, y[${n}], id, x[${n}], 1
+    HANDLE2 x[${n}], y[${n}], id, x[${n}], 2
+    HANDLE2 -1, y[${n}], id, x[${n}], 3
+
+    HANDLE2 x[${n}], 0, id, y[${n}], 1
+    HANDLE2 x[${n}], y[${n}], id, y[${n}], 2
+    HANDLE2 x[${n}], -1, id, y[${n}], 3
+    id = id + 1
+</%def>

File scripts/Curve_N2.PartDialog.mako

+! Curve_N2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+<%namespace file="Spline2.PartDialog.mako" import="controls" />
+
+I_PALETTE `2D NURBS Kurve`, 1,
+"(c) 2012 Manfred Moitzi", "link=http://smartparts.tzb-moitzi.at TZBM",
+"General Public License v3 (GPLv3)", "link=http://www.gnu.org/licenses/ Lizenz"
+
+LOCK pcount
+
+I_SECTION `Eigenschaften`
+I_INFIELD "pcount", 0, 0, 1, 1
+I_SECTION_END
+
+I_SECTION `Format`
+I_INFIELD "curve_pen", 0, 0, 1, 1
+I_INFIELD "curve_stroke", 0, 0, 1, 1
+I_INFIELD "curve_color", 0, 0, 1, 1
+I_INFIELD "curve_layer", 0, 0, 1, 1
+I_SECTION_END
+
+${controls()}
+
+I_SECTION `Werte` 
+I_ROW `X Koordinaten` , 0 
+I_INFIELD_2 x[cursor_pos], 0 , 0 , 1 , 22
+I_ROW `Y Koordinaten` , 0 
+I_INFIELD_2 y[cursor_pos], 0 , 0 , 1 , 22
+I_SECTION_END

File scripts/Curve_N2.PartMaster.mako

+! Curve_N2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+max_count = 20
+min_count = 3
+cmd_delete = 1001
+cmd_insert_left = 1002
+cmd_insert_right = 1003
+cmd_move_left = 1004
+cmd_move_right = 1005

File scripts/Curve_N2.PartParameter.mako

+! Curve_N2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+VALUES "pcount" RANGE [min_count, max_count]
+VALUES "cursor_pos" RANGE [1, max_count]
+
+IF GLOB_UI_BUTTON_ID = cmd_move_left THEN
+	PARAMETERS cursor_pos = MAX(cursor_pos - 1, 1)
+ENDIF
+
+IF GLOB_UI_BUTTON_ID = cmd_move_right THEN
+	PARAMETERS cursor_pos = MIN(cursor_pos + 1, pcount)
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_delete) AND  (pcount > min_count) THEN
+	PARAMETERS pcount = pcount - 1
+	IF cursor_pos > pcount THEN
+		PARAMETERS cursor_pos = pcount
+	ELSE
+	${move_left("cursor_pos + 1")}
+	ENDIF
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_insert_right) AND (pcount < max_count) THEN
+	${move_right("cursor_pos+1")}   
+    PARAMETERS x[cursor_pos+1] = (x[cursor_pos] + x[cursor_pos+1]) / 2
+    PARAMETERS y[cursor_pos+1] = (y[cursor_pos] + y[cursor_pos+1]) / 2
+	PARAMETERS pcount = pcount + 1
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_insert_left) AND (pcount < max_count) AND (cursor_pos > 1)THEN
+	${move_right("cursor_pos+1")}   
+    PARAMETERS x[cursor_pos] = (x[cursor_pos] + x[cursor_pos-1]) / 2
+    PARAMETERS y[cursor_pos] = (y[cursor_pos] + y[cursor_pos-1]) / 2
+	PARAMETERS pcount = pcount + 1, cursor_pos = cursor_pos + 1
+ENDIF
+
+!---------------------------------------------------
+
+<%def name="move_left(to_pos)">
+FOR i =  (${to_pos}) TO max_count
+	PARAMETERS x[i-1] = x[i]
+	PARAMETERS y[i-1] = y[i]
+NEXT i
+</%def>
+
+<%def name="move_right(from_pos)">
+FOR i =  max_count TO (${from_pos}) STEP -1
+	PARAMETERS x[i] = x[i-1]
+	PARAMETERS y[i] = y[i-1]
+NEXT i
+</%def>

File scripts/Spline2.Part2D.mako

 ENDIF
 NEXT n
 
+! draw spline
 flags = autosmooth * 2
 COLOR spline_color
 PEN spline_pen
 LAYER spline_layer
 SPLINE2 pcount, flags, GET(3 * pcount)
 
+! draw cursor
+IF PREV_MODE THEN
+	COLOR tangent_color
+	cursor_size = tangent_length / 4
+	PREV_ARC2 x[cursor_pos], y[cursor_pos], cursor_size/2, 0, 360
+ENDIF
+
 END
+
 !--------------------------------------------------
 <%def name="xy_handle(n)">
     HANDLE2 0, y[${n}], id, x[${n}], 1
         PREV_LINE2 x[${n}]-dx, y[${n}]-dy, x[${n}]+dx, y[${n}]+dy
     ENDIF
     id = id + 1
-</%def>
+</%def>

File scripts/Spline2.PartDialog.mako

 
 LOCK pcount
 
-I_SECTION "Eigenschaften"
+I_SECTION `Eigenschaften`
 I_INFIELD "pcount", 0, 0, 1, 1
 I_INFIELD "autosmooth", 0, 0, 1, 1
 I_INFIELD "tangent_length", 0, 0, 1, 1
 I_SECTION_END
 
-I_SECTION "Format"
+I_SECTION `Format`
 I_INFIELD "spline_pen", 0, 0, 1, 1
 I_INFIELD "spline_stroke", 0, 0, 1, 1
 I_INFIELD "spline_color", 0, 0, 1, 1
 I_INFIELD "tangent_color", 0, 0, 1, 1
 I_SECTION_END
 
-I_SECTION "Punkte"
-I_ROW "Punkte" , 1
-I_BUTTON I_FUNCTION , `anfügen` , 0 , 0 , 1 , 35 , 1001
-I_BUTTON I_FUNCTION , `entfernen` , 0 , 0 , 1 , 35 , 1002
-I_BUTTON I_FUNCTION , `zurücksetzen` , 0 , 0 , 1 , 35 , 1003
+${controls()}
+
+I_SECTION `Werte` 
+I_ROW `X Koordinaten` , 0 
+I_INFIELD_2 x[cursor_pos], 0 , 0 , 1 , 22
+I_ROW `Y Koordinaten` , 0 
+I_INFIELD_2 y[cursor_pos], 0 , 0 , 1 , 22
+I_ROW `Winkel` , 0 
+I_INFIELD_2 angle[cursor_pos], 0 , 0 , 1 , 22
+I_SECTION_END
+
+
+<%def name="controls()">
+row_height = 35
+I_SECTION `Funktionen`
+I_ROW "move" , 1
+I_BUTTON I_FUNCTION , `gehe links` , 0 , 0 , 1 , row_height , cmd_move_left
+I_BUTTON I_FUNCTION , `gehe rechts` , 0 , 0 , 1 , row_height , cmd_move_right
 I_ROW_END
-I_SECTION_END
+
+I_ROW "insert" , 1
+I_BUTTON I_FUNCTION , `einfügen links` , 0 , 0 , 1 , row_height , cmd_insert_left
+I_BUTTON I_FUNCTION , `einfügen rechts` , 0 , 0 , 1 , row_height , cmd_insert_right
+I_BUTTON I_FUNCTION , `entfernen` , 0 , 0 , 1 , row_height , cmd_delete
+I_ROW_END
+I_SECTION_END
+</%def>

File scripts/Spline2.PartMaster.mako

+! Spline2.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+max_count = 20
+min_count = 3
+cmd_delete = 1001
+cmd_insert_left = 1002
+cmd_insert_right = 1003
+cmd_move_left = 1004
+cmd_move_right = 1005

File scripts/Spline2.PartParameter.mako

 ! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
 ! License: GPLv3, www.fsf.org
 
-VALUES "pcount" RANGE (3, 20]
+VALUES "pcount" RANGE [min_count, max_count]
+VALUES "cursor_pos" RANGE [1, max_count]
 
-IF GLOB_UI_BUTTON_ID = 1001 THEN
-    dx = x [ pcount ] - x [ pcount-1 ]
-    dy = y [ pcount ] - y [ pcount-1 ]
-    PARAMETERS pcount = pcount + 1
-    PARAMETERS x [ pcount ] = x [ pcount - 1 ] + dx
-    PARAMETERS y [ pcount ] = y [ pcount - 1 ] + dy
+IF GLOB_UI_BUTTON_ID = cmd_move_left THEN
+	PARAMETERS cursor_pos = MAX(cursor_pos - 1, 1)
 ENDIF
 
-IF GLOB_UI_BUTTON_ID = 1002 THEN
-    PARAMETERS pcount = pcount - 1
+IF GLOB_UI_BUTTON_ID = cmd_move_right THEN
+	PARAMETERS cursor_pos = MIN(cursor_pos + 1, pcount)
 ENDIF
 
-IF GLOB_UI_BUTTON_ID = 1003 THEN
-    dx = ( x [ pcount ] - x [ 1 ] ) / ( pcount - 1 )
-    dy = ( y [ pcount ] - y [ 1 ] ) / ( pcount - 1 )
-    if dx <> 0 THEN
-        alpha = ATAN(dy/dx)
-    ELSE
-        IF dy > 0 THEN
-            alpha = 90
-        ELSE
-            alpha =-90
-        ENDIF
-    ENDIF
-    PARAMETERS angle[1] = alpha
-    FOR i = 2 TO pcount
-        PARAMETERS x [ i ] = x [ 1 ] + dx * ( i - 1 )
-        PARAMETERS y [ i ] = y [ 1 ] + dy * ( i - 1 )
-        PARAMETERS angle [ i ] = alpha
-    NEXT i
+IF (GLOB_UI_BUTTON_ID = cmd_delete) AND  (pcount > min_count) THEN
+	PARAMETERS pcount = pcount - 1
+	IF cursor_pos > pcount THEN
+		PARAMETERS cursor_pos = pcount
+	ELSE
+	${move_left("cursor_pos + 1")}
+	ENDIF
 ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_insert_right) AND (pcount < max_count) THEN
+	${move_right("cursor_pos+1")}   
+    PARAMETERS x[cursor_pos+1] = (x[cursor_pos] + x[cursor_pos+1]) / 2
+    PARAMETERS y[cursor_pos+1] = (y[cursor_pos] + y[cursor_pos+1]) / 2
+	PARAMETERS pcount = pcount + 1
+ENDIF
+
+IF (GLOB_UI_BUTTON_ID = cmd_insert_left) AND (pcount < max_count) AND (cursor_pos > 1)THEN
+	${move_right("cursor_pos+1")}   
+    PARAMETERS x[cursor_pos] = (x[cursor_pos] + x[cursor_pos-1]) / 2
+    PARAMETERS y[cursor_pos] = (y[cursor_pos] + y[cursor_pos-1]) / 2
+	PARAMETERS pcount = pcount + 1, cursor_pos = cursor_pos + 1
+ENDIF
+
+!---------------------------------------------------
+
+<%def name="move_left(to_pos)">
+FOR i =  (${to_pos}) TO max_count
+	PARAMETERS x[i-1] = x[i]
+	PARAMETERS y[i-1] = y[i]
+	PARAMETERS angle[i-1] = angle[i]
+NEXT i
+</%def>
+
+<%def name="move_right(from_pos)">
+FOR i =  max_count TO (${from_pos}) STEP -1
+	PARAMETERS x[i] = x[i-1]
+	PARAMETERS y[i] = y[i-1]
+	PARAMETERS angle[i] = angle[i-1]
+NEXT i
+</%def>