closest point on surface using python interface

Is it possible to get a point on a given surface that is closest to a given point? This will be similar to closest_point_trimmed function in the surface class of python interface, but under CubitInterface?
Basically I have only learned to use CubitInterface functions and don’t know how I can use the Class functionalities within the python script window. How do I define a new surface class with the given surface in my model?

To get the closest point, you would do something like this:

surf_id = 1
surf_obj = cubit.surface(surf_id)

pt = [1, 3, 0]
close_pt = surf_obj.closest_point_trimmed(pt)

Note that you do not define a new surface class. You retrieve an instance of the surface class from Cubit using the “cubit.surface(surf_id)” function. Similar functions exist for other entity types as well (e.g., cubit.volume(vol_id), cubit.curve(curve_id), etc.).