Delete an object in TUI (and selecting it by its center of gravity location)

Hello,

I am re-activating the seemingly old problem of removing (deleting) geometrical objects via TUI.

I found some threads devoted to this on the old forum, and searched through the new forum, but the threads I found indicate that the issue is still (partially) open.

My motivation is the following: I have to create a script which

  1. Generates a parametrised structure in Shaper, made of several faces

  2. Export it to GEOM

3… and delete some of the redundant faces, knowing their location (extend + center of gravity)

The 1. and 2. tasks are feasible - my dumped python script behaves as expected. However, I do not know how to perform the third operation.

I found the following pieces of solution:

with interesting explanations

  • the “stub” of documentation concerning the geomtools, on salome doccumentation platform

It seems, that the required functions are there, but the documentation is almost entirely missing. Will it be provided in some near future?

I will be grateful for help, and I shall share my solution, if I find one.

Regards

Marek

hello,
here you have what you are looking for (from what I understood from your post).
t1.py (1,2 KB)
F.

Thank you for the very prompt answer.
Indeed, the Repair / Suppress Faces works for my case, although I had to apply a work-around. My structure is made of faces, not solids, and at the first attempt the S.F. function threw an error (“invalid data”). However, once I stitched the faces into a shell, the .S.F. worked fine. I was also capable of modifying your script so that it handles a Shell object instead of a Solid object.