*Graphic() - box

Creates a box graphic.

Syntax

*Graphic(varname,label,BOX, body, FACE, end_1, orient_plane, end_2, align_type, align_plane, length_x, length_y, refinement_level) *Graphic(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.
Data type: varname
label
The descriptive label of the graphic.
Data type: label
BOX
This argument indicates the graphic is a box or cuboid.
body
The body associated with the graphic.
Data type: Body
end_1
The point that specifies the location of one end of a FACE graphic box type.
Data type: Point
origin
The point that specifies the origin of a CORNER or CENTER graphic box type.
Data type: Point
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. Valid values for other box graphic types include any of the following: ZX|ZY|XY|XZ|YX|YZ
Data type: keyword
end_2
The point that specifies the location of the other end of a FACE graphic box type.
Data type: Point
align_type
A keyword which specifies the type of entity used for orientation. Valid values are: POINT or VECTOR
Data type: keyword
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.
Data type: Point or Vector
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.
Data type: Point or Vector
length_x
Length of the box graphic in the X direction of its orientation.
Data type: real
length_y
Length of the box graphic in the Y direction of its orientation.
Data type: real
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.
Data type: real
refinement_level
Specifies the refinement for tessalation of the graphics for MotionSolve. Refer to the <Post_Graphic MotionSolve XML statement for additional information.
Data type: real

Example

*BeginMDL( the_model, "MBD Model" )
     *Point( p_0, "Point 0", )
     *Point( p_1, "Point 1", )
     *Point( p_2, "Point 2", )
     *Body( b_0, "Body 0", , 
              , , )
     *BodyPair( b_1, "Body 1", , 
              , , )
     *Graphic( box_1, "Box Graphic - 1", BOX, b_0
             , CORNER, p_2, YX, POINT, p_1, POINT, p_2
             , 10.000, 10.000, 10.000 )
     *Graphic( 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 )
      *Graphic( box_4, "Box Graphic - 4", BOX, b_1.l
             , FACE, p_1, ZX, POINT, p_0, VECTOR, V_Global_X
             , 10.000, 10.000, 3 )

Context

*BeginMdl()

*DefineAnalysis()

*DefineGraphic()

*DefineSystem()

Comments

This graphical entity has two types of MDL statement syntax: one statement can be used to define a FACE box graphic type, while the other statement can be used to define a CORNER or CENTER box graphic 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.

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.