NXOpen.UF.Modeling.TraceARay

Modeling.TraceARay()

Refer to UF_MODL_trace_a_ray for documentation.

Signature: TraceARay(numBodies, bodies, origin, direction, transform, numDesired)

Parameters:
  • numBodies (int) – The number of bodies that are to be hit
  • bodies (list of Tag) – Array of body tags that are to be hit. This array is dimensioned to num_bodies.
  • origin (list of float) – Point from which the ray is fired.
  • direction (list of float) – The direction the ray is fired.
  • transform (list of float) – Transformation needed to convert bodies into the same co-ordinate system as the ray. Initialize with UF_MTX4_identity. Only rotation and translation are allowed.
  • numDesired (int) – Maximum number of hit points desired. A value of zero requests that all hit points be returned.
Returns:

A Tuple

Return type:

A tuple consisting of (numResults,hitList)

numResults(int): number of hit points found

hitList(list of ``NXOpen.UF.Modl.RayHitPointInfo` Refer to UF_MODL_ray_hit_point_info_s for documentation.`): A pointer to an array of structures where each array element will contain information about each hit. The first element in this array will contain hit point information that is closest to the origin of the ray and the rest of the elements will contain points that continue in order of increasing distance. The caller must free this array by calling UF_free.

License requirements: SOLIDS MODELING