Exemple #1
0
    rotated_graph = pylon_graph.copy_and_rotate_around_xy_plane(
        pylon_graph, 180)
    mirror_graph = pylon_graph.copy_and_offset_with_mirror(
        rotated_graph, [0, 0, 0], True)
    full_graph = pylon_graph.copy_and_rotate_around_xy_plane(mirror_graph, 90)
    final_graph = pylon_graph.sanitise_pylon(full_graph, width[1])
    pylon_graph.replace_graph(final_graph)
    return pylon_graph


testGraph = mutant()
testGraph.save_graph("test")

analyser = analyser.Analyser('test', "moo", True)
analyser.my_graph = testGraph
analyser.parse_graph()

#using medit to show the graph
meshName = "test.mesh"
cmd = "./population/linuxShow " + meshName
process = subprocess.Popen(cmd,
                           shell=True,
                           stdout=subprocess.PIPE,
                           stdin=subprocess.PIPE)
process.communicate()

#using slffea to show the mesh
#analyser.apply_stresses()
#analyser.create_slf_file()
#analyser.test_slf_file()
#analyser.parse_results()
Exemple #2
0
  pylon_graph.node[all_brace_ids[-1]]['label'] = 'ground'
  rotated_graph = pylon_graph.copy_and_rotate_around_xy_plane(pylon_graph,180)
  mirror_graph = pylon_graph.copy_and_offset_with_mirror(rotated_graph, [0, 0, 0], True)
  full_graph = pylon_graph.copy_and_rotate_around_xy_plane(mirror_graph, 90)
  final_graph = pylon_graph.sanitise_pylon(full_graph, width[1])
  pylon_graph.replace_graph(final_graph)
  return pylon_graph



testGraph = mutant()
testGraph.save_graph("test")

analyser = analyser.Analyser('test',"moo",True)
analyser.my_graph=testGraph
analyser.parse_graph()


#using medit to show the graph
meshName = "test.mesh"
cmd = "./population/linuxShow "+meshName
process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
process.communicate()

#using slffea to show the mesh
#analyser.apply_stresses()
#analyser.create_slf_file()
#analyser.test_slf_file()
#analyser.parse_results()
#analyser.print_stresses()
#analyser.show_analysis()
Exemple #3
0
origin = (0,0,0)
length = 3
tetra = tetGraph()
tetra.regular(origin, length)
#tetra.levels(origin,length,3)


verts = tetra.fourtet(origin,length)
tetra.fourtet(verts[1],length)
tetra.fourtet(verts[2],length)
tetra.fourtet(verts[3],length)
tetra.octet(origin,length)
#tetra.square([0,0,3],3)
tetra.multi4(tetra.square,origin,3)
#tetra.four_aligned(origin,length)


print "final frame: ",str(tetra.g.nodeCounter-1)

#will it blend?
analyser = analyser.Analyser('test',"moo",True)
analyser.myGraph=tetra.g
analyser.parse_graph(tetra.g)
analyser.apply_stresses()
analyser.create_slf_file()
analyser.test_slf_file()
analyser.parse_results()
analyser.print_stresses()
analyser.show_analysis()