*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.
- label
- The descriptive label of the graphic.
- CADGraphic
- Indicates the graphic is a CAD graphic and that the following file name refers to the CAD file.
- body
- The body associated with the graphic.
- 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).
- filename
- The name of the CAD file. See Comments below.
- 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.
- 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.
- 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.
- 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.
- psi, theta, phi
- The three euler angles (in radians) of the graphic object with regard to the align_b1 or align_mrk1.
- scale_x, scale_y, scale_z
- Three scaling factors for the graphic object in the cartesian directions of the reference frame.
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:
- 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:
- 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:
Context
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.