HitItem

class cee.ug.HitItem()

Interface for an object describing the result of a picking action on a RemoteModel.

This object is provided to the RayIntersectCallback.


Properties

HitItem.anythingHit
Type:

boolean

Whether anything was hit during the action. If false, the other properties in this object will be undefined.

HitItem.elementArea
Type:

number

The area of the element (if applicable)

HitItem.elementEdgeIndex
Type:

number

The local index (zero based) of the closest element edge to the actual intersection point in the data model on the server that was hit

HitItem.elementFaceIndex
Type:

number

The local index (zero based) of the element face that was hit

HitItem.elementId
Type:

number

The id of the element in the data model on the server that was hit

HitItem.elementIndex
Type:

number

The index (zero based) of the element in the data model on the server that was hit

HitItem.elementNodeIndex
Type:

number

The local index (zero based) of the closest element node to the actual intersection point in the data model on the server that was hit

HitItem.elementNodeResult
Type:

number

The scalar result in the closest element node. Only defined if the current result is per element node

HitItem.elementResult
Type:

number

The scalar result in the element that was hit.

HitItem.elementResultIsInterpolated
Type:

boolean

Whether the element result is interpolated (e.g. from a nodal result). False if the result is an actual per element result.

HitItem.elementTriangleVertices
Type:

[number]

A tessellation of triangles of the element that was hit.

This array contains x,y,z values for each triangle vertex. So there will be 9 values (3 vertices * (x,y,z)) per triangle. This can be used to highlight the selected element using the geometry or the markup model.

HitItem.elementType
Type:

string

The type of the element in the data model on the server that was hit, for example ‘Quad’, ‘Tetrahedron’, ‘Hexahedron’

HitItem.elementVolume
Type:

number

The volume of the element (if applicable)

HitItem.frameIndex
Type:

number

The index of the frame in which the picking occurred. This is 0 unless there is an animation.

HitItem.geometryIndex
Type:

number

The index of the CAE geometry.

In almost all cases this will be 0. If using a partially adaptive model with remeshing only on parts of the model (e.g. in a Forging process) the concept of multiple geometries might be relevant.

HitItem.intersectionPoint
Type:

Vec3

The 3d point (in world coordinates) on the surface that was hit.

This is the actual point that was hit

HitItem.intersectionPointNormal
Type:

Vec3

The normal of the surface at the point where the surface was hit.

HitItem.intersectionPointResult
Type:

number

The interpolated scalar result in the intersectionPoint.

HitItem.nodeId
Type:

number

The id of the closest node to the actual intersection point in the data model on the server that was hit

HitItem.nodeIndex
Type:

number

The index (zero based) of the closest node to the actual intersection point in the data model on the server that was hit

HitItem.nodePosition
Type:

Vec3

The 3d point (in world coordinates) of the closest node as identified by nodeId/nodeIndex

Use intersectionPoint for the actual point on the model that was hit

HitItem.nodeResult
Type:

number

The scalar result in the closest node as indicated by nodeId/nodeIndex.

HitItem.nodeResultIsInterpolated
Type:

boolean

Whether the node result is interpolated (e.g. from a per element result). False if the result is an actual per node result.

HitItem.objectId
Type:

number

The id of the object (part/iso/cut/isovol) that was hit

HitItem.objectIndex
Type:

number

The index of the object (part/iso/cut/isovol) that was hit

HitItem.objectName
Type:

string

The name of the object (part/iso/cut/isovol) that was hit

HitItem.objectType
Type:

ObjectType

The type of object (part/iso/cut/isovol) that was hit

HitItem.scalarResultName
Type:

string

The name of the scalar that the results elementResult and nodeResult apply to.