Commits

Manfred Moitzi committed 4ecca83

extended Klothoide.smt

  • Participants
  • Parent commits 469d325

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$/scripts/Spline2.PartMaster.mako" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/scripts/Klothoide.PartDialog.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Curve_N2.smt" afterPath="$PROJECT_DIR$/Curve_N2.smt" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Klothoide.smt" afterPath="$PROJECT_DIR$/Klothoide.smt" />
       <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" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Klothoide.ini" afterPath="$PROJECT_DIR$/Klothoide.ini" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/clothoid.mako" afterPath="$PROJECT_DIR$/lib/clothoid.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/scripts/Curve_N2.Part2D.mako" afterPath="$PROJECT_DIR$/scripts/Curve_N2.Part2D.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/scripts/Curve_N2.PartDialog.mako" afterPath="$PROJECT_DIR$/scripts/Curve_N2.PartDialog.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/scripts/Klothoide.Part2D.mako" afterPath="$PROJECT_DIR$/scripts/Klothoide.Part2D.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/scripts/Klothoide.PartParameter.mako" afterPath="$PROJECT_DIR$/scripts/Klothoide.PartParameter.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/scripts/Spline2.Part2D.mako" afterPath="$PROJECT_DIR$/scripts/Spline2.Part2D.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/scripts/Spline2.PartDialog.mako" afterPath="$PROJECT_DIR$/scripts/Spline2.PartDialog.mako" />
     </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="12" column="0" selection-start="232" selection-end="232" vertical-scroll-proportion="0.2027833">
+            <state line="20" column="0" selection-start="383" selection-end="383" vertical-scroll-proportion="0.33797216">
               <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.splitter.details.proportions" value="0.2" />
     <property name="options.searchVisible" value="true" />
-    <property name="options.splitter.details.proportions" value="0.2" />
   </component>
   <component name="PyConsoleOptionsProvider">
     <option name="myPythonConsoleState">
       <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.2897351" sideWeight="0.67045456" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Structure" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.19039735" 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.29966888" 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" />
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/Spline2.Part2D.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="12" column="0" selection-start="232" selection-end="232" vertical-scroll-proportion="0.2027833">
+        <state line="20" column="0" selection-start="383" selection-end="383" vertical-scroll-proportion="0.33797216">
           <folding />
         </state>
       </provider>

File Curve_N2.smt

-<?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[Curve_N2]]></Name>
 <LibPath><![CDATA[]]></LibPath>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>7.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <Parameter>
+<Identifier>cursor_size</Identifier>
+<Name><![CDATA[Cursorgr��e]]></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/>
+<DoubleValue>0.100000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
 <Identifier>curve_color</Identifier>
 <Name><![CDATA[Farbe]]></Name>
 <Group><![CDATA[]]></Group>
 <CurrentValue>
 <Value>
 <Type>5</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>5</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>3700.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>5</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>3.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <Parameter>
+<Identifier>curve_resol</Identifier>
+<Name><![CDATA[Anzahl Berechnungspunkte]]></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/>
+<DoubleValue>128.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
 <Identifier>curve_stroke</Identifier>
 <Name><![CDATA[Strich]]></Name>
 <Group><![CDATA[]]></Group>
 <CurrentValue>
 <Value>
 <Type>5</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>7.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>0.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <Values>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>2.526249456000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.592869189333</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>-0.802979344000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.636218522667</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>3.540623856000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>3.193829189333</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.537884656000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>3.373618517333</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>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <Values>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>-0.116720789333</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>-0.810310122667</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.949672810667</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>2.865713344000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>2.284832277333</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.498839744000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>0.724256277333</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>-0.998768640000</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>1.508800599956</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>-5.018089813442</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></StringValue>
+<StringValue/>
 <DoubleValue>-3.589984750987</DoubleValue>
 </Value>
 <Value>
 <Type>6</Type>
-<StringValue></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>
 </Values>
 VALUES "cursor_pos" RANGE [1, max_count]
 
 IF GLOB_UI_BUTTON_ID = cmd_move_left THEN
-   PARAMETERS cursor_pos = MAX(cursor_pos - 1, 1)
+	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)
+	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
-   
+	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 x[i-1] = x[i]
+	PARAMETERS y[i-1] = y[i]
 NEXT i
 
-   ENDIF
+	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 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
+	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 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
+	PARAMETERS pcount = pcount + 1, cursor_pos = cursor_pos + 1
 ENDIF
 
 !---------------------------------------------------
 <Text><![CDATA[! Curve_N2.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]
 
-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 
+    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 ) 
+COLOR curve_color
+PEN curve_pen
+STROKE curve_stroke
+LAYER curve_layer
+RESOL curve_resol
+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 
+IF PREV_MODE THEN
+	COLOR 6
+	RECT2 x[cursor_pos]-cursor_size, y[cursor_pos]-cursor_size, x[cursor_pos]+cursor_size, y[cursor_pos]+cursor_size
+	FOR n = 1 TO pcount-1
+		PREV_LINE2 x[n], y[n], x[n+1], y[n+1]
+	NEXT n
+ENDIF
 
-END 
+END
 
-!--------------------------------------------------]]></Text>
+!--------------------------------------------------
+
+]]></Text>
 </Part2D>
 <Part3D>
 <Enable>0</Enable>
 
 I_SECTION `Eigenschaften`
 I_INFIELD "pcount", 0, 0, 1, 1
+I_INFIELD "curve_resol", 0, 0, 1, 1
 I_SECTION_END
 
 I_SECTION `Format`
 
 
 row_height = 35
-I_SECTION `Funktionen`
+I_SECTION `Cursor 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_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_INFIELD "cursor_size", 0, 0, 1, 1
 I_SECTION_END
 
 
 I_SECTION `Werte` 
-I_ROW `X Koordinaten` , 0 
+I_ROW `X Koordinate` , 0 
 I_INFIELD_2 x[cursor_pos], 0 , 0 , 1 , 22
-I_ROW `Y Koordinaten` , 0 
+I_ROW `Y Koordinate` , 0 
 I_INFIELD_2 y[cursor_pos], 0 , 0 , 1 , 22
 I_SECTION_END]]></Text>
 </PartDialog>

File Klothoide.ini

 [Parts]
 PartParameter = Klothoide.PartParameter.mako
 Part2D = Klothoide.Part2D.mako
+PartDialog = Klothoide.PartDialog.mako
 

File Klothoide.smt

-<?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[Klothoide]]></Name>
 <LibPath><![CDATA[]]></LibPath>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue/>
+<StringValue></StringValue>
 <DoubleValue>20.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <Parameter>
-<Identifier>ccolor</Identifier>
-<Name><![CDATA[Farbe]]></Name>
-<Group><![CDATA[Linie]]></Group>
+<Identifier>ca_color</Identifier>
+<Name><![CDATA[Querachse Farbe]]></Name>
+<Group><![CDATA[]]></Group>
 <Type>7</Type>
 <Attribute>-1</Attribute>
 <SystemID>0</SystemID>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue/>
-<DoubleValue>1.000000000000</DoubleValue>
+<StringValue></StringValue>
+<DoubleValue>7.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <Parameter>
-<Identifier>cpen</Identifier>
-<Name><![CDATA[Stift]]></Name>
-<Group><![CDATA[Linie]]></Group>
+<Identifier>ca_count</Identifier>
+<Name><![CDATA[Anzahl Querachsen]]></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>3.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>ca_pen</Identifier>
+<Name><![CDATA[Querachse Stift]]></Name>
+<Group><![CDATA[]]></Group>
 <Type>8</Type>
 <Attribute>-1</Attribute>
 <SystemID>0</SystemID>
 <Save>1</Save>
 <CurrentValue>
 <Value>
-<Type>6</Type>
-<StringValue/>
+<Type>5</Type>
+<StringValue></StringValue>
 <DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <Parameter>
-<Identifier>cstroke</Identifier>
-<Name><![CDATA[Strichart]]></Name>
-<Group><![CDATA[Linie]]></Group>
+<Identifier>ca_stroke</Identifier>
+<Name><![CDATA[Querachse 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>12.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>cross_axis_length</Identifier>
+<Name><![CDATA[Querachsenl�nge]]></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>5.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>cross_axis_pos</Identifier>
+<Name><![CDATA[Querachsenposition]]></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.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+<ValueArray>
+<Dimension>1</Dimension>
+<Bounds>
+<Bound Expandable="0">10</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>5.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>10.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>15.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>5.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>5.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>5.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>5.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>5.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>5.000000000000</DoubleValue>
+</Value>
+<Value>
+<Type>6</Type>
+<StringValue></StringValue>
+<DoubleValue>5.000000000000</DoubleValue>
+</Value>
+</Values>
+</ValueArray>
+</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>0.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>1.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>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue/>
-<DoubleValue>12.000000000000</DoubleValue>
+<StringValue></StringValue>
+<DoubleValue>1.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue/>
-<DoubleValue>20.000000000000</DoubleValue>
+<StringValue></StringValue>
+<DoubleValue>25.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 <CurrentValue>
 <Value>
 <Type>5</Type>
-<StringValue/>
+<StringValue></StringValue>
 <DoubleValue>100.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue/>
+<StringValue></StringValue>
 <DoubleValue>0.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 <CurrentValue>
 <Value>
 <Type>6</Type>
-<StringValue/>
-<DoubleValue>20.000000000000</DoubleValue>
+<StringValue></StringValue>
+<DoubleValue>16.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>radius_color</Identifier>
+<Name><![CDATA[Radius 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>6.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>radius_pen</Identifier>
+<Name><![CDATA[Radius 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>1.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>radius_stroke</Identifier>
+<Name><![CDATA[Radius 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>
 <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>
+</Parameter>
+<Parameter>
+<Identifier>show_ca</Identifier>
+<Name><![CDATA[zeige Querachsen]]></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>show_r1</Identifier>
+<Name><![CDATA[zeige Startradius]]></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>0.000000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
+<Identifier>show_r2</Identifier>
+<Name><![CDATA[zeige Endradius]]></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>
 </Parameters>
 <Script><PartParameter>
 <Enable>1</Enable>
-<Text><![CDATA[!2D clothoid
-!(c) 2012 by Manfred Moitzi
-!License: GPLv3
+<Text><![CDATA[! 2D clothoid
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
 
 ! Global Parameters:
 ! A = clothoid parameter
 
 
 
-IF GLOB_MODPAR_NAME = "L" THEN
-	
-IF (R1) > 0 THEN
-	l1 = (A)^2 / (R1)
-ELSE
-	l1 = 0
-ENDIF
+VALUES "ca_count" RANGE [ 1 , VARDIM1 ( cross_axis_pos ) ] STEP 1 , 1 
 
-	l2 = l1 + L
-	R2 = (A)^2 / (l2)
-	PARAMETERS R2 = R2
-ELSE ! A, R1, R2, N
-	
-IF (R1) > 0 THEN
-	l1 = (A)^2 / (R1)
-ELSE
-	l1 = 0
-ENDIF
+IF GLOB_MODPAR_NAME = "L" THEN 
+   
+   IF ( r1 ) > 0 THEN 
+      l1 = ( a ) ^ 2 / ( r1 ) 
+      ELSE 
+      l1 = 0 
+   ENDIF 
+   
+   l2 = l1 + l 
+   r2 = ( a ) ^ 2 / ( l2 ) 
+   PARAMETERS r2 = r2 
+   ELSE ! A, R1, R2, N
+   
+   IF ( r1 ) > 0 THEN 
+      l1 = ( a ) ^ 2 / ( r1 ) 
+      ELSE 
+      l1 = 0 
+   ENDIF 
+   
+   
+   IF ( r2 ) > 0 THEN 
+      l2 = ( a ) ^ 2 / ( r2 ) 
+      ELSE 
+      l2 = 0 
+   ENDIF 
+   
+   PARAMETERS l = l2 - l1 
+ENDIF 
 
-	
-IF (R2) > 0 THEN
-	l2 = (A)^2 / (R2)
-ELSE
-	l2 = 0
-ENDIF
-
-	PARAMETERS L = l2 - l1
-ENDIF
-
-HIDE REF_X, REF_Y, REF_Z
-]]></Text>
+HIDE REF_X , REF_Y , REF_Z ]]></Text>
 </PartParameter>
 <PartMaster>
 <Enable>1</Enable>
 </PartMaster>
 <Part2D>
 <Enable>1</Enable>
-<Text><![CDATA[!2D clothoid
-!(c) 2012 by Manfred Moitzi
-!License: GPLv3
+<Text><![CDATA[! 2D clothoid
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
 
 ! Global Parameters:
 ! A = clothoid parameter
 
 
 
-delta = L / (N-1)
+delta = l / ( n - 1 ) 
 
-IF (R1) > 0 THEN
-	d = (A)^2 / (R1)
-ELSE
-	d = 0
-ENDIF
+IF ( r1 ) > 0 THEN 
+   d = ( a ) ^ 2 / ( r1 ) 
+   ELSE 
+   d = 0 
+ENDIF 
 
-FOR i = 0 TO N-1
-    y = d^3 / (6 * A^2) - d^7 / (336 * A^6) + d^11 / (42240 * A^10) - d^15 / (9676800 * A^14) + d^19 / (3530096640 * A^18)
-x = d - d^5 / (40 * A^4) + d^9 / (3456 * A^8) - d^13 / (599040 * A^12) + d^17 / (175472640 * A^16)
-    PUT x, y
-    d = d + delta
-NEXT i
+d1 = d ! store start value
+FOR i = 1 TO n 
+   y = d ^ 3 / ( 6 * a ^ 2 ) - d ^ 7 / ( 336 * a ^ 6 ) + d ^ 11 / ( 42240 * a ^ 10 ) - d ^ 15 / ( 9676800 * a ^ 14 ) + d ^ 19 / ( 3530096640 * a ^ 18 ) 
+   x = d - d ^ 5 / ( 40 * a ^ 4 ) + d ^ 9 / ( 3456 * a ^ 8 ) - d ^ 13 / ( 599040 * a ^ 12 ) + d ^ 17 / ( 175472640 * a ^ 16 ) 
+   PUT x , y 
+   IF i = 1 THEN ! store first curve point
+      x1 = x 
+      y1 = y 
+   ENDIF 
+   IF i = n THEN ! store last curve point
+      xn = x 
+      yn = y 
+   ENDIF 
+   d = d + delta 
+NEXT i 
 
-PEN cpen
-STROKE cstroke
-COLOR ccolor
+! draw curve
+PEN curve_pen 
+STROKE curve_stroke 
+COLOR curve_color 
+LAYER curve_layer 
+POLY2 n , 1 , GET ( n * 2 ) 
+! draw cross axis
 
-POLY2 N, 1, GET(N*2)
+IF show_ca THEN 
+   PEN ca_pen 
+   STROKE ca_stroke 
+   COLOR ca_color 
+   dn = d1 + l 
+   FOR i = 1 TO ca_count 
+      d = cross_axis_pos [ i ] 
+      IF ( d >= d1 ) AND ( d <= dn ) THEN 
+         y = d ^ 3 / ( 6 * a ^ 2 ) - d ^ 7 / ( 336 * a ^ 6 ) + d ^ 11 / ( 42240 * a ^ 10 ) - d ^ 15 / ( 9676800 * a ^ 14 ) + d ^ 19 / ( 3530096640 * a ^ 18 ) 
+         x = d - d ^ 5 / ( 40 * a ^ 4 ) + d ^ 9 / ( 3456 * a ^ 8 ) - d ^ 13 / ( 599040 * a ^ 12 ) + d ^ 17 / ( 175472640 * a ^ 16 ) 
+         tau = ( ( d ) ^ 2 / ( 2 * ( a ) ^ 2 ) ) / PI * 180 
+         dx = cross_axis_length / 2 * COS ( tau ) 
+         dy = cross_axis_length / 2 * SIN ( tau ) 
+         LINE2 x + dy , y - dx , x - dy , y + dx 
+      ENDIF 
+   NEXT i 
+ENDIF 
 
-END
-]]></Text>
+! draw radius
+COLOR 6 
+PEN 1 
+STROKE 1 
+IF show_r1 THEN 
+   IF r1 > 0 THEN ! start from circle
+      d = d1 
+      __r__ = ( a ) ^ 2 / ( d ) 
+      __tau__ = ( ( d ) ^ 2 / ( 2 * ( a ) ^ 2 ) ) / PI * 180 
+      center_x = x1 - __r__ * SIN ( __tau__ ) 
+      center_y = y1 + __r__ * COS ( __tau__ ) 
+      LINE2 x1 , y1 , center_x , center_y 
+   ENDIF 
+ENDIF 
+IF show_r2 THEN 
+   d = d1 + l 
+   __r__ = ( a ) ^ 2 / ( d ) 
+   __tau__ = ( ( d ) ^ 2 / ( 2 * ( a ) ^ 2 ) ) / PI * 180 
+   center_x = xn - __r__ * SIN ( __tau__ ) 
+   center_y = yn + __r__ * COS ( __tau__ ) 
+   LINE2 xn , yn , center_x , center_y 
+ENDIF 
+
+END ]]></Text>
 </Part2D>
 <Part3D>
 <Enable>0</Enable>
 </Part3D>
 <PartDialog>
 <Enable>1</Enable>
-<Text><![CDATA[]]></Text>
+<Text><![CDATA[! Klothoide.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+I_PALETTE `Klothoide` , 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_PAGE `Klothoide` 
+
+I_SECTION `Eigenschaften` 
+I_INFIELD "N" , 0 , 0 , 1 , 1 
+I_INFIELD "A" , 0 , 0 , 1 , 1 
+I_INFIELD "L" , 0 , 0 , 1 , 1 
+I_INFIELD "R1" , 0 , 0 , 1 , 1 I_TOOLTIP `0 = beginnt als Gerade` 
+I_INFIELD "show_r1" , 0 , 0 , 1 , 1 
+I_INFIELD "R2" , 0 , 0 , 1 , 1 
+I_INFIELD "show_r2" , 0 , 0 , 1 , 1 
+I_SECTION_END 
+
+I_SECTION `Format Kurve` 
+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 
+
+I_SECTION `Format Radien` 
+I_INFIELD "radius_pen" , 0 , 0 , 1 , 1 
+I_INFIELD "radius_stroke" , 0 , 0 , 1 , 1 
+I_INFIELD "radius_color" , 0 , 0 , 1 , 1 
+I_SECTION_END 
+
+I_PAGE "Querachsen" 
+
+I_SECTION `Eigenschaften` 
+I_INFIELD "ca_count" , 0 , 0 , 1 , 1 I_TOOLTIP `maximale Anzahl = Gr��e Feld 'cross_axis_pos` 
+I_INFIELD "cross_axis_length" , 0 , 0 , 1 , 1 
+I_INFIELD "show_ca" , 0 , 0 , 1 , 1 
+I_SECTION_END 
+
+I_SECTION `Format` 
+I_INFIELD "ca_pen" , 0 , 0 , 1 , 1 
+I_INFIELD "ca_stroke" , 0 , 0 , 1 , 1 
+I_INFIELD "ca_color" , 0 , 0 , 1 , 1 
+I_SECTION_END 
+
+I_SECTION `Positionen` 
+I_INFIELD "cs_count" , 0 , 0 , 1 , 1 
+
+FOR i = 1 TO ca_count 
+   I_INFIELD_2 cross_axis_pos [ i ] , 0 , 0 , 1 , 1 
+NEXT i 
+I_SECTION_END ]]></Text>
 </PartDialog>
 </Script>
 <Drawing2D>
 <Pictures>
 <ImportBitmaps>0</ImportBitmaps>
 <ManageInList>1</ManageInList>
+<Picture Name="0" Type="png" Width="146" Height="159"><![CDATA[89504E470D0A1A0A0000000D49484452000000920000009F080600000012E58050000000017352474200AECE1CE90000000467414D410000B18F0BFC6105000000097048597300000EC300000EC301C76FA8640000055649444154785EEDDBEB7A13310C84E1DCFF4D174229B44936EBC3C823AD3F7EF1905DC91EBD7536016E1FFC2201410237410D4A90C00790402049004892182902240C4812009224468A0009039204802489912240C2802401204962A40890302049004892182902240C4812009224468A0009039204802489912240C2802401204962A40890302049004892182902240C4812009224468A0009039204802489912240C2802401204962A40890302049004892182902240C4812009224468A0009039204802489912240C2802401204962A40890302049004892182902240C4812009224468A0069C4C08DD81E6323911148F77BC0F42339208D4202139066EC3CDDCBC9F427124E24852A300149E1E8F34772EF9FC9BD772F53F4B7D0C69880042649024092C4F85064C39309481190367C66025214A4CD30012912D2469880140D69134C405A0169034C405A05E9E29880B412D28531016935A48B62029203D2053101C905E9629880E48474214C407243BA082620658074014C40CA02A9382620658254181390B2412A8A0948192115C404A4AC908A6102526648853001293BA4229880540152014C40AA0229392620558294181390AA414A8A09484092240024498C8622C9FE372F900C06642D136102926CAAA642493001C9347F69DB049880249DA8B1981913908CB397B7366202927C9AE682264C4032CF3DA4BD011390422699A0E8624C404A30F3B0252CC404A4B0292629BC08139092CC3B74190B3001297482898A07630252A259872F25101390C2A797AC41102620259BF392E5046002D292C9256C22C604A484335EB6242126202D9B5AD246224C404A3ADFA5CB126002D2D289256E368909488967BB7C69139880B47C5AC91B0E620252F2B95A963780094896491568DA89094805666A5B62072620D9A654A4712326201599A775990D9880649D50A1E6279880546896F6A5BEC10424FB748A2DE00013908ACD31C5725F6002528AC9145CC4032620159CA17BC9374E24F708EAF77F85E8BE2B4EA4FAB35DB6832344405A3682FA8DDE210252FDF986EFE00EE80C1190C2C750BB410BA0AF1DF28C547BD661ABEF41C489143686DA857B1101A9F6BC43563F82084821A3A85B74141190EACE5CB6F2AF4F65338880241B47CD42B378BEEF9A4F6D350D4CAF5A898813697A1CF50AB47EC1D8BB334EA4DEC43AAE6FF8A7CE1DD5E62E8D02C41792737369BE3B0326F5DBD8ABCD7322359318BBD00929FA14E2617BCCC4D05D0E482B01F1D636C4A2FFA695901C8080D46F62F88E684C4E405B438A1EECA3B8A87E19000169F87CE9BF510D2913A05490D4419F8DBA623FD5DF899D6533FA7A8A8FFF1507DB1BF8C81EB3E349F7F17F24E4DE41AE7A6E395A57EB1E2BE101D2EF045A073B0BF6DF33C49BB3BF2A1E201920DD437FC49BF1A179F40767CB67A457431D0DB0E7BE3BA42B9C3EAFF60CA41E099DD77E47F3F9FBCE02852E4FB13547C0113D1FE1B81FF0573A04D244DA67705EBE05A4487C62D307B7A6D856C4E97016556FCFE7B7A9B1E87AFB9EED23CBEB63698857EF08F75D4F151A4E243194B3722B21FD47F2F313D4CA4F532BF77B96BDEAF54B9C48AF4E90A33FFBF1259A69F7409AE47B3CF0E3D3A105C9E8B25C0375F51DCDA9E5BEA79FC996C18D5EF36E418E701D3D5D5F86B66098B9C674B83F2FD9315447CFAF9D3B7BCF8039BA174811A936D4045243482397388275F4E4441AD1D1718F63A88E9E40EA403172A963A88E9E19BE7E1899CFD93D3C239D2514F8BA1BB2726B4052A6B971ADAD215DF53B1D876720A549C0317E5DCF3431BA9E175C7D7523CC5109486912C8016274156962749D0CAEBEA303CB7ADFF690B20EA6DABA80546D6249D79B0652D27C58566302406A0C8ACBDE270024844812F80551859C0C13CCF5FF0000000049454E44AE426082]]></Picture>
 </Pictures>
 </ScriptObject>
 </CurrentValue>
 </Parameter>
 <Parameter>
+<Identifier>cursor_size</Identifier>
+<Name><![CDATA[Cursorgr��e]]></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/>
+<DoubleValue>0.100000000000</DoubleValue>
+</Value>
+</CurrentValue>
+</Parameter>
+<Parameter>
 <Identifier>pcount</Identifier>
 <Name><![CDATA[Anzahl St�tzpunkte]]></Name>
 <Group><![CDATA[]]></Group>
 <Value>
 <Type>6</Type>
 <StringValue/>
-<DoubleValue>3.000000010000</DoubleValue>
+<DoubleValue>3.000000000000</DoubleValue>
 </Value>
 </CurrentValue>
 </Parameter>
 ! 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
+	RECT2 x[cursor_pos]-cursor_size, y[cursor_pos]-cursor_size, x[cursor_pos]+cursor_size, y[cursor_pos]+cursor_size
 ENDIF
 
 END
 
 
 row_height = 35
-I_SECTION `Funktionen`
+I_SECTION `Cursor 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_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_INFIELD "cursor_size", 0, 0, 1, 1
 I_SECTION_END
 
 
 I_SECTION `Werte` 
-I_ROW `X Koordinaten` , 0 
+I_ROW `X Koordinate` , 0 
 I_INFIELD_2 x[cursor_pos], 0 , 0 , 1 , 22
-I_ROW `Y Koordinaten` , 0 
+I_ROW `Y Koordinate` , 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

File lib/clothoid.mako

 ${ry} = ${term(3, 2, 6)} - ${term(7, 6, 336)} + ${term(11, 10, 42240)} - ${term(15, 14, 9676800)} + ${term(19, 18, 3530096640)}
 ${rx} = ${d} - ${term(5, 4, 40)} + ${term(9, 8, 3456)} - ${term(13, 12, 599040)} + ${term(17, 16, 175472640)}
 </%def>
+
+<%def name="center(res_x, res_y, x, y, A, L)" filter="trim">
+__r__ = (${A})^2 / (${L})
+__tau__ = ((${L})^2 / (2 * (${A})^2)) / PI * 180
+${res_x} = ${x} - __r__ * SIN(__tau__)
+${res_y} = ${y} + __r__ * COS(__tau__)
+</%def>

File scripts/Curve_N2.Part2D.mako

 ! (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')}
 PEN curve_pen
 STROKE curve_stroke
 LAYER curve_layer
+RESOL curve_resol
 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
+	RECT2 x[cursor_pos]-cursor_size, y[cursor_pos]-cursor_size, x[cursor_pos]+cursor_size, y[cursor_pos]+cursor_size
 	FOR n = 1 TO pcount-1
-		PREV_LINE2 x[n], y[n], x[n+1]m y[n+1]
+		PREV_LINE2 x[n], y[n], x[n+1], y[n+1]
 	NEXT n
 ENDIF
 

File scripts/Curve_N2.PartDialog.mako

 
 I_SECTION `Eigenschaften`
 I_INFIELD "pcount", 0, 0, 1, 1
+I_INFIELD "curve_resol", 0, 0, 1, 1
 I_SECTION_END
 
 I_SECTION `Format`
 ${controls()}
 
 I_SECTION `Werte` 
-I_ROW `X Koordinaten` , 0 
+I_ROW `X Koordinate` , 0 
 I_INFIELD_2 x[cursor_pos], 0 , 0 , 1 , 22
-I_ROW `Y Koordinaten` , 0 
+I_ROW `Y Koordinate` , 0 
 I_INFIELD_2 y[cursor_pos], 0 , 0 , 1 , 22
 I_SECTION_END

File scripts/Klothoide.Part2D.mako

 
 delta = L / (N-1)
 ${clothoid.distance('d', 'A', 'R1')}
-FOR i = 0 TO N-1
+d1 = d ! store start value
+FOR i = 1 TO N
     ${clothoid.point('x', 'y', 'A', 'd')}
     PUT x, y
+	IF i = 1 THEN ! store first curve point
+		x1 = x
+		y1 = y
+	ENDIF
+	IF i = N THEN ! store last curve point
+		xn = x
+		yn = y
+	ENDIF
     d = d + delta
 NEXT i
 
-PEN cpen
-STROKE cstroke
-COLOR ccolor
+! draw curve
+PEN curve_pen
+STROKE curve_stroke
+COLOR curve_color
+LAYER curve_layer
+POLY2 N, 1, GET(N*2)
+! draw cross axis
 
-POLY2 N, 1, GET(N*2)
+IF show_ca THEN
+	PEN ca_pen
+	STROKE ca_stroke
+	COLOR ca_color
+	dn = d1 + L
+	FOR i = 1 TO ca_count
+		d = cross_axis_pos[i]
+		IF (d >= d1) AND (d <= dn) THEN 
+			${clothoid.point('x', 'y', 'A', 'd')}
+			${clothoid.tau('tau', 'A', 'd')}
+			dx = cross_axis_length / 2 * COS(tau)
+			dy = cross_axis_length / 2 * SIN(tau)
+			LINE2 x+dy, y-dx, x-dy, y+dx
+		ENDIF
+	NEXT i
+ENDIF
+
+! draw radius
+COLOR 6
+PEN 1
+STROKE 1
+IF show_r1 THEN
+	IF R1 > 0 THEN ! start from circle
+		d = d1
+		${clothoid.center('center_x', 'center_y', 'x1', 'y1', 'A', 'd')}	
+		LINE2 x1, y1, center_x, center_y
+	ENDIF
+ENDIF
+IF show_r2 THEN
+	d = d1 + L
+	${clothoid.center('center_x', 'center_y', 'xn', 'yn', 'A', 'd')}	
+	LINE2 xn, yn, center_x, center_y
+ENDIF
 
 END

File scripts/Klothoide.PartDialog.mako

+! Klothoide.smt
+! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
+! License: GPLv3, www.fsf.org
+
+I_PALETTE `Klothoide`, 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_PAGE `Klothoide`
+
+I_SECTION `Eigenschaften`
+I_INFIELD "N", 0, 0, 1, 1 
+I_INFIELD "A", 0, 0, 1, 1
+I_INFIELD "L", 0, 0, 1, 1
+I_INFIELD "R1", 0, 0, 1, 1 I_TOOLTIP `0 = beginnt als Gerade`
+I_INFIELD "show_r1", 0, 0, 1, 1
+I_INFIELD "R2", 0, 0, 1, 1
+I_INFIELD "show_r2", 0, 0, 1, 1
+I_SECTION_END
+
+I_SECTION `Format Kurve`
+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
+
+I_SECTION `Format Radien`
+I_INFIELD "radius_pen", 0, 0, 1, 1
+I_INFIELD "radius_stroke", 0, 0, 1, 1
+I_INFIELD "radius_color", 0, 0, 1, 1
+I_SECTION_END
+
+I_PAGE "Querachsen"
+
+I_SECTION `Eigenschaften`
+I_INFIELD "ca_count", 0, 0, 1, 1 I_TOOLTIP `maximale Anzahl = Größe Feld 'cross_axis_pos'`
+I_INFIELD "cross_axis_length", 0, 0, 1, 1
+I_INFIELD "show_ca", 0, 0, 1, 1
+I_SECTION_END
+
+I_SECTION `Format`
+I_INFIELD "ca_pen", 0, 0, 1, 1
+I_INFIELD "ca_stroke", 0, 0, 1, 1
+I_INFIELD "ca_color", 0, 0, 1, 1
+I_SECTION_END
+
+I_SECTION `Positionen` 
+I_INFIELD "cs_count", 0, 0, 1, 1
+
+FOR i = 1 TO ca_count
+  I_INFIELD_2 cross_axis_pos[i] , 0 , 0 , 1 , 1
+NEXT i
+I_SECTION_END 
+

File scripts/Klothoide.PartParameter.mako

 
 <%namespace name="clothoid" file="clothoid.mako" import="*" />
 
+VALUES "ca_count" RANGE [1, VARDIM1(cross_axis_pos)] STEP 1, 1
+
 IF GLOB_MODPAR_NAME = "L" THEN
 	${clothoid.distance('l1', 'A', 'R1')}
 	l2 = l1 + L

File scripts/Spline2.Part2D.mako

 ! 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
+	RECT2 x[cursor_pos]-cursor_size, y[cursor_pos]-cursor_size, x[cursor_pos]+cursor_size, y[cursor_pos]+cursor_size
 ENDIF
 
 END

File scripts/Spline2.PartDialog.mako

 ${controls()}
 
 I_SECTION `Werte` 
-I_ROW `X Koordinaten` , 0 
+I_ROW `X Koordinate` , 0 
 I_INFIELD_2 x[cursor_pos], 0 , 0 , 1 , 22
-I_ROW `Y Koordinaten` , 0 
+I_ROW `Y Koordinate` , 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
 
 <%def name="controls()">
 row_height = 35
-I_SECTION `Funktionen`
+I_SECTION `Cursor 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_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_INFIELD "cursor_size", 0, 0, 1, 1
 I_SECTION_END
 </%def>