*Graphic() - file

Creates a graphic from a graphic file component.

Syntax

*Graphic(gr_name,"gr_label",FILE, body, "file_name", {"component1","component2",..."componentN"}  [GLOBAL/PART/MARKER/AUTO_POS/AUTO_POS_ORIENT/AUTO_POS_ORIENT_SCALE], [ref_body/ref_marker], [x],[y],[z], [psi],[theta],[phi], [scale_x],[scale_y],[scale_z])

Arguments

gr_name
The variable name of the graphic.
Data type: varname
gr_label
The descriptive label of the graphic.
Data type: label
FILE
Indicates the graphic is an H3D file component.
body
The body associated with the graphic.
Data type: Body
file_name
The name of the graphic file.
Data type: string
components
The component(s) from the graphic file. If all components are required, leave blank. If various components are required, separate by commas and put brackets, {}, around the list.
Data type: string vector
GLOBAL/ PART/ MARKER
This optional argument indicates whether the graphic object is located with regard to the global frame or a part reference frame or a marker. The default value for this argument is GLOBAL.
AUTO_POS/ AUTO_POS_ORIENT/ AUTO_POS_ORIENT_SCALE
These arguments indicate that the file graphic has locator points embedded within it and that the position, orientation, and/or scale should be defined based on these locator points and by three MDL points that you specify.
ref_body/ref_marker
When the previous argument is set to PART or MARKER , this argument specifies the body or marker with regard to which the graphic object is located and oriented.
Data type: Body or Marker
x, y, z
Origin of the graphic object with regard to the ref_body or ref_marker specified, or GLOBAL. Value is ignored if any of the auto positioning (on locator points) tokens are specified.
Data type: real, real, real
psi, theta, phi
The three euler angles (in radians) of the graphic object with regard to the ref_body or ref_marker , or GLOBAL specified. Value is ignored if AUTO_POS_ORIENT or AUTO_POS_ORIENT_SCALE is specified.
Data type: real, real, real
scale_x, scale_y, scale_z
Three scaling factors for the graphic object in the cartesian directions. Value is ignored if AUTO_POS_ORIENT_SCALE is specified.
Data type: real, real, real

Example

*Graphic(gr_unibody, "Unibody",  DOTG, 
                                b_unibody, 
                                "car.g", 
                                {"body"}, 
                                GLOBAL, 
                                1000, 0, 0, 
                                1.57, 0, 0, 
                                1, 1, 1)

Context

*BeginMdl()

*DefineAnalysis()

*DefineGraphic()

*DefineSystem()

Comments

The MDL language uses radians, but through the graphical user interface it displays as degrees. The interface will handle the conversion when reading and writing the MDL file.

To avoid the graphic being visible during MotionSolve result animation in HyperView, set the hide_in_post attribute to {{true}}. For example: *Set(gra_link.hide_in_post, true). This option will set the graphic component's visibility to be turned off when the result H3D is loaded in HyperView.