*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.
- gr_label
- The descriptive label of the graphic.
- FILE
- Indicates the graphic is an H3D file component.
- body
- The body associated with the graphic.
- file_name
- The name of the graphic file.
- 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.
- 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.
- 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.
- 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.
- 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.
Example
*Graphic(gr_unibody, "Unibody", DOTG,
b_unibody,
"car.g",
{"body"},
GLOBAL,
1000, 0, 0,
1.57, 0, 0,
1, 1, 1)
Context
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.