Virtual geometry inconsistency with cubit command language and python API

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?

Hi @tloudon,
which version of cubit are you using?

Running your example in the command line won’t create two virtual volumes in Cubit 2024.3
Creating the composites after the chop would work. There is no difference when using the python api.

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
composite create surface all in vol 3
composite create surface all in vol 4
composite delete surface 22

I’m using Cubit 16.14.

This version sounds like you are using sandias cubit.

In this case you should reach out to sandias support: cubit-help@sandia.gov