Hello, i am currently generating a volume through the sweeping of a surface through cubit commands. Is it possible to do the same thing through the Python API?
For extra information, the commands i’m currently using to create the volume are:
cubit.cmd( f"Create Surface vertex {List of vertices} delete")
SurfID = cubit.get_last_id(“surface”)
cubit.cmd(f"sweep surface {SurfID} zaxis angle 360")
Hi,
Just looking at your command, what you are doing should work. The following works when I create the vertices first.
Karl
cubit.cmd('reset')
v1 = cubit.create_vertex(1, 0, 0)
v2 = cubit.create_vertex(3, 0, 0)
v3 = cubit.create_vertex(3, 0, 1)
v4 = cubit.create_vertex(1, 0, 1)
cubit.cmd( f"Create Surface vertex {v1.id()} {v2.id()} {v3.id()} {v4.id()} delete")
SurfID = cubit.get_last_id("surface")
cubit.cmd(f"sweep surface {SurfID} zaxis angle 360")