contactsurfs

Unless otherwise specified, data names are accessible in level 3 only.

activesuppressed
Returns non-zero if the entity is set inactive, 0 otherwise. Type: integer
attributesmax
The number of attributes owned by this entity. Type: integer
cardimage
The name of the assigned card image. Type: string
cardimagetype
The type of the assigned card image. Type: string
color
The color of the entity. Type: integer
definedentity
True if the entity is defined, false otherwise. Type: Boolean
elements
The list of elements in the contactsurf. Valid for hm_getvalue query only.
Type: entity array
faces
A pointer to the faces in the contactsurf.
Type: pointer
facesmax
The number of faces in the contactsurf.
Type: integer
id
The ID of the entity. Type: integer
include
The ID of the include file the entity is organized in. Type: integer
includeid
The ID of the include file the entity is organized in. Type: integer
internalid
The ID of the entity. Type: integer
name
The name of the entity. Type: string
outputsuppressed
Returns non-zero if the entity is set "do not export", 0 otherwise. Type: integer
To extract the definition of a contactsurf, use pointerset with the faces array, and then use the following data names with it.
element
A pointer to the element belonging to the current face.
Type: pointer
facecode
Indicates which face of its element the contactsurf refers to, 0-6.
Type: integer
facetype
The number of nodes in the current face, 1-4
Type: integer
node1
The ID of the first node of the current face.
This value is reported taking into account whether or not the contact is reversed with respect to the normal of the element.
Type: integer
node2
The ID of the second node of the current face.
This value is reported taking into account whether or not the contact is reversed with respect to the normal of the element.
Type: integer
node3
The ID of the third node of the current face.
This value is reported taking into account whether or not the contact is reversed with respect to the normal of the element.
Type: integer
node4
The ID of the fourth node of the current face.
This value is reported taking into account whether or not the contact is reversed with respect to the normal of the element.
Type: integer
node5
The ID of the fifth node of the current face.
This value is reported taking into account whether or not the contact is reversed with respect to the normal of the element.
Type: integer
node6
The ID of the sixth node of the current face.
This value is reported taking into account whether or not the contact is reversed with respect to the normal of the element.
Type: integer
node7
The ID of the seventh node of the current face.
This value is reported taking into account whether or not the contact is reversed with respect to the normal of the element.
Type: integer
node8
The ID of the eigth node of the current face.
This value is reported taking into account whether or not the contact is reversed with respect to the normal of the element.
Type: integer
reversecode
The "with normal/against normal" status of the current face
Type: integer

Example

*contactsurfs()
  *format()
    *field(integer,id,9)
    *field(string,name,30)
    *field(integer,facesmax,10)

    *counterset(counter1,0)
    *loopif([counter1 < facesmax])
      *pointerset(pointer1,faces,counter1)
      *field(integer,pointer1.element.id,8)
      *field(integer,pointer1.element.config,4)
      *field(integer,pointer1.reversecode,4)
      *field(integer,pointer1.facecode,4)
      *field(integer,pointer1.facetype,4)

      *if([pointer1.facetype == 1])
        *field(integer,pointer1.node1.id,8)
      *endif()

      *if([pointer1.facetype == 2])
        *field(integer,pointer1.node1.id,8)
        *field(integer,pointer1.node2.id,8)
      *endif()

      *if([pointer1.facetype == 3])
        *field(integer,pointer1.node1.id,8)
        *field(integer,pointer1.node2.id,8)
        *field(integer,pointer1.node3.id,8)
      *endif()

      *if([pointer1.facetype == 4])
        *field(integer,pointer1.node1.id,8)
        *field(integer,pointer1.node2.id,8)
        *field(integer,pointer1.node3.id,8)
        *field(integer,pointer1.node4.id,8)
      *endif()

      *if([pointer1.facetype == 6])
        *field(integer,pointer1.node1.id,8)
        *field(integer,pointer1.node2.id,8)
        *field(integer,pointer1.node3.id,8)
        *field(integer,pointer1.node4.id,8)
        *field(integer,pointer1.node5.id,8)
        *field(integer,pointer1.node6.id,8)
      *endif()

      *if([pointer1.facetype == 8])
        *field(integer,pointer1.node1.id,8)
        *field(integer,pointer1.node2.id,8)
        *field(integer,pointer1.node3.id,8)
        *field(integer,pointer1.node4.id,8)
        *field(integer,pointer1.node5.id,8)
        *field(integer,pointer1.node6.id,8)
        *field(integer,pointer1.node7.id,8)
        *field(integer,pointer1.node8.id,8)
      *endif()

      //Edge contact from base shell.(face type 2 will conflict with 1D face) 
      *if([pointer2.facetype == 2])
        *fieldright(integer,pointer2.node2.id,8)
        *fieldright(integer,pointer2.node1.id,8)
        //For edge based selections on base shell it possible to have 3rd node.
        //to distinguish from tria3 it is still facetype 2
        *if([pointer2.element.config == 108 || pointer2.element.config == 106])
          *fieldright(integer,pointer2.node3.id,8)
        *endif()
      *endif()

      *end()
      *counterinc(counter1)
  *endloop()
  *end()
*output()