Beispiel #1
0
world.add(L1_topomesh,'L1_adjacency_complex')
world['L1_adjacency_complex'].set_attribute('display_3',False)
world['L1_adjacency_complex'].set_attribute('display_2',True)
world['L1_adjacency_complex_faces'].set_attribute('polydata_colormap',load_colormaps()['grey'])
world['L1_adjacency_complex_faces'].set_attribute('intensity_range',(-1,0))
world['L1_adjacency_complex'].set_attribute('coef_2',0.98)
world['L1_adjacency_complex_faces'].set_attribute('x_slice',(30,70))
world['L1_adjacency_complex_faces'].set_attribute('display_colorbar',False)
world['L1_adjacency_complex_faces'].set_attribute('preserve_faces',True)
world['L1_adjacency_complex'].set_attribute('display_0',True)
world['L1_adjacency_complex_vertices'].set_attribute('point_radius',2.*draco.triangulation_topomesh.nb_wisps(0))
world['L1_adjacency_complex_vertices'].set_attribute('x_slice',(30,70))
world['L1_adjacency_complex_vertices'].set_attribute('display_colorbar',False)


draco.triangulation_topomesh = L1_topomesh
triangular= ['star']
image_dual_topomesh = draco.dual_reconstruction(reconstruction_triangulation = triangular, adjacency_complex_degree=2)
#image_dual_topomesh = draco.draco_topomesh(reconstruction_triangulation = triangular)

world.add(image_dual_topomesh ,'L1_dual_reconstuction')
raw_input()


triangular_string = ""
for t in triangular:
    triangular_string += t+"_"
topomesh_filename = dirname+"/output_meshes/"+filename+"/"+filename+"_draco_stem_L1_"+triangular_string+"topomesh.ply"

save_ply_property_topomesh(image_dual_topomesh,topomesh_filename,color_faces=True)
Beispiel #2
0
world['L1_adjacency_complex'].set_attribute('display_3', False)
world['L1_adjacency_complex'].set_attribute('display_2', True)
world['L1_adjacency_complex_faces'].set_attribute('polydata_colormap',
                                                  load_colormaps()['grey'])
world['L1_adjacency_complex_faces'].set_attribute('intensity_range', (-1, 0))
world['L1_adjacency_complex'].set_attribute('coef_2', 0.98)
world['L1_adjacency_complex_faces'].set_attribute('x_slice', (30, 70))
world['L1_adjacency_complex_faces'].set_attribute('display_colorbar', False)
world['L1_adjacency_complex_faces'].set_attribute('preserve_faces', True)
world['L1_adjacency_complex'].set_attribute('display_0', True)
world['L1_adjacency_complex_vertices'].set_attribute(
    'point_radius', 2. * draco.triangulation_topomesh.nb_wisps(0))
world['L1_adjacency_complex_vertices'].set_attribute('x_slice', (30, 70))
world['L1_adjacency_complex_vertices'].set_attribute('display_colorbar', False)

draco.triangulation_topomesh = L1_topomesh
triangular = ['star']
image_dual_topomesh = draco.dual_reconstruction(
    reconstruction_triangulation=triangular, adjacency_complex_degree=2)
#image_dual_topomesh = draco.draco_topomesh(reconstruction_triangulation = triangular)

world.add(image_dual_topomesh, 'L1_dual_reconstuction')
raw_input()

triangular_string = ""
for t in triangular:
    triangular_string += t + "_"
topomesh_filename = dirname + "/output_meshes/" + filename + "/" + filename + "_draco_stem_L1_" + triangular_string + "topomesh.ply"

save_ply_property_topomesh(image_dual_topomesh,
                           topomesh_filename,