Force Merges Not Saved in cub5 format?

Hi all,

I am wondering if force merges between surfaces are not saved in the cub5 format due to some behavior I am seeing with some geometry I’m working with. I am importing some geometry, and surfaces between volumes are not merging automatically (even when increasing the tolerance), so I manually merge surfaces:

merge surface 35 with surface 40 force

image

You can see that the surface is now shared between the volumes. When I go to save this work in a cub5 and reopen it, the surfaces have been split:

image

Is this expected behavior? Am I improperly forcing surfaces together? Any info would be helpful.

Hi,

I am unable to replicate this behavior in a simple model. The GUI generates this command as

merge surface 35 50 force

but I think the parser handles it correctly either way. If you could provide a portion of the model that replicates this issue, I can try to see what is happening.

Thanks,
Karl

I’m attaching an equivalent model that exhibits similar behavior for me.

CUBIT_TEST_PIECE.stp (14.3 KB)

The step file consists of two volumes: a hollow, pill-shaped object embedded within a cylinder.

When I try the “dumb” way of imprinting and merging all surfaces, Cubit only consolidates the interface surface at the “barrel” section:

Cubit>imprint volume 1 2
Preserving undo information...done
Group imprint finished.
Updated volume(s): 1, 2
IMPRINT completed.
Journaled Command: imprint volume 1 2

Cubit>merge volume 1 2
Consolidated 1 pair of surfaces
Curve 2 and 12 consolidated
Curve 4 and 14 consolidated
Consolidated 2 curves
Consolidated 0 pairs of vertices
Journaled Command: merge volume 1 2

A little aside here that isn’t the direct issue this post is originally about, but we have hit another problem I was curious about. I know I want to merge surfaces 1 and 10 and surfaces 3 and 12. When I try to do so, it does not merge them, but when I try to force them I get this error:

Cubit>merge surface 1 with surface 10 force

WARNING: Attempting to merge two entities with same parent.
  Curve 15 (Curve 15) and Curve 16 (Curve 16)
Check for sliver geometry in the vicinity
ERROR: Merge Failed.
ERROR: Merge command failed.

Closer inspection of the surfaces reveals that all of the curves defining them are identical.

image

My question here is why Cubit is having trouble recognizing that even if these are two separate surfaces that they shouldn’t be merged together?

Ok back to the point of this post: at this point, I know which surfaces I want merged, so I force merge the dome sections. The imprint all; merge all does consolidate the curves between the surfaces desired to merge, though so let’s just start fresh and step through to the point where I would want to save and see the described behavior:

import step "/path/to/example/CUBIT_TEST_PIECE.stp" heal
merge surface 1 with surface 10 force

This appears to do what I want, and the surfaces are the same between the volumes:

Now when I go to save this as a cub5 and reopen it, the surfaces are again separate:

Thanks for taking a look! I recognize that I’m probably being indelicate with how I’m handling geometry preparation with these step imports, and any advice to better handle situations like this would be much appreciated!

Hi,

I can replicate the problem with the model that you sent. I believe the base problem is that surface pairs 1, 10 and 3, 12 are spline surfaces. My guess is that the tolerances are not detecting that the two surfaces are actually coincident and mergeable.

I think this also creates a problem on reading from the cub5 file. Cubit should automatically merge the surfaces as they are read. It appears that the force attribute is not being saved in the cub5 file.

The other error with the warning about Attempting to merge two entities with same parent. happens because of an order of operations problem. If you do the force merge of the spherical endcaps and then merge the cylindrical surfaces the error does not occur.

This is going to take a while to debug and resolve. I will enter a bug for these issues and let you know as we make progress on them.

Thanks,
Karl

Hi,

I did find a work-around for this. The merge works correctly if you split the geometry.

import step 'CUBIT_TEST_PIECE.stp'
webcut volume all plane xplane
imprint all
merge all
draw surface with is_merged

Karl

Thanks for the feedback @karl!

I’ll try your suggestion in the future!