*GraphicPair() - box pair
Creates a pair of box graphics.
Syntax
*GraphicPair(varname,label,BOX, body, FACE, end_1, orient_plane, end_2, align_type, align_plane, length_x, length_y, refinement_level) *GraphicPair(varname,label,BOX, body, CORNER|CENTER, origin, orient_plane, align_type, align_axis, align_type, align_plane, length_x, length_y, length_z, refinement_level)
Arguments
- varname
- The variable name of the graphic pair.
- label
- The descriptive label of the graphic pair.
- BOX
- This argument indicates the graphic is a box or cuboid.
- body
- The body or body pair associated with the graphic.
- end_1
- The point or point pair that specifies the location of one end of a FACE graphic box type.
- origin
- The point or point pair that specifies the origin of a CORNER or CENTER graphic box type.
- orient_plane
- A keyword used to orient one plane of a box graphic. Valid values for a FACE box graphic type are: ZX or ZY
- end_2
- The point or point pair that specifies the location of the other end of a FACE graphic box type.
- align_type
- A keyword which specifies the type of entity used for orientation. Valid values are: POINT or VECTOR
- align_axis
- An entity variable referring to a Point or Vector used to orient one axis of a plane as specified by a CORNER or CENTER graphic box type.
- align_plane
- An entity variable referring to a Point or Vector used to orient one axis of a plane as specified by a CORNER or CENTER graphic box type.
- length_x
- Length of the box graphic in the X direction of its orientation.
- length_y
- Length of the box graphic in the Y direction of its orientation.
- length_z
- Length of the box graphic in the Z direction of its orientation. This attribute is not applicable for a FACE graphic box type.
- refinement_level
- Specifies the refinement for tessalation of the graphics for MotionSolve. Refer to the <Post_Graphic MotionSolve XML statement for additional information.
Example
*BeginMDL( the_model, "MBD Model" )
*PointPair( p_0, "Point 0", )
*PointPair( p_1, "Point 1", )
*PointPair( p_2, "Point 2", )
*BodyPair( b_0, "Body 0", ,
, , )
*BodyPair( b_1, "Body 1", ,
, , )
*GraphicPair( box_1, "Box Graphic - 1", BOX, b_0,
CORNER, p_2, YX, POINT, p_1, POINT, p_2,
10.000, 10.000, 10.000 )
*GraphicPair( box_2, "Box Graphic - 2", BOX, b_0, CENTER, p_2,
ZX, VECTOR, V_Global_Z, VECTOR, V_Global_X
10.000, 10.000, 10.000, 3 )
*GraphicPair( box_4, "Box Graphic - 4", BOX, b_1,
FACE, p_1, ZX, POINT, p_0, VECTOR, V_Global_X,
10.000, 10.000, 3 )
Context
Comments
This graphical entity has two types of MDL statement syntax: one statement can be used to
define a FACE box graphic pair type, while the other statement can be used to define a
CORNER or CENTER box graphic pair type (see additional details below):
- FACE Box Graphic this statement takes two end points. The distance between the end points form the length of the box in the Z direction (end_1 is the origin and the Z axis is oriented towards end_2).
- CENTER Box Graphic the attribute origin is at center of the box. Based on the value of orient_plane, the first axis of the plane is aligned along the direction of align_axis. The second axis is orthogonal to the first axis, such that the entity align_plane is in the orient_plane. For example, in the graphic definition with varname box_2 shown in the example code above, p_2 is at the center, the Z axis of the box graphic is along the global vector Z, and global vector X lies in the ZX plane of the box graphic.
- CORNER Box Graphic - the attribute origin is one corner of the box. Based on the value of orient_plane, the first axis of the plane is aligned along the direction of align_axis. The second axis is orthogonal to the first axis, such that the entity align_plane is in the orient_plane. For example, in the graphic definition with varname box_1 shown in the example code above; p_2 is at one corner, the Y axis of the graphic is along point p_1, and point p_2 lies in the YX plane of the box graphic.
This pair definition is a symmetric definition which means that the individual sides cannot have different values for the attributes.
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.