SchemeExt:Eda:element-data

From DocR21

Jump to: navigation, search

Contents

Action

Extracts feature information from an element. Returns the type of element (based on enumerator VA_ELEMENT_TYPE), number of faces, edges and nodes, as well as the node array of that mesh element.

Filename

scm/scmext/vabridge/vabridge_scm_dev.cpp

APIs

api_va_get_element_data

Syntax

(eda:element-data mesh elem_idx [acis-opts])

Argument Types

Argument Scheme Data Type
mesh va_surfmesh | va_tetmesh
elem_idx integer
acis-opts acis-options

Returns

(integer 
   (integer integer integer)
   (integer integer integer))

Description

The mesher generates a mesh consisting of elements which contain faces and edges. Access to the topology in the mesh is provided by iterating through the elements.

Returned value is a compound list of one integer and two lists of integers, namely:

  • integer value based on the VA_ELEMENT_TYPE
  • list of integers for number of faces, number of edges, and number of nodes in the element.
  • list of integers with the indices of the nodes in the given element.

Note: The value for the "number of nodes" is the same as the length of the last list of integers. Although redundant, for a Scheme extension, it simply reflects what is returned by the API.



Arguments

  • mesh specifies the generated finite element mesh. Mesh can be of any type: va_surfmesh or va_tetmesh
  • elem_idx - Index of the element to query.
  • acis-opts contains parameters for versioning and journaling.

Example

In this example, we are querying the first element of the mesh. The positions of the nodes returned are shown in the original view.

; Create some geometry)
(define b (solid:block 0 0 0 1 1 1))
 
; Create a surfacel mesh
(define surf_mesh (eda:generate-surface-mesh b))
 
; Extract element information
(eda:element-data surf_mesh 1)
; (0 (1 3 3) (1 7 12))
(eda:node-positions surf_mesh (list 1 7 12))
; (#[ position 1 0.5 0.5 ] #[ position 1 0 1 ] #[ position 1 0 0 ])
Original Body
Surface Mesh
Personal tools
Live