def test_add_orientation_with_pole(create_surfaces): orientations = gp.Orientations(create_surfaces) orientations.add_orientation(1, 1, 1, 'foo', pole_vector=(1, 0, 1)) orientations.add_orientation(2, 2, 2, 'foo', orientation=(0, 0, 1)) orientations.add_orientation(1, 1, 1, 'foo', pole_vector=(.45, 0, .45)) orientations.modify_orientations(2, G_x=1, G_z=1) print(orientations)
def create_orientations(create_surfaces, create_series): surfaces = create_surfaces # ### Orientations orientations = gp.Orientations(surfaces) print(orientations) # ### Set values passing pole vectors: orientations.set_orientations( np.random.rand(6, 3) * 10, np.random.rand(6, 3), surface=['foo', 'foo5', 'lala', 'foo5', 'lala', 'feeeee']) print(orientations) # ### Set values pasing orientation data: azimuth, dip, pole (dip direction) orientations.set_orientations( np.random.rand(6, 3) * 10, orientation=np.random.rand(6, 3) * 20, surface=['foo', 'foo5', 'lala', 'foo5', 'lala', 'feeeee']) print(orientations) # ### Mapping data from the other df orientations.map_data_from_surfaces(surfaces, 'series') print(orientations) orientations.map_data_from_surfaces(surfaces, 'id') print(orientations) orientations.map_data_from_series(create_series, 'order_series') print(orientations) orientations.update_annotations() return orientations
def test_read_orientations(self): orientations = gp.Orientations() orientations.read_orientations( os.pardir + "/input_data/FabLessPoints_Foliations.csv", inplace=True) return orientations