cancel
Showing results for 
Search instead for 
Did you mean: 

Finding the center of a face

Builder
Builder

Is there a way to find the center of a face? Even though that face might have some subtractions in it and whatnot.

6 REPLIES

Re: Finding the center of a face

Siemens Phenom Siemens Phenom
Siemens Phenom

Yes.  You might have to extract a sheet body from the face temporarily.  And are you looking for the geographic center of the face, which ignores the holes in it, or do you want the center of mass - the point on which you could balance it, so to speak?

Re: Finding the center of a face

Builder
Builder
The second part. Center of mass including holes to find the balance

Re: Finding the center of a face

Siemens Phenom Siemens Phenom
Siemens Phenom

 

We can do that with UF_MODL_ask_mass_props_3d, which is also wrapped for use in .Net.

 

Do you have a preferred language?  I'll try to find an example.

 

Re: Finding the center of a face

Builder
Builder
C# would be preferable

Re: Finding the center of a face

Siemens Phenom Siemens Phenom
Siemens Phenom

Here is a basic example in C#.  A couple of things to note - you might want to use different units, and you can do that by changing which massUnit assignment is uncommented.

 

Also, this function is a bit peculiar in that it returns the output info relative to the WCS, rather than the Absoluted CSYS, like almost all other NXOpen calls.  I will probably add a few lines to do that, and then I'll post it to our online samples in a day or two.

Re: Finding the center of a face

Builder
Builder
Thanks Steve. That worked really well