I have a complex geometry in a SAT file with tens of thousands of surfaces that I need to imbed into a larger “ambient” space for electromagnetic computations. In order to simplify the process, I create a virtual surface containing all the exterior surfaces, and then “chop” a brick containing the complex geometry. The issue comes about when I do this in the python API. Virtual surfaces are eliminated when using python, but not when using the Cubit command language. The following is a minimal working example that shows what I mean:
reset
sphere r 1
brick x 1
vol 2 move y 0.75
unite vol 1 2
compress
composite create surface all in vol 1
brick x 5
chop vol 2 with vol 1
The above results in two virtual volumes. Doing the exact same commands in python eliminates the virtual geometry.
cubit.cmd(‘reset’)
cubit.cmd(‘sphere r 1’)
cubit.cmd(‘brick x 1’)
cubit.cmd(‘vol 2 move y 0.75’)
cubit.cmd(‘unite vol 1 2’)
cubit.cmd(‘compress’)
cubit.cmd(‘composite create surface all in vol 1’)
cubit.cmd(‘brick x 5’)
cubit.cmd(‘chop vol 2 with vol 1’)
Is there a way to preserve the virtual geometry when using the python API?