*Graphic() - CADGraphic

Creates a CAD graphic.

Syntax

*Graphic(varname,"label",CADGraphic, body, use_mesh, fidelity, "filename", {"component1","component2",..."componentN"}, GLOBAL|PART,align_b1|MARKER,align_mrk1, [x],[y],[z], [psi],[theta],[phi], [scale_x],[scale_y],[scale_z])

Arguments

varname
The variable name of the graphic.
Data type: varname
label
The descriptive label of the graphic.
Data type: label
CADGraphic
Indicates the graphic is a CAD graphic and that the following file name refers to the CAD file.
Data type: keyword
body
The body associated with the graphic.
Data type: Body
use_mesh
When True, this flag indicates mesh to be generated on the graphics for its use in contact. Default value is false; in other words, the graphics will not be meshed.
fidelity
Indicates the level of fineness of the geometry displayed as tessellated mesh. Valid values are between 1 and 10 (with 1 being very coarse and 10 being very fine).
Data type: integer
filename
The name of the CAD file. See Comments below.
Data type: string
component1, component2, componentN
The component(s) from the CAD file. If all components are required, leave this blank. If various components are required, separate them by commas and put brackets, {} , around the list.
Data type: string vector
GLOBAL|PART|MARKER
Indicates the method of reference to position the graphic object. GLOBAL means the graphic is positioned with regard to the Global Frame. If PART is used, it indicates that the graphic has to be positioned using a Body. This keyword should be followed by align_b1 attribute that refers to a body. If MARKER is used, it indicates that the graphic is positioned using a marker followed by attribute align_mrk1 referring to a marker.
Data type: keyword
align_b1
When align_meth1 is set to PART this argument specifies the body whose coordinate system (BCS) is to be used as the reference frame to locate/orient and scale the graphic object.
Data type: Body
align_mrk1
When align_meth1 is set to MARKER this argument specifies the marker with regard to which the graphic object is located/oriented and scaled.
x, y, z
Origin of the graphic object with regard to the align_b1 or align_mrk1.
Data type: real, real, real
psi, theta, phi
The three euler angles (in radians) of the graphic object with regard to the align_b1 or align_mrk1.
Data type: real, real, real
scale_x, scale_y, scale_z
Three scaling factors for the graphic object in the cartesian directions of the reference frame.
Data type: real, real, real

Example

Example 1
In the following example, a graphic is defined using a parasolid file sample_cad.x_t. The graphic sources two components Dummy-Top and Roller3. The graphic is defined using the Global_Frame as reference with a fidelity setting of 50.0:
*Graphic( gcad_0, "CADGraphic 0", CADGraphic, B_Ground, false, 50.0, 
sample_cad.x_t", {"Dummy-Top", Roller3}, MARKER, Global_Frame, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 )
Example 2
In the following example, a graphic is defined using a parasolid file car.x_t. The graphic sources two components body and wheel . The graphic is defined using the GLOBAL keyword for positioning as reference and is positioned at 1000, 0, 0 with regard to Global and rotated by 1.57 radians about the Z axis. A material propmat_aluminium is applied to this graphic:
*Graphic(gr_unibody, "Unibody",  CADGraphic, , 
                                50, 
                                b_unibody, 
                                "car.x_t", 
                                {"body", "wheel"}, 
                                GLOBAL, 
                                1000, 0, 0, 
                                1.57, 0, 0, 
                                1, 1, 1)
*Set( gr_unibody.materialprop, propmat_aluminium )
Example 3
In this example, a CADGraphic is defined by using the body b_0 as its position reference and the graphic is scaled by 1000.0 in X, Y, and Z direction, respectively. The list of components is empty indicating all components available in the CAD file are assigned to this graphic:
*Graphic( gcad_0, "CADGraphic 0", CADGraphic, b_link, false, 38.0, model.prt", 
          {}, PART, b_0 , 0.0, 0.0, 0.0, 0.0, 0, 0, 1000, 1000, 1000.0 )

Context

*BeginMdl()

*DefineAnalysis()

*DefineGraphic()

*DefineSystem()

*DefineAssembly()

Comments

The CADGraphic supports several CAD formats such as Parasolid, STEP, Creo, IGES, SolidWorks, UniGraphics, CATIA (V4 & V5), ACIS, JT, VDA, Inventor and VRML. MotionView automatically identifies the type of CAD format based on the file and its extension.

Material can also be assigned to a CAD graphic by a *Set statement See Example 2 above. A list of materials is available by default. Refer to Material Properties section. This is useful obtain properties of the parent body based on the CAD geometry and density of material assigned.

The display and properties derived using the CAD file is dependent on length unit setting. If Unit information is available in the CAD file, MotionView will utilize this information and scale the graphics and calculate inertia properties to units set in MotionView.

This type of graphic is written as <Post_Graphic statement in MotionSolve XML. During export, all graphics of type CADGraphic are written to a separate parasolid file referenced by the graphic_file attribute in the <Post_Graphic statement.