For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Find the Center of a circle face

Anonymous's picture
Forums: 

Hello guys,

I have a trimed circle face, and How can I find it Center point and its Vector?

Thanks

S.A.'s picture

I suppose, your circle is a TopoDS_Shape. If it is, first you need to get the surrounding edge of the face. If you have this TopoDS_Edge, than you can extract its geometric curve with the BRep_Tool::Curve(). Then call DownCast to convert it into a Geom_Circle. Than call method Center() of Geom_Circle and you'll get it. I'm not 100% sure if this works in your case...

Best Regards
S.A. Bulgaria

Roman Lygin's picture

Hi David,

Can't center of gravity help?
See "Global properties" section in the Modeling Data Reference Manual for details and API.

Hope this helps.
Roman

David Chen's picture

Hi guys,

thanks for the information. in this case, S.A.'s method was what I looked for. and it is really great. Thanks.

P G's picture

Hello David,

What API used for creating a trimed circle face.

can u share ur code ?
thanks and regards
- gp

David Chen's picture

Hi GP,

I really wish I can help you with this, but the trimed circle face I have was given to my, and it think it was created by a 3rd party software. so , I do not have any idea about how to creat a tirmed face with OCC too. one I find out how, I would be glad to share it with you.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.