Determining whether a face is flat

Hello there,

I am trying to develop code that determines whether a TopoDS_Face I send it is flat or curved.

I was recommended to try converting the face to a GeomAdaptor_Surface type, and then using the GetType function in that class. GetType appears to be reimplemented from the Adaptor3d_Surface class.

I was wondering if this method is a good way to go about solving this problem, and if that is the case, what can I expect GetType to return if the surface is flat?

I am fairly new to OCC and still learning a lot. Your patience and help would be greatly appreciated! Thank you.

Forum supervisor's picture

Hello Rory,

The general task of geometry form recognition can be solved with help of an advanced software product called "Canonical Recognition" that allows to convert free-form geometry to an equivalent canonical form geometry within a given tolerance. After the conversion the type of the geometry will match the form of the geometry, and such information can be easily queried. You may find more information about this component at

Please contact us via if you are interested in learning more.
Best regards,
Forum supervisor