Exemplo n.º 1
0
def test_azimuth():
    """test the azimuth of a polygon poly"""
    data = (([(0,0,0), (1,0,0), (1,1,1), (0,1,1)],180),# polygon, answer,
            ([(0,0,0), (1,0,0), (1,1,0), (0,1,0)],0),
            ([(3.571913,-9.390334,1.487381), (10.905826,-6.194443,1.487381),                 (8.998819,-1.818255,0.0), (1.664906, -5.014146, 0.0)],360 - 23.546134),
            )
    for poly,answer in data:
        result = surface.azimuth(poly)
        assert almostequal(answer, result, places=3) == True
Exemplo n.º 2
0
def test_azimuth():
    """test the azimuth of a polygon poly"""
    data = (
        ([(0, 0, 0), (1, 0, 0), (1, 1, 1),
          (0, 1, 1)], 180),  # polygon, answer,
        ([(0, 0, 0), (1, 0, 0), (1, 1, 0), (0, 1, 0)], 0),
        ([(3.571913, -9.390334, 1.487381), (10.905826, -6.194443, 1.487381),
          (8.998819, -1.818255, 0.0),
          (1.664906, -5.014146, 0.0)], 360 - 23.546134),
    )
    for poly, answer in data:
        result = surface.azimuth(poly)
        assert almostequal(answer, result, places=3) == True
Exemplo n.º 3
0
def azimuth(ddtt):
    """azimuth of the surface"""
    coords = getcoords(ddtt)
    return g_surface.azimuth(coords)
Exemplo n.º 4
0
def azimuth(ddtt):
    """azimuth of the surface"""
    coords = getcoords(ddtt)
    return g_surface.azimuth(coords)