This section describes the Box graphic entity of MotionView and shows the various usage, creation, and editing methods.
There are three ways in which a Box graphic (or Cuboid) can be defined based on the location of the graphic reference frame about which graphic is being created. The dimensions for the graphic are also specified using this reference frame.
The Center Box Graphic has its origin of the reference frame about which the box is defined located at the geometrical center of the Box. |
The Corner Box Graphic has the origin of the reference frame located at any one of the eight corners of the Box. |
The Face Center Box Graphic has its origin located at the center of one of the faces. |
The figure below shows the various Box graphic options and settings that are available in MotionView:
To learn how to add a Box Graphic to a model, please see the Graphics topic.
Graphics Panel - Connectivity Tab - Center Box Graphic - Single Entity Graphics Panel - Connectivity Tab - Center Box Graphic - Pair Entity
Note - The same steps as shown above can also be used to define Pair Box Graphic entities. |
The model containing the Box Graphic can be saved in MDL format from MotionView and exported in the MotionSolve XML format.
The Box Graphic entity can be of the following types:
To understand the complete syntax of the MDL statements mentioned above, please refer to the following MotionView MDL Reference Guide topics: *Graphic() - box, *GraphicPair() - box pair, *DefineGraphic(). |
The Box Graphic when exported to the MotionSolve XML format is exported as a Post_Graphic statement. Syntax: <Post_Graphic id = "integer" type = "BoxDefinedFromCorner" corner_marker_id = "integer" length_x = "real" length_y = "real" length_z = "real" is_material_inside = {TRUE, FALSE} </Post_Graphic>
<Post_Graphic id = "integer" type = "BoxDefinedFromCenter" center_marker_id = "integer" length_x = "real" length_y = "real" length_z = "real" is_material_inside = { "TRUE" | "FALSE" } </Post_Graphic> In case of the Box Graphic the model statement will be as shown below: <Post_Graphic id = "90002" type = "BoxDefinedFromCorner" corner_marker_id = "90000002" length_x = "1000." length_y = "500." length_z = "1000." is_material_inside = "TRUE" />
<Post_Graphic id = "90001" type = "BoxDefinedFromCenter" center_marker_id = "90000001" length_x = "300." length_y = "300." length_z = "2382.9047" is_material_inside = "TRUE" /> To understand the complete syntax of the Post_Graphic XML model statement, please refer to the MotionSolve Reference Guide topic for Post_Graphic. |
In MotionView, Tcl can be used to add any MDL entities to the model. There are two Tcl commands that can be used to add an entity:
Syntax: mdlmodel_handle InterpretEntity new_handle keyword varname label In case of the Box Graphic the statement will look as shown below: mdlmodel_handle InterpretEntity gra Graphic gra_box_center "\"Box Graphic - Center\"" BOX B_Ground CENTER p_bmid0 ZX VECTOR V_Global_Z VECTOR V_Global_X 5000 5000 5000; |
*This command is not applicable for Graphic entities. |
The InterpretEntity command is used to add entities to the model and the InterpretSet command is used to set the entity properties. To understand the complete usage and syntax of these commands, please refer to the InterpretEntity and InterpretSet topics located within the HyperWorks Desktop Reference Guide.
Note - When using the InterpretEntity and InterpretSet commands, it is important to also use the Evaluate command in order for the changes to take effect immediately.
To learn how to create a complete model using Tcl commands, please refer to tutorial MV-1040: Model Building Using Tcl.
The following example shows all of the Box Graphic entities:
*BeginMDL( the_model, "Model", "12.0.0.85" ) *StandardInclude(FILE) *SetCurrentSolverMode(MotionSolve) *Point( p_a, "Point A" ) *Point( p_b, "Point B" ) *Point( p_c, "Point C" ) *PointPair( p_d, "Point D" ) *PointPair( p_e, "Point E" ) *PointPair( p_f, "Point F" ) *Point( p_g, "Point G" ) *SetPoint( p_g, 30.0, 0.0, 0.0 ) *PointPair( p_h, "Point H" ) *SetPoint( p_e, LEFT, 75.0, 20.0, 0.0 ) *SetPoint( p_h, LEFT, 85.0, 20.0, 0.0 ) *SetPoint( p_b, 20.0, 0.0, 0.0 ) *SetPoint( p_c, 40.0, 0.0, 0.0 ) *SetPoint( p_d, LEFT, 60.0, 20.0, 0.0 ) *SetPoint( p_f, LEFT, 100.0, 20.0, 0.0 ) *Body( b_a, "Body A", p_a, , , , ) *Body( b_b, "Body B", p_b, , , , ) *Body( b_c, "Body C", p_c, , , , ) *BodyPair( b_d, "Body D", p_d, , , , ) *BodyPair( b_e, "Body E", p_e, , , , ) *BodyPair( b_f, "Body F", p_f, , , , ) *Set( b_a.usecm, true ) *Set( b_b.usecm, true ) *Set( b_c.usecm, true ) *Set( b_d.usecm, true ) *Set( b_e.usecm, true ) *Set( b_f.usecm, true )
#Example for a Single Center Box Graphic *Graphic( gbox_singCenter, "Box Graphic Single - Center", BOX, b_a, CENTER, p_a, ZX, POINT, p_b, VECTOR, V_Global_X, 10.0, 10.0, 10.0 )
#Example for a Single Face Center Box Graphic *Graphic( gbox_singfaceCenter, "Box Graphic Single - Face Center", BOX, b_b, FACE, p_b, ZX, p_g, VECTOR, V_Global_X, 10.0, 10.0 )
#Example for a Single Corner Box Graphic *Graphic( gbox_singcorner, "Box Graphic Single - Corner", BOX, b_c, CORNER, p_c, ZX, POINT, p_d.l, VECTOR, V_Global_X, 10.0, 10.0, 10.0 )
#Example for a Pair Center Box Graphic *GraphicPair( gbox_pariCenter, "Box Graphic Pair - Center", BOX, b_d, CENTER, p_d, ZX, POINT, p_e, VECTOR, V_Global_X, 10.0, 10.0, 10.0 )
#Example for a Pair Face Center Box Graphic *GraphicPair( gbox_pairfaceCenter, "Box Graphic Pair - Face Center", BOX, b_e, FACE, p_e, ZX, p_h, VECTOR, V_Global_X, 10.0, 10.0 )
#Example for a Pair Corner Box Graphic *GraphicPair( gbox_paircorner, "Box Graphic Pair - Corner", BOX, b_f, CORNER, p_f, ZX, POINT, p_a, VECTOR, V_Global_X, 10.0, 10.0, 10.0 ) *EndMDL()
|
See Also:
Graphic Entity Attributes Panel
*Graphic() - box (MDL Model Statement)
*GraphicPair() - box pair (MDL Model Statement)
*DefineGraphic() (MDL Model Statement)
Post_Graphic (XML Command)
InterpretEntity (Tcl Command)
InterpretSet (Tcl Command)