Bounding an imported CAD geometry

Hi Lorenzo,

I’m not sure we understand what you are looking for. As Greg mentioned above, volumes 1 and 3 seem to be the original cap object and the enclosing space excluding the cap object. What do you expect to get?

As to your question with the geometry with a cavity, can you give us an example to look at?

Thanks,
Karl

Hi Karl,
Thanks for coming back to me. I expect to get 3 volumes, the original cap, the outer volume and the inner volume, filling the cavity.
The same operations performed on a geometry with cavity created directly on cubit, gives 3 volume as expected. Furthermore, when importing geometries with cavities, the name ID gets lost.
Thanks,
Lorenzo

Hi Lorenzo,

I did notice that I get different results if I use ‘keep’ instead of ‘keep_tool’ in the boolean subtract. The help for subtract shows
Subtract [Volume|BODY] <range> From [Volume|BODY] <range> [imprint] [keep].

The use of ‘keep_tool’ looks like a bug in the GUI to me. Using ‘keep’ I get

image

where Volume 1 is the cap, Volume 2 is the bounding brick, and Volume 3 is the difference between the two.

Does this make any difference for you?

Karl

Hi Karl,
Not precisely, if you use ‘keep’ you would retain the two volumes before the subtraction.
I’ll try to explain the steps I’ve done a bit better.

  • import a simple hollow cylinder with a cavity or empty space inside, like the one attached:
    Cubit>import step “cap.step” heal
  • Create a bounding box around it
    Cubit>create brick bounding box Volume 1 extended percentage 50
  • Subtract the cap volume from the bounding box, keeping the tool:
    Cubit>Subtract Volume 1 from Volume 2 keep_tool

    I then end up with 2 volumes: the cap and the bounding box volume without the cap inside, which is not right (2 new volume should be created, one inside the cylinder and one outside).

If however I run this command after importing:
Cubit>healer autoheal volume 1 rebuild
And then I continue with the same commands, I end up with the right volumes:

This problem happen to all the imported geometries that have a cavity inside.
I hope I made myself clear.
Best Regards,
Lorenzo cap.step (61.0 KB)

Hi Lorenzo,

I understand the problem (if not the solution) now. When I tetmesh the cap and look at the elements in the cross-section, there is a gap. I did not understand that this was a thin-walled vessel when I first looked at it. I will keep trying to debug this problem.

Karl

Hi Lorenzo,

Here is what I found. This part is in a relatively small scale. The length is ~.04. The first thing I tried was to scale the part by 100 to just to see if there were any numerical issues at the smaller scale. When I did that, I got a warning the scaling may have corrupted the model. I then healed the model with a rebuild.

healer autoheal body 1 rebuild

I was then able to do the boolean subtract and get the correct internal cylinder.

I next just tried importing the body and did an autoheal with rebuild.

import step "~/Downloads/cap.step" heal
healer autoheal body 1 rebuild
compress
create brick bounding box vol 1 percent 50
subtract vol 1 from vol 2 keep_tool

This gave me the solution that you were looking for, three volumes including, the internal cylinder.

I am currently working on upgrading the ACIS library which is the third party tool we use for geometry and reading STEP files. I will do some checks to see if your model works correctly with the new version and report back to you in a couple of weeks.

Thank you for your patience,
Karl

Hi Karl,

I’ve also tried with larger parts and doesn’t seem to be the problem.

The autoheal rebuild function works well for simple geometries, but with more complex cases the only thing I came up with to overcome the problem was to cut the part in multiple parts so not to have closed empty spaces inside.
But this of course doesn’t solve the problem either.

There is also another thing when importing these parts, the volume name gets automatically cancelled and reset to Volume1, no matter what. Also very strange.

Thank you for looking into it.
Best Regards,
Lorenzo

Hi Lorenzo,

Is the volume name being removed during the healing operation? What happens if you import without healing? Do you still lose the name?

In general, we recommend that users scale small models to a larger size. We have seen cases with numerical instability with small models scales. You can scale the model back to the smaller size prior to export. If you are exporting an Exodus mesh, you can specify a scale size during export.

Karl

Hi Karl,

The volume name is removed independently on the healing operation at import.

I tried to scale the cylinder by a factor of 100 directly in the CAE tool and then import it to Cubit, but the error is still there.

Lorenzo

Hi Lorenzo,

You may still need to add the autoheal with rebuild as part of your process.

Can I send this model to the 3rd party vendor that supplies our STEP reader? I would like to report this as a bug to them.

Thanks,
Karl

Hi Karl,
Sure, no problem.
Thanks,
Lorenzo

Hi Lorenzo,

Here is the reply that I got back from ACIS support.

We have checked the incident and the input files again and it looks the issue is because of the source STEP file itself. The STEP file shared by you have incorrect information about shell/voids in it, verified this by opening the file in CREO modeler and checking the error there.

Their solution was to separate one surface and restitch the model. This is essentially what the autoheal with rebuild option does.

Karl

Hi Karl,
Thank you for contacting me back. I don’t see any problem in my simple geometry and if that was the case it would mean that any geometries with such empty spaces inside would be incorrect.
I made an even simpler case, attached here, and it’s the same thing.
Best Regards,
Lorenzo cilynder.step (6.0 KB)

Hi Lorenzo,

What CAD tool are you using to create the geometry? It isn’t clear to me from looking at the STEP file.

The image below was generated by ACIS support and shows the errors found when the cap.step part was loaded into Creo. I think the fundamental error is the last one showing the “unintentional cavities.”

Thanks,
Karl

Hi Karl,
I’m using OnShape as CAD tool and I don’t see any errors when importing the geometry. The second file I just sent you, is just a subtraction of two cylinders. So maybe an error when exporting step files in OnShape?
Thanks,
Lorenzo

Hi Lorenzo,

I’m thinking that there is an error with the OnShape STEP exporter for this case. Doing the autoheal with the rebuild option does fix it.

Karl

All,
I have a similar problem. I import a step file which represents the material (copper) associated with the boundary of a resonant electromagnetic cavity. I ultimately would like to mesh the volume bounded by the inner surface of the volume I import so that I can pass it to a electromagnetic eigen solver (omeaga3P).
I followed the steps presented in this thread but; see my journal file attached (along with the stp file) Nominally I would have expected the last step to produce two new volume: an external one between the outer surface of my imported volume and the bounding bring I added and the inner volume I am ultimately interested. Instead I get one volume. I suspect somehow cubi
processStpLinac3.jou (792 Bytes)
awa_linac_cleaned2.stp (3.7 MB)
t does not recognize what I imported as a “solid” volume. Thank you for any suggestion, – Philippe.

Hi Philippe,

I am testing our new release candidate and it seems to be producing the expected results. I’m not confident that the expected result is what you want though. It looks like there are paths from the interior to the exterior of the model. I made a couple of modifications to your model

brick x 10 y 12 z 40
tweak surface 1069 offset -0.5     # Ensure that the top is exterior

subtract vol 1 from vol 2 keep     # bug in keep_tool only. Keep both.
delete volume 2      # delete the extra exterior

I am fixing the keep_tool option for this release.

Is this what you are expecting?
image

To get what I think is really the exterior, I had to do some more work.

draw vol 3
separate surface 2085 2086 2087 2084  
separate surface 2083 2082  
delete body 4 to 6
separate surface 1092  
delete body 3
delete body 8
draw body 7

At this point I can see an inlet that needs to be removed to create a closed volume for meshing.

I removed the inlet and got a closed volume

separate surface 1095  
separate surface 1086  
delete body 9 to 11
tweak curve 2359 2358 2360 remove 

Finally, I had to convince Cubit that this really was a closed volume. I did this by separating one surface out of the model and stitching the resulting bodies back together.

separate surface 2079  
stitch body 7 12
compress
draw vol 2

Is this the model that you were expecting? (Otherwise, it was a good exercise in Cubit usage).

If you want a high-quality mesh on this model you will either need a very dense mesh, or you will have to remove a number of small blends and chamfers. The small surfaces will drive meshing time and number of elements up dramatically. You can reduce the meshing time by going to the Mesh/Surface/Mesh/Trimesh panel and toggling “Use Geometry Sizing” off.

I used the Geometry Powertool to find the small surfaces and I was able to find and remove all the small surfaces and then get a nice tet mesh on the model.

If you have questions on this last part, let me know and I will create a small video.

Thanks,
Karl

Hi Karl,
Thank you so much! Yes, the inlet you show is what I was trying to produce. I am not sure how to use the Geometry Powertool (I never used it) but let me give it a shot and get back to you if I have issues. Thank you! – Philippe.

Hi Phillipe,

Here is a video showing how to use the Geometry Powertool and some selection tools to speed up cleaning up your model. Loom | Free Screen & Video Recording Software. This is without editing and includes my mistakes. Forgive me for those. It should demonstrate the concepts!

This was done in our latest release candidate. There may be features in this release that are not in the current version of Coreform Cubit. The next release should be out by the beginning of next week at the latest. If you choose to, you can download release candidates from Coreform.com/Coreform Cubit/Downloads. Scroll down to “Latest Development Builds”

Karl