
Wed, 09/14/2011 - 19:57
Forums:
Hi
If I have a surface (Geom_Surface), how I can get the type of this surface. For example, planar, cylindrical, spherical, bspline, etc?
And once I have the surface type, how I can get the information about this surface? For example, if it's a cylindrical surface, how to get the axis and the radius, etc?
Thanks in advance.
Sean
Wed, 09/14/2011 - 20:50
Try the method GetType from GeomAdaptor_Surface.
There you can use the method Cylinder to create a gp_Cylinder and then get the Radius.
Wed, 09/14/2011 - 20:54
Like this:
GeomAdaptor_Surface adapt( surface );
if ( adapt.GetType() == GeomAbs_Cylinder )
{
gp_Cylinder cyl = adapt.Cylinder();
Standard_Real radius = cyl.Radius();
}
Thu, 09/15/2011 - 00:42
Hi Gabriel:
Thank you so much for your help.
Sean