Problem finding coordinates

Hello,

I am facing an issue using one of the commands I took from the python API library of Coreform Cubit.

What I would like to do is to find the coordinates of the center of certain face elements. I use the command:

cubit.get_center_point(‘face’,50) , where 50 is the id of the face element whose center coordinates I am interested in. The problem is that no matter what value for the id I give, the output is always (0,0,0). At first I thought it happened because Cubit cannot find the face element with the id I was giving. Therefore, I decided to check the id of the face elements and make sure that it is correct (I double checked that in two ways: 1) checking the id of the entity through GUI and by clicking on the element and finding its id 2) using the command: cubit.cmd(‘list face 50’) --> Centroid coordinates are good and correspond to that specific entity).

Moreover, this very same command works perfectly if I replace the face with hex or surface or volume. So, I was wondering if this command works for face elements at all.

I tried to play around with the command and it looks like even if I intentionally entered the wrong command it still gives me an output (always (0,0,0) without an error. For instance I tried :
cubit.get_center_point(‘face element’,50).

I will be grateful if you provide me with the correct command to find the coordinates of the center of face elements.

Thank you in advance.

Hi Aida,

Try using “quad” instead of “face”. I think it is a bug that we don’t support both.

Karl

Thank you very much Karl. Using “quad” instead of “face” works perfectly.