#display.DisplayShape(aShape) # then the mesh aDS = SMESH_MeshVSLink(the_mesh) aMeshVS = MeshVS_Mesh(True) DMF = 1 # to wrap! MeshVS_BP_Mesh = 5 # To wrap! aPrsBuilder = MeshVS_MeshPrsBuilder(aMeshVS.GetHandle(), DMF, aDS.GetHandle(), 0, MeshVS_BP_Mesh) aMeshVS.SetDataSource(aDS.GetHandle()) aMeshVS.AddBuilder(aPrsBuilder.GetHandle(), True) #Create the graphic window and display the mesh context = my_context.display.Context context.Display(aMeshVS.GetHandle()) old_mesh_to_erase = aMeshVS.GetHandle() context.Deactivate(aMeshVS.GetHandle()) #display.DisplayShape(the_shape) display.FitAll() my_context.register_post_solver_callback(mesh_and_display) # # Modify parameters # for i in range(14, 30): print 'changed parameter p.Z2 and p.Y2 from %s to %s' % (i - 1, i) p.Z2 = i p.R1 += 0.2 #print my_context.get_shapes() start_display()
# then redisplay the shape #display.DisplayShape(aShape) # then the mesh aDS = SMESH_MeshVSLink(the_mesh) aMeshVS = MeshVS_Mesh(True) DMF = 1 # to wrap! MeshVS_BP_Mesh = 5 # To wrap! aPrsBuilder = MeshVS_MeshPrsBuilder(aMeshVS.GetHandle(),DMF,aDS.GetHandle(),0,MeshVS_BP_Mesh) aMeshVS.SetDataSource(aDS.GetHandle()) aMeshVS.AddBuilder(aPrsBuilder.GetHandle(),True) #Create the graphic window and display the mesh context = my_context.display.Context context.Display(aMeshVS.GetHandle()) old_mesh_to_erase = aMeshVS.GetHandle() context.Deactivate(aMeshVS.GetHandle()) #display.DisplayShape(the_shape) display.FitAll() my_context.register_post_solver_callback(mesh_and_display) # # Modify parameters # for i in range(14,30): print 'changed parameter p.Z2 and p.Y2 from %s to %s' % ( i-1, i ) p.Z2 = i p.R1 += 0.2 #print my_context.get_shapes() start_display()