Model ElementThe
UserGraphic element allows you to generate your own user defined
geometry.
Description
This element can only be created by writing or using an associated user written
subroutine. The associated user function calculates node positions for a
user-defined graphics element.
Attribute Summary
Name |
Property |
Modifiable by command? |
Designable? |
rm |
Reference(Marker) |
No |
No |
nodes |
Double(count=0) |
faces |
Int(count=0) |
refinement_level |
Int() |
color |
String() |
hidden |
Bool() |
Usage
# Defined in a compiled user subroutineUserGraphic (function=userString, routine=string)# Defined in a Python functionUserGraphic (function=userString, routine=functionPointer)
Attributes
User-subroutine defined in a compiled DLL
- rm
- Reference(Marker)
The reference frame of the output mesh.
- increment
- Int()
- A number that indicates the calling frequency of the corresponding
GRASUB. The default is 4. The number controls the
temporal resolution of the mesh. A finer resolution will results in a
larger CPU time to generate and process the mesh and vice versa.
- function
- String defining a valid user function MotionSolve expression.
- The list of parameters that are passed from the data file to the user
defined subroutine where the UserGraphic is
defined.
- The function attribute is mandatory.
- routine
- String.
- Specifies an alternative name for the user subroutine. The name consists
of two pieces of information, separated by "∷". The first is the path
name to the shared library containing the function that computes the
response of the user-defined Variable. The second is
the name of the function in the shared library that does the
computation.
- An example is: routine="/staff/Altair/engine.dll∷myGrasub"
-
"/staff/Altair/engine.dll is the DLL
-
"mGrasub" is the
function within this DLL that generates the graphic object
- The attribute routine is optional.
- When not specified, routine defaults to
"GRASUB".
User-subroutine defined in a user-written Python script
- function
- String defining a valid user function MotionSolve expression.
- The list of parameters that are passed from the data file to the user
defined subroutine.
- The function attribute is mandatory.
- routine
- Pointer to a callable function in Python.
- An example is: routine=myGrasub
- myGrasub is a Python
function or method that can be called from wherever the model
resides.
- The attribute routine is optional.
- When not specified, routine defaults to
GRASUB.
- hidden
- Boolean
- Specifies weather the graphics is being written to the H3D file or
not.
- True implies that the graphic is hidden and is
not written to the H3D file.
- False implies that the graphic is not hidden
and is written to the H3D file.
- This attribute is optional. When not specified, it defaults to
False.
Optional Attributes – Available to all description methods
- color
- String()
- The color of the graphic for H3D animation. Specified as RGB (Red :
Green : Blue).
Example
Define a
UserGraphic to generate a mesh geometry representing a cam
profile:
UserGraphic (function="USER()",routine=cam_grasub)
Comments
- See Properties for an explanation about what properties are, why they
are used, and how you can extend these.