Geometry of Surfaces
 
Functions Introduced:
The method for getting the description of surface geometry is analogous to that described in the previous section for solid edges. Function ProSurfaceTypeGet() provides the equation used to describe the surface. Function ProSurfaceDataGet() returns the data structure associated with the specified surface.
Use function ProSurfacedataMemoryFree() to free the top-level memory associated with the surface data structure. Function ProSurfacedataFree() frees the underlying memory of the data structure.
The possible types of surface are as follows:
PRO_SRF_PLANE—A plane
PRO_SRF_CYL—A cylinder
PRO_SRF_CONE—A cone
PRO_SRF_TORUS—A torus
PRO_SRF_COONS—A Coons patch
PRO_SRF_SPL—A spline surface
PRO_SRF_FIL—A fillet surface
PRO_SRF_RUL—A ruled surface
PRO_SRF_REV—A surface of revolution
PRO_SRF_TABCYL—A tabulated cylinder
PRO_SRF_B_SPL—A nonuniform rational B-spline (NURBS)
PRO_SRF_CYL_SPL—A cylindrical spline surface
The relevant field in the ProGeomitemdata structure is p_surface_data, of type ProSurfacedata.
The structure ProSurfacedata contains information applicable to surfaces of all types, such as the maximum and minimum values of u and v, and of X, Y, and Z for the surface, and a union that contains a field for each type of surface geometry.
As with edges, these structures contain fields for the coefficients and constants in the relevant equations, described in the Geometry Representations appendix.
These functions are also applicable to datum surfaces, and to datum planes (in which the surface type will always be PRO_SRF_PLANE).
The function ProSurfaceIsDatumPlane() identifies if the given surface is a datum plane.
The function ProSurfaceSameSrfsFind() finds and returns an array of surfaces that are the same as the input surface. For example, in case of a cylinder, creates two half cylindrical surfaces. If you obtain one half, the other half is returned by this function.
The function ProSldsurfaceVolumesFind() analyzes and returns the number of connect volumes of a part and the surfaces that bound them.
The function ProSurfacePeriodicityGet() gets information about the periodicity of a surface. The output arguments are:
periodic_in_u—Specifies if the surface is periodic in U-direction.
period_in_u—Specifies the value of period in U-direction.
periodic_in_v—Specifies if the surface is periodic in V-direction.
period_in_v—Specifies the value of period in V-direction.
The function ProSurfaceNextGet() returns the next surface in the surface list or returns NULL if there is no next surface. The input argument this_surface is the surface for which the next surface is queried and can be NULL. The output argument p_next_surface is a non-Null pointer for returning the next surface. If the surface passed through the input argument this_surface is the last surface in the list, then the returned surface is NULL.
Note:
 
For a solid body part with multiple bodies, this function does not return a surface that is outside the body.
Example 3: Getting the Angle of a Conical Surface
The sample code in UgGeomConeAngDisp.c located at <creo_toolkit_loadpoint>/protk_appls/pt_userguide/ptu_geometry shows how to read the geometry equation of a surface.
Isto foi útil?