Commits

Manfred Moitzi committed 135b50a

reset uuid of smartpart at every compiler run

Comments (0)

Files changed (8)

.idea/workspace.xml

 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="d10fe02a-bdc8-4418-9494-70adbe7601f3" name="Default" comment="">
+      <change type="DELETED" beforePath="O:\Office\MySmartParts\mako2smt\scripts\CurvedText.Part3D.mako" afterPath="" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Curved3DText.smt" afterPath="$PROJECT_DIR$/Curved3DText.smt" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/CurvedText.smt" afterPath="$PROJECT_DIR$/CurvedText.smt" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/basic.mako" afterPath="$PROJECT_DIR$/lib/basic.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/scripts/Curved3DText.Part3D.mako" afterPath="$PROJECT_DIR$/scripts/Curved3DText.Part3D.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/scripts/CurvedText.Part2D.mako" afterPath="$PROJECT_DIR$/scripts/CurvedText.Part2D.mako" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/mako2smt.py" afterPath="$PROJECT_DIR$/src/mako2smt.py" />
     </list>
     <ignored path="mako2smt.iws" />
     <ignored path=".idea/workspace.xml" />
   <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
   <component name="FileEditorManager">
     <leaf>
-      <file leaf-file-name="Spline2.Part2D.mako" pinned="false" current="true" current-in-tab="true">
+      <file leaf-file-name="Spline2.Part2D.mako" pinned="false" current="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/scripts/Spline2.Part2D.mako">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="20" column="0" selection-start="383" selection-end="383" vertical-scroll-proportion="0.33797216">
+            <state line="20" column="0" selection-start="383" selection-end="383" vertical-scroll-proportion="-13.6">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="mako2smt.py" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/mako2smt.py">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="194" column="0" selection-start="6888" selection-end="6888" vertical-scroll-proportion="0.25024247">
               <folding />
             </state>
           </provider>
   <component name="IdeDocumentHistory">
     <option name="changedFiles">
       <list>
-        <option value="$PROJECT_DIR$/ibeams/scripts/HE-A.PartParameter.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-B.data.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-B.Part3D.mako" />
         <option value="$PROJECT_DIR$/ibeams/scripts/HE-B.PartDialog.mako" />
         <option value="$PROJECT_DIR$/scripts/Spline2.PartParameter.mako" />
         <option value="$PROJECT_DIR$/scripts/Spline2.PartDialog.mako" />
         <option value="$PROJECT_DIR$/scripts/Spline2.Part2D.mako" />
+        <option value="$PROJECT_DIR$/src/mako2smt.py" />
       </list>
     </option>
   </component>
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
             <PATH_ELEMENT>
-              <option name="myItemId" value="scripts" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="mako2smt" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="mako2smt" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="lib" />
+              <option name="myItemId" value="src" />
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
           </PATH>
     <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="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.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.30298012" sideWeight="0.67045456" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.21909492" 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" />
     </breakpoint-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/scripts/Klothoide.PartParameter.mako">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/scripts/Klothoide.Part2D.mako">
       <provider selected="true" editor-type-id="text-editor">
         <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
     </entry>
     <entry file="file://$PROJECT_DIR$/scripts/Spline2.Part2D.mako">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="20" column="0" selection-start="383" selection-end="383" vertical-scroll-proportion="0.33797216">
+        <state line="20" column="0" selection-start="383" selection-end="383" vertical-scroll-proportion="-13.6">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/mako2smt.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="194" column="0" selection-start="6888" selection-end="6888" vertical-scroll-proportion="0.25024247">
           <folding />
         </state>
       </provider>
 FOR i = 1 TO VARDIM1(chars)
 	! bezier parameter t = RANGE [0, 1]
 	t = pos / length_of_text 
-    ! get point on bezier curve at position 't'
+    ! bezier curve: get point at position 't'
 	bezier_factor[1] = (1.0 - t)^3
 	bezier_factor[2] = 3.0 * (1.0 - t)^2 * t
 	bezier_factor[3] = 3.0 * (1.0 - t) * t^2
 	GOSUB "bezier_calc"
 	x = result[1]
 	y = result[2]
-	! get tangent on bezier curve at position 't'
+	! bezier curve: get tangent at position 't'
 	bezier_factor[1] = -3.0 * (1.0 - t)^2
 	bezier_factor[2] =  3.0 * (1.0 - 4.0 * t + 3.0 * t^2)
 	bezier_factor[3] =  3.0 * t * (2.0 - 3.0 * t)
 	vx = result[1]
 	vy = result[2]
 	GOSUB "vector_to_angle" 
-	! result: alpha = angle of curve tangent
-	IF i = 1 THEN ! store direction perpendicular to tangent of first character
-		size_handle_vx = -vy
-		size_handle_vy = vx
-	ENDIF
-	! place character at x,y with rotation alpha
 	
 TRANS x, y, 0
 ROTZ alpha
 HANDLE (-1), (bezier_points[4][2]), (0), 4, bezier_points[4][1], 3
 
 
-! place text size handle
+END
+
+!--------------------------------------------------------------
+
+"place_text_size_ handle":
 x = bezier_points[1][1]
 y = bezier_points[1][2]
 
 ! calibrate handle
 HANDLEFACTOR text_size/real_text_height
 
+! place character size handle
+HANDLE2 (x), (y), 5, text_size, 1
+HANDLE2 (x+dx), (y+dy), 5, text_size, 2
+HANDLE2 (x-dx), (y-dy), 5, text_size, 3
+RETURN
 
-! place text size handle
-!HANDLE (x), (y), (0), 5, text_size, 1
-!HANDLE (x+dx), (y+dy), (0), 5, text_size, 2
-!HANDLE (x-dx), (y-dy), (0), 5, text_size, 3
 
-! reset handle factor
-HANDLEFACTOR 1
-
-! place text heigth handle
-!HANDLE (x), (y), (0), 6, ref_z, 1
-!HANDLE (x), (y), (ref_z), 6, ref_z, 2
-!HANDLE (x), (y), (-1), 6, ref_z, 3
-
-
-END
-
-!--------------------------------------------------------------
 "str2Array":
 DIM chars[STRLEN(curved_text)]
 FOR __i__ = 1 TO STRLEN(curved_text)
 
 
 
-
-
-
-
-
 ]]></Text>
 </Part3D>
 <PartDialog>
 <LibPath><![CDATA[]]></LibPath>
 <Type>1</Type>
 <SubType>0</SubType>
-<UUID>edf885d0-0aa7-47ab-8aa4-306a35746fde</UUID>
+<UUID>4ffd75be-d7f3-46b0-9336-8652edc69efb</UUID>
 <Language>de</Language>
 <StringTable>
 </StringTable>
 FOR i = 1 TO VARDIM1(chars)
 	! bezier parameter t = RANGE [0, 1]
 	t = pos / length_of_text 
-    ! get point on bezier curve at position 't'
+    ! bezier curve: get point at position 't'
 	bezier_factor[1] = (1.0 - t)^3
 	bezier_factor[2] = 3.0 * (1.0 - t)^2 * t
 	bezier_factor[3] = 3.0 * (1.0 - t) * t^2
 	GOSUB "bezier_calc"
 	x = result[1]
 	y = result[2]
-	! get tangent on bezier curve at position 't'
+	! bezier curve: get tangent at position 't'
 	bezier_factor[1] = -3.0 * (1.0 - t)^2
 	bezier_factor[2] =  3.0 * (1.0 - 4.0 * t + 3.0 * t^2)
 	bezier_factor[3] =  3.0 * t * (2.0 - 3.0 * t)
 	vx = result[1]
 	vy = result[2]
 	GOSUB "vector_to_angle" 
+	
 	! result: alpha = angle of curve tangent
 	IF i = 1 THEN ! store direction perpendicular to tangent of first character
 		size_handle_vx = -vy
 		size_handle_vy = vx
 	ENDIF
 	! place character at x,y with rotation alpha
-	
 	TRANS2 x, y
 	ROT2 alpha
 	SCALE2 char_width_factor, 1.0
 HANDLE2 (bezier_points[4][1]), (bezier_points[4][2]), 4, bezier_points[4][1], 2
 HANDLE2 (-1), (bezier_points[4][2]), 4, bezier_points[4][1], 3
 
+GOSUB "place_text_size_ handle"
 
-! place text size handle
+
+
+END
+
+!--------------------------------------------------------------
+
+"place_text_size_ handle":
 x = bezier_points[1][1]
 y = bezier_points[1][2]
 
 ! calibrate handle
 HANDLEFACTOR text_size/real_text_height
 
-
 ! place character size handle
 HANDLE2 (x), (y), 5, text_size, 1
 HANDLE2 (x+dx), (y+dy), 5, text_size, 2
 HANDLE2 (x-dx), (y-dy), 5, text_size, 3
+RETURN
 
 
-END
-
-!--------------------------------------------------------------
 "str2Array":
 DIM chars[STRLEN(curved_text)]
 FOR __i__ = 1 TO STRLEN(curved_text)
 
 
 
-
-
-
-
-
 ]]></Text>
 </Part2D>
 <Part3D>
 ############################################################
 ##  H A N D L E S
 ############################################################
-
 <%def name="bas_handle2(x, y, param, id='id')" filter="trim">
 HANDLE2 (${x}), (${y}), ${id}, ${param}, 1
 </%def>
 HANDLE (${x}), (${y}), (${z}), ${id}, ${param}, 3
 </%def>
 
-<%def name="create_x_handle2(x=0, y=0, length='ref_x', param='ref_x', id='id', dir=-1)" filter="trim">
-${bas_handle2(x, y, param, id)}
-${mov_handle2("{}+{}".format(x, length), y, param, id)}
-${ref_handle2(dir, y, param, id)}
-${id} = ${id} + 1
+## HANDLE2 shortcuts
+## create 2D handles for param 'X' and 'Y' 
+## basepoint is (0, 0)
+<%def name="xy_handle2(x, y, id)" filter="trim">
+${y_handle2_at_x(y, x, id)}
+${x_handle2_at_y(x, y, id)}
 </%def>
 
-<%def name="create_y_handle2(x=0, y=0, length='ref_y', param='ref_y', id='id', dir=-1)" filter="trim">
-${bas_handle2(x, y, param, id)}
-${mov_handle2(x, "{}+{}".format(y, length), param, id)}
-${ref_handle2(x, dir, param, id)}
-${id} = ${id} + 1
+## create a 2D x-direction handle at position y for param x, base = 0
+<%def name="x_handle2_at_y(x, y, id)" filter="trim">
+${bas_handle2( 0, y, x, id)}
+${mov_handle2( x, y, x, id)}
+${ref_handle2(-1, y, x, id)}
 </%def>
 
-############################################################
-##  P R O F I L I N G
-############################################################
-## Profiling is only meaningful, if the runtime is in the
-## range of many seconds or more! Try to enclose your
-## program in a loop and run it 1000x or more!
-
-<%def name="start_profiling()">
-REQEST("DateTime", "%X", __profiling_start_time__)
+## create a 2D y-direction handle at position x  for param y, base = 0
+<%def name="y_handle2_at_x(y, x, id)" filter="trim">
+${bas_handle2(x,  0, y, id)}
+${mov_handle2(x,  y, y, id)}
+${ref_handle2(x, -1, y, id)}
 </%def>
-
-<%def name="stop_profiling()">
-REQEST("DateTime", "%X", __profiling_stop_time__)
-</%def>
-
-<%def name="get_profiling_result(result)">
-    <%def name="get_seconds(resvar, timestr)">
-    SPLIT(${timestr}, "%n:%n:%n", __profiling_hours__, __profiling_minutes__, __profiling_seconds__)
-    ${resvar} = __profiling_hours__ * 3600 + __profiling_minutes__ * 60 + __profiling_seconds__
-    </%def>
-! Get profiling result in seconds
-${get_seconds("__seconds_at_start__", "__profiling_start_time__")}
-${get_seconds("__seconds_at_stop__", "__profiling_stop_time__")}
-! if result < 0, then profiling runs at midnight, just add 86400 seconds
-${result} = __seconds_at_stop__ - __seconds_at_start__
-</%def>

scripts/Curved3DText.Part3D.mako

 RESTORE 2
 </%block>
 
-<%block name="create_bezier_handles">
+<%block name="create_handles">
 ! place handle for bezier point (1)
 ${xy_handle('bezier_points[1][1]', 'bezier_points[1][2]', 1)}
 
 ${xy_handle('bezier_points[4][1]', 'bezier_points[4][2]', 4)}
 </%block>
 
-<%block name="create_size_handles">
-! place text size handle
-!${bas_handle('x', 'y', 0, 'text_size', 5)}
-!${mov_handle('x+dx', 'y+dy', 0, 'text_size', 5)}
-!${ref_handle('x-dx', 'y-dy', 0, 'text_size', 5)}
-
-! reset handle factor
-HANDLEFACTOR 1
-
-! place text heigth handle
-!${bas_handle('x', 'y', 0, 'ref_z', 6)}
-!${mov_handle('x', 'y', 'ref_z', 'ref_z', 6)}
-!${ref_handle('x', 'y', -1, 'ref_z', 6)}
-</%block>
-
 END
 !--------------------------------------------------------------
 <%def name="xy_handle(x, y, id)" filter="trim">

scripts/CurvedText.Part2D.mako

 ! bezier_points[n][i] ... n=point number, i=axis (1=x-axis, 2=y-axis)
 ! global bezier curve definition points
 
-<%namespace file="basic.mako" import="bas_handle2, mov_handle2, ref_handle2, str2array" />
+<%namespace file="basic.mako" import="bas_handle2, mov_handle2, ref_handle2, str2array, xy_handle2" />
 <%namespace file="math.mako" import="atan2" />
 
 <%block name="axis_definition">
 	vx = result[1]
 	vy = result[2]
 	GOSUB "vector_to_angle" 
+	<%block name="place_char">
 	! result: alpha = angle of curve tangent
 	IF i = 1 THEN ! store direction perpendicular to tangent of first character
 		size_handle_vx = -vy
 		size_handle_vy = vx
 	ENDIF
 	! place character at x,y with rotation alpha
-	<%block name="place_char">
 	TRANS2 x, y
 	ROT2 alpha
 	SCALE2 char_width_factor, 1.0
 	pos = pos + STW(chars[i])
 NEXT i
 
-<%block name="create_bezier_handles">
+<%block name="create_handles">
 ! place handle for bezier point (1)
-${xy_handle('bezier_points[1][1]', 'bezier_points[1][2]', 1)}
+${xy_handle2('bezier_points[1][1]', 'bezier_points[1][2]', 1)}
 
 ! place handle for bezier point (2)
-${xy_handle('bezier_points[2][1]', 'bezier_points[2][2]', 2)}
+${xy_handle2('bezier_points[2][1]', 'bezier_points[2][2]', 2)}
 
 ! place handle for bezier point (3)
-${xy_handle('bezier_points[3][1]', 'bezier_points[3][2]', 3)}
+${xy_handle2('bezier_points[3][1]', 'bezier_points[3][2]', 3)}
 
 ! place handle for bezier point (4)
-${xy_handle('bezier_points[4][1]', 'bezier_points[4][2]', 4)}
+${xy_handle2('bezier_points[4][1]', 'bezier_points[4][2]', 4)}
+
+GOSUB "place_text_size_ handle"
+
 </%block>
 
-! place text size handle
+END
+
+!--------------------------------------------------------------
+<%block name="place_text_size_handle">
+"place_text_size_ handle":
 x = bezier_points[1][1]
 y = bezier_points[1][2]
 
 ! calibrate handle
 HANDLEFACTOR text_size/real_text_height
 
-<%block name="create_size_handles">
 ! place character size handle
 ${bas_handle2('x', 'y', 'text_size', 5)}
 ${mov_handle2('x+dx', 'y+dy', 'text_size', 5)}
 ${ref_handle2('x-dx', 'y-dy', 'text_size', 5)}
+RETURN
 </%block>
 
-END
-
-!--------------------------------------------------------------
 "str2Array":
 ${str2array('chars', 'curved_text')}
 RETURN
 RETURN
 !--------------------------------------------------------------
 <%def name="bezier_point(t)" filter="trim">
-	! get point on bezier curve at position 't'
+	! bezier curve: get point at position 't'
 	bezier_factor[1] = (1.0 - ${t})^3
 	bezier_factor[2] = 3.0 * (1.0 - ${t})^2 * t
 	bezier_factor[3] = 3.0 * (1.0 - ${t}) * t^2
 </%def>
 
 <%def name="bezier_tangent(t)" filter="trim">
-	! get tangent on bezier curve at position 't'
+	! bezier curve: get tangent at position 't'
 	bezier_factor[1] = -3.0 * (1.0 - ${t})^2
 	bezier_factor[2] =  3.0 * (1.0 - 4.0 * ${t} + 3.0 * ${t}^2)
 	bezier_factor[3] =  3.0 * ${t} * (2.0 - 3.0 * ${t})
 	bezier_factor[4] =  3.0 * ${t}^2
 	GOSUB "bezier_calc"
 </%def>
-
-<%def name="xy_handle(x, y, id)" filter="trim">
-${y_handle_at_x(y, x, id)}
-${x_handle_at_y(x, y, id)}
-</%def>
-
-<%def name="x_handle_at_y(x, y, id)" filter="trim">
-${bas_handle2( 0, y, x, id)}
-${mov_handle2( x, y, x, id)}
-${ref_handle2(-1, y, x, id)}
-</%def>
-
-<%def name="y_handle_at_x(y, x, id)" filter="trim">
-${bas_handle2(x,  0, y, id)}
-${mov_handle2(x,  y, y, id)}
-${ref_handle2(x, -1, y, id)}
-</%def>

scripts/CurvedText.Part3D.mako

-! CurvedText
-! (c) 2012, Manfred Moitzi, smartparts.tzb-moitzi.at
-! License: GPLv3, www.fsf.org
-
-<%inherit file="CurvedText.Part2D.mako"/>
-<%namespace file="basic.mako" import="bas_handle, mov_handle, ref_handle" />
-
-<%block name="place_char">
-TRANS x, y, 0
-ROTZ alpha
-IF PREV_MODE THEN
-	TRANSX -real_text_height/2
-	BOX real_text_height, real_text_height, ref_z
-	RESTORE 1
-ELSE
-	TEXT ref_z, 1, chars[i]
-ENDIF
-RESTORE 2
-</%block>
-
-<%block name="create_bezier_handles">
-! place handle for bezier point (1)
-${xy_handle('bezier_points[1][1]', 'bezier_points[1][2]', 1)}
-
-! place handle for bezier point (2)
-${xy_handle('bezier_points[2][1]', 'bezier_points[2][2]', 2)}
-
-! place handle for bezier point (3)
-${xy_handle('bezier_points[3][1]', 'bezier_points[3][2]', 3)}
-
-! place handle for bezier point (4)
-${xy_handle('bezier_points[4][1]', 'bezier_points[4][2]', 4)}
-</%block>
-
-<%block name="create_size_handles">
-! place text size handle
-${bas_handle('x', 'y', 0, 'text_size', 5)}
-${mov_handle('x+dx', 'y+dy', 0, 'text_size', 5)}
-${ref_handle('x-dx', 'y-dy', 0, 'text_size', 5)}
-
-! reset handle factor
-HANDLEFACTOR 1
-
-! place text heigth handle
-${bas_handle('x', 'y', 0, 'ref_z', 6)}
-${mov_handle('x', 'y', 'ref_z', 'ref_z', 6)}
-${ref_handle('x', 'y', -1, 'ref_z', 6)}
-</%block>
-
-END
-!--------------------------------------------------------------
-<%def name="xy_handle(x, y, id)" filter="trim">
-${y_handle_at_x(y, x, id)}
-${x_handle_at_y(x, y, id)}
-</%def>
-
-<%def name="x_handle_at_y(x, y, id)" filter="trim">
-${bas_handle( 0, y, 0, x, id)}
-${mov_handle( x, y, 0, x, id)}
-${ref_handle(-1, y, 0, x, id)}
-</%def>
-
-<%def name="y_handle_at_x(y, x, id)" filter="trim">
-${bas_handle(x,  0, 0, y, id)}
-${mov_handle(x,  y, 0, y, id)}
-${ref_handle(x, -1, 0, y, id)}
-</%def>
 import os
 import argparse
 import configparser
+from uuid import uuid4
 
 from lxml import etree
 from mako.lookup import TemplateLookup
     with open(filename, 'wt') as fp:
         config.write(fp)
 
+def reset_uuid(smt_xml_root):
+    tags = smt_xml_root.xpath('/ScriptObject/UUID')
+    if len(tags):
+        tags[0].text = str(uuid4())
+
 def get_xml_root_from_smartpart_script(filename):
     # SmartPart-Script (*.smt) files are 'UTF-8' encoded XML files with embedded Part scripts encoded as
     # 'iso-8859-1' ASCII characters, enclosed into <![CDATA[]]> sections!!!
         self.debug = debug
         self.config = read_smartpart_config(config_filename(filename))
         self.xml_root = get_xml_root_from_smartpart_script(filename)
+        reset_uuid(self.xml_root)
 
     def update_all_part_scripts(self):
         for part_script_name in self.SCRIPTS: