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.
- faces
- A pointer to the faces in the contactsurf.
- facesmax
- The number of faces in the contactsurf.
- 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.
- facecode
- Indicates which face of its element the contactsurf refers to, 0-6.
- facetype
- The number of nodes in the current face, 1-4
- node1
- The ID of the first node of the current face.
- node2
- The ID of the second node of the current face.
- node3
- The ID of the third node of the current face.
- node4
- The ID of the fourth node of the current face.
- node5
- The ID of the fifth node of the current face.
- node6
- The ID of the sixth node of the current face.
- node7
- The ID of the seventh node of the current face.
- node8
- The ID of the eigth node of the current face.
- reversecode
- The "with normal/against normal" status of the current face
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()