Changeset 2625 in lmdz_wrf
- Timestamp:
- Jun 23, 2019, 1:50:52 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/geometry_tools.py
r2624 r2625 1587 1587 nvertexa=iNpts, nvertexb=Npts, nvertexab=iNpts*Npts, polya=ipoly, \ 1588 1588 polyb=poly) 1589 # We're in C-mode ! 1590 inti = inti-1 1591 intp = intp-1 1592 1593 # There is a need to sort the cutting points from the perspective of the 1594 # below polygon 1595 1589 1596 Npi=0 1590 1597 for ip in range(Nint): … … 1601 1608 if pip1 > Npts-1: pip1=0 1602 1609 1610 print ip, ': Lluis iip, iip1', iip, iip1, 'pip, pip1', pip, pip1 1611 1603 1612 iface = ipoly[iip,:]-poly[pip,:] 1604 1613 pface = poly[pip1,:]-poly[pip,:] … … 1613 1622 for iv in range(Npi,Npi+iip): newipoly.append(ipoly[iv,:]) 1614 1623 Npi = Npi + iip 1615 newipoly.append([gen.fillvalueF, gen.fillvalueF]) 1624 newipoly.append(pts[ip]) 1625 newipoly.append([gen.fillValueF, gen.fillValueF]) 1616 1626 1617 1627 elif efangle < 0.: 1618 1628 # Ending point of the cuted face to the left of the overlying polygon 1619 newipoly.append([gen.fillvalueF, gen.fillvalueF]) 1629 newipoly.append([gen.fillValueF, gen.fillValueF]) 1630 newipoly.append(pts[ip]) 1620 1631 newipoly.append(ipoly[iip1,:]) 1621 1632 Npi = iip1 … … 1623 1634 print errormsg 1624 1635 print ' ' + fname + ': No left point found !!' 1625 print ' for pile face' 1636 print ' crossing point number', ip, 'below polygon vertex:', \ 1637 inti[ip], 'above', intp[ip] 1638 print ' for pile face', poly[pip,:], '->', poly[pip1,:], \ 1639 'and below face', ipoly[iip,:], '->', ipoly[iip1,:] 1626 1640 1627 1641 pilepolygons[polyns[Npolys-1]] = newipoly 1628 1642 1643 for polyn in polyns: 1644 poly = pilepolygons[polyn] 1645 poly = ma.masked_equal(poly, gen.fillValueF) 1646 pilepolygons[polyn] = poly 1647 1629 1648 return pilepolygons 1630 1649
Note: See TracChangeset
for help on using the changeset viewer.