Changeset 2653 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 30, 2019, 4:58:23 PM (6 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/geometry_tools.py
r2652 r2653 28 28 # cut_[x/y]polygon: Function to cut a polygon from a given value of the [x/y]-axis 29 29 # deg_deci: Function to pass from degrees [deg, minute, sec] to decimal angles [rad] 30 # displace_objdic_2D: Function to displace 2D plain the vertices of all polygons of an object 30 31 # dist_points: Function to provide the distance between two points 31 32 # join_circ_sec: Function to join aa series of points by circular segments … … 184 185 185 186 return rotvecs 187 188 def displace_objdic_2D(objdic, distance): 189 """ Function to displace 2D plain the vertices of all polygons of an object 190 objdic= dictionary with all the polygons of the object 191 distance= distance to displace [ydist, xdist] 192 """ 193 fname = 'displace_objdic_2D' 194 195 disobjdic = dict(objdic) 196 197 for secn in objdic.keys(): 198 objv = objdic[secn] 199 vectors = objv[0] 200 lt = objv[1] 201 lc = objv[2] 202 lw = objv[3] 203 204 disvecs = np.zeros(vectors.shape, dtype=np.float) 205 disvecs = vectors + distance 206 disobjdic[secn] = [disvecs, lt, lc, lw] 207 208 return disobjdic 186 209 187 210 def rotate_objdic_2D(objdic, angle): -
trunk/tools/nautical.py
r2651 r2653 1453 1453 'length': ['length', 'eslora', np.array([[x0,yn,zx], [x0,yx,zx]])], \ 1454 1454 'beam': ['beam', 'manga', np.array([[xn,y0,zx], [xx,y0,zx]])], \ 1455 'freeboard': ['freeboard (air \ndraught)', 'francobordo (obra \nviva) ',\1455 'freeboard': ['freeboard (air \ndraught)', 'francobordo (obra \nviva)\n carena', \ 1456 1456 np.array([[xn,yn,zlf], [xn,yn,zx]])], \ 1457 1457 'draught': ['draught', 'calado (obra \nmuerta)', \
Note: See TracChangeset
for help on using the changeset viewer.