Index: /trunk/tools/geometry_tools.py
===================================================================
--- /trunk/tools/geometry_tools.py	(revision 2650)
+++ /trunk/tools/geometry_tools.py	(revision 2651)
@@ -40,4 +40,5 @@
 # rm_consecpt_polygon: Function to remove consecutive same point of a polygon
 # rotate_2D: Function to rotate a vector by a certain angle in the plain
+# rotate_objdic_2D: Function to rotate 2D plain the vertices of all polygons of an object
 # rotate_polygon_2D: Function to rotate 2D plain the vertices of a polygon
 # rotate_line2D: Function to rotate a line given by 2 pairs of x,y coordinates by a 
@@ -183,4 +184,25 @@
 
     return rotvecs
+
+def rotate_objdic_2D(objdic, angle):
+    """ Function to rotate 2D plain the vertices of all polygons of an object
+      objdic= dictionary with all the polygons of the object
+      angle= angle to rotate [rad]
+    """
+    fname = 'rotate_objdic_2D'
+
+    rotobjdic = dict(objdic)
+
+    for secn in objdic.keys():
+        objv = objdic[secn]
+        vectors = objv[0]
+        rotvecs = np.zeros(vectors.shape, dtype=np.float)
+
+        Nvecs = vectors.shape[0]
+        for iv in range(Nvecs):
+            rotvecs[iv,:] = rotate_2D(vectors[iv,:], angle)
+        rotobjdic[secn] = rotvecs
+
+    return rotobjdic
 
 def rotate_line2D(line, angle):
@@ -2519,5 +2541,5 @@
         lw = secv[3]
 
-        plt.plot(poly[:,1], poly[:,0], lt, color=lc, linewdith=lw)
+        plt.plot(poly[:,1], poly[:,0], lt, color=lc, linewidth=lw)
 
     return
Index: /trunk/tools/nautical.py
===================================================================
--- /trunk/tools/nautical.py	(revision 2650)
+++ /trunk/tools/nautical.py	(revision 2651)
@@ -347,5 +347,5 @@
             hsail = geo.circ_sec(bow, endsail, lsail*2.15)
     else:
-        hsail0 = p_sinusiode(length=lsail, amp=0.2, lamb=0.75, N=dpts)
+        hsail0, sailsec, saildic = geo.p_sinusiode(length=lsail, amp=0.2, lamb=0.75, N=dpts)
         hsail = np.zeros((dpts,2), dtype=np.float)
         hsail[:,0] = hsail0[:,1]
@@ -365,5 +365,5 @@
             msail = geo.circ_sec(endsail, begsail, lsail*2.15)
     else:
-        msail0 = p_sinusiode(length=lsail, amp=0.25, lamb=1., N=dpts)
+        msail0, sailsec, saildic = geo.p_sinusiode(length=lsail, amp=0.25, lamb=1., N=dpts)
         msail = np.zeros((dpts,2), dtype=np.float)
         msail[:,0] = msail0[:,1]
