Ejemplo n.º 1
0
def test_section_meander_angles():
    s0 = Section(np.array([[0, 0, 0],
                           [1, 0, 0],
                           [2, 0, 0],
                           [3, 0, 0],
                           [4, 0, 0]]))

    nt.assert_equal(_sf.section_meander_angles(s0),
                    [math.pi, math.pi, math.pi])

    s1 = Section(np.array([[0, 0, 0],
                           [1, 0, 0],
                           [1, 1, 0],
                           [2, 1, 0],
                           [2, 2, 0]]))

    nt.assert_equal(_sf.section_meander_angles(s1),
                    [math.pi / 2, math.pi / 2, math.pi / 2])

    s2 = Section(np.array([[0, 0, 0],
                           [0, 0, 1],
                           [0, 0, 2],
                           [0, 0, 0]]))

    nt.assert_equal(_sf.section_meander_angles(s2),
                    [math.pi, 0.])
Ejemplo n.º 2
0
def test_section_meander_angles():
    s0 = Section(np.array([[0, 0, 0],
                           [1, 0, 0],
                           [2, 0, 0],
                           [3, 0, 0],
                           [4, 0, 0]]))

    nt.assert_equal(_sf.section_meander_angles(s0),
                    [math.pi, math.pi, math.pi])

    s1 = Section(np.array([[0, 0, 0],
                           [1, 0, 0],
                           [1, 1, 0],
                           [2, 1, 0],
                           [2, 2, 0]]))

    nt.assert_equal(_sf.section_meander_angles(s1),
                    [math.pi / 2, math.pi / 2, math.pi / 2])

    s2 = Section(np.array([[0, 0, 0],
                           [0, 0, 1],
                           [0, 0, 2],
                           [0, 0, 0]]))

    nt.assert_equal(_sf.section_meander_angles(s2),
                    [math.pi, 0.])
Ejemplo n.º 3
0
def test_section_meander_angles_single_segment():
    s = Section(np.array([[0, 0, 0], [1, 1, 1]]))
    nt.assert_equal(len(_sf.section_meander_angles(s)), 0)
Ejemplo n.º 4
0
def test_section_meander_angles_single_segment():
    s = Section(np.array([[0, 0, 0], [1, 1, 1]]))
    nt.assert_equal(len(_sf.section_meander_angles(s)), 0)