Tutorial: Building a Slider-Crank Model with the CAD Toolbox - MapleSim Tire Component Library Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MapleSim Toolboxes : MapleSim CAD Toolbox : CADToolbox/tutorial

Tutorial: Building a Slider-Crank Model with the CAD Toolbox

In this tutorial, you will build a slider-crank mechanism from a .step file by performing the following tasks:

• 

Import the CAD drawing

• 

Group parts into a sub-assembly

• 

Add Coords and then import the CAD subsystems into MapleSim

• 

Build the slider-crank

• 

Simulate the model

Import the CAD drawing

1. 

From the File menu, select Import CAD....

2. 

Browse to the following directory:

  

C:\Program Files\Maple 2018\toolbox\CadToolbox\examples

  

Note: This assumes that your Maple installation directory is C:\Program Files\Maple 2018\. If you installed Maple in a different location, replace C:\Program Files\Maple 2018\ with the correct location.

3. 

Select the Mechanism.step CAD file, and then click Open.

  

The CAD Toolbox window opens and a progress bar will show import progress.

  

Once the import process is finished, the parts included in the assembly are shown in the Import CAD window:

4. 

Orient the CAD assembly in the CAD Workspace using the Pan ( ), Zoom ( ), Rotate ( ), Box Zoom ( ), and View All ( ) view modes.

  

Tip: Press ESC to exit any of these view modes and return to select mode ( ).

  

See Panning, Zooming, Rotating, Box Zooming, and Viewing the Entire Model for more information on these view controls.

Group parts into a sub-assembly

The grouping of parts (that is, creating sub-assemblies) merges parts into a single body when importing them into MapleSim. You will create a sub-assembly from the baseBlock and baseLetters parts in the assembly.

1. 

In the Object Tree on the left of the Import CAD window, Ctrl-click on baseBlock and baseLetters.

2. 

Right-click on baseLetters and then select Create Subassembly. Alternatively, you can click Create Sub-assembly ( ) in the toolbar.

 

 

3. 

Enter Base in the Name field.

4. 

Click OK.

  

The Object Tree updates to include the new Base sub-assembly. Base has two children, baseBlock and baseLetters.

5. 

Drag baseRail onto the Base sub-assembly.

  

The Object Tree should resemble the following figure. Notice that baseRail is now part of the Base sub-assembly.

Tips: 

• 

You can add a part to a sub-assembly by dragging the part onto the sub-assembly in the Object Tree. Similarly, you can move a part out of a sub-assembly by either dragging it onto another sub-assembly or dragging onto the main assembly (which in this example is Mechanism).

• 

Each part has properties such as material (density), color, and translucency that you can set. To set the properties for a part, right-click on the part, and then select Properties. For more information on part properties, see Setting Part Properties.

Add Coords and then import the CAD subsystems into MapleSim

This section covers how to prepare parts and sub-assemblies so that they can be converted to CAD subsystems for use in MapleSim.

You will prepare the parts by adding local coordinate systems (Coords) to them. When the parts are converted to CAD subsystems, the Coords are converted to Multibody ports (or, simply, ports). Ports are needed in order to connect your CAD subsystems to other modeling components.

In particular, this section demonstrates how to add matched ports to two parts. Matched ports are necessary when you have to connect two CAD subsystems to the same component. Matched ports ensure that the geometry of your CAD assembly is preserved and that your model simulates accurately.

Ports can be added during import in the Import CAD window (current window) or after the parts have been imported into MapleSim in the Feature Detect window (for individual parts). This section shows you how to add matched ports in the Import CAD window. The following section demonstrates how to add matched ports in the Feature Detect window.

To prepare your parts and import them into MapleSim:

1. 

Click Coord ( ).

  

Depending on the size of the model, the preparation (that is, arc detection) may take a while.

2. 

Place your pointer on the flat surface of baseRail.

  

You will know when the pointer is over a flat surface when the color of the surface and the pointer change (see the following figure).


3. 

Click on the surface to place the Coord.

4. 

Press Esc to exit Coord mode

5. 

In the Object Tree, expand baseRail.

  

The new Coord is attached to (that is, is a child of) the baseRail. (The name of your Coord may be slightly different.)

 

6. 

Select the Coord in the Object Tree.

7. 

Press Ctrl + C to make a copy of the Coord.

8. 

In the Object Tree, select slider and then press Ctrl + V .

  

An exact copy of the Coord is attached to slider. Both of these Coords have the same position and orientation and will generate matched ports when you convert slider and baseRail to CAD subsystems.

  

Note: You can also drag a Coord between parts in the Object Tree.

9. 

Rename the Coord attached to baseRail by doing the following:

a. 

Select the Coord attached to the baseRail.

b. 

Click on the name of the Coord.

  

The name field can now be edited. You will rename this Coord for ease of reference in MapleSim.

c. 

Enter toSlider in the name field.

d. 

Press Enter.

1. 

Rename the Coord attached to slider by doing the following:

a. 

Select the Coord attached to the slider.

b. 

Click on the name of the Coord.

c. 

Enter toBase in the name field.

d. 

Press Enter.

  

Your Object Tree should now look like the following figure:

  

  

Note: You can also rename a Coord using the Coord Properties dialog. See Setting Coord Properties for details.

1. 

Attach another Coord to the baseBlock.

2. 

Press Esc.

3. 

Rename the Coord you added in step 11 toGround.

  

If you zoom into the Coord, you will see that the Z-axis of the Coord is not aligned with the Z-axis of the Orientation Indicator.

  

The orientation of the Coord determines how the part is oriented in MapleSim. You will now adjust the orientation of toGround so that it aligns itself with the Orientation Indicator.

4. 

Select toGround in the Object Tree.

5. 

Click Display Settings ( ).

6. 

Select Units, and then select deg from the Rotation list.

7. 

Click Close.

8. 

In the Object Tree, right-click on toGround, and then select Properties.

9. 

Select the Pos tab, and then enter 0 (zero) for Rx.

  

This setting will align the axes of toGround with the Orientation Indicator axes.

10. 

Click Close.

11. 

Press Z to get an orthogonal view of the CAD assembly from the positive Z-axis.

  

Tip: The current camera angle will be used to create the icons for the CAD subsystems in MapleSim. A good view will make your parts easier to recognize in MapleSim. The current view is also used to select the location of the ports on the CAD subsystem icons, therefore a good view will also make finding ports easier.

12. 

Click Accept and Return ( ) to finish importing your CAD drawing and convert the parts and sub-assemblies to CAD subsystems.

  

A MapleSim dialog box opens with a message telling you where the CAD subsystems are in your Hierarchy.

13. 

Click OK.

The parts from your CAD drawing have been converted to CAD subsystems and imported into MapleSim. The CAD subsystems can be found under the Local Components tab ( ), in the Hierarchy palette, in the Mechanism subgroup.

Notice that there is one CAD subsystem for each of the parts and sub-assemblies that were in the Import CAD window. There is also a _group Mechanism component. The _group Mechanism is a shared subsystem that contains all of the CAD subsystems you created.

Build the slider-crank

In this section you will build the slider-crank model in MapleSim by connecting the CAD subsystems in the Hierarchy to multibody components. You will also see how to add matched ports to two CAD subsystems using the Feature Detect window.

To build the slider-crank:

1. 

From the Hierarchy, drag a Base component onto the Model Workspace.

2. 

Drag a slider component onto the Model Workspace, placing it above the Base component.

  

In the Model Workspace the CAD subsystems are named Base1 and slider1, respectively. Notice that both components have a CAD subsystem icon ( ) in their lower left-hand corners. This icon is attached to all CAD subsystems in the Model workspace.

  

Tip: If you do not see the CAD subsystem icon, from the View menu, select Show Subsystem Markers.

3. 

Click Show 3-D Workspace (  ) in the MapleSim toolbar.

  

The Base and slider components are drawn in the 3-D Workspace in the correct positions and orientations. If you have show implicit geometry ( ) and axis visibility ( ) selected, you will see the multibody ports (axes), Rigid Body Frames (cylinders), and Rigid Bodies (spheres) that make up the Base and slider CAD subsystems. Specifically, you should see the following features:

A. 

The toGround port.

B. 

The toSlider and to and toBase matched ports.

C. 

A Rigid Body Frame connecting toSlider to the center of mass (CoM) of Base.

D. 

A Rigid Body Frame connecting toGround to the CoM of Base.

E. 

A Rigid Body Frame connecting toBase to the CoM of slider.

F. 

A Rigid Body at the CoM of slider.

G. 

A Rigid Body at the CoM of Base.

  

Tip: Click Show/hide implicit geometry ( ) to hide the multibody components.

1. 

Show the port labels on the components by doing the following:

a. 

In the Model Workspace, right-click on the Base1 component, and then select Show Port Labels.

b. 

Right-click on the slider1 component, and then select Show Port Labels.

  

The port names are shown next to the ports. This makes it easier to identify ports when you make connections. Notice that the port names are the same as the names you gave the Coords.

1. 

Click Show 3-D Workspace ( ) in the MapleSim toolbar.

2. 

Click Always-On-Top ( ).

  

The Always-On-Top setting keeps the 3-D Workspace in focus even when you are working in another MapleSim window. This is useful when you want to work in the Model Workspace and at the same time see your model being assembled in the 3-D Workspace.

3. 

Place your pointer over one of the CAD subsystem ports.

  

The port becomes highlighted and a tooltip appears with the name of the port. Also, the axis for the port is highlighted in the 3-D Workspace.

4. 

In the Library Components tab ( ), expand the Multibody > Joints and Motions menu, and then drag a Prismatic joint to the left of slider1.

5. 

Right-click on P1, and then select Rotate Counterclockwise.

6. 

Make the following connections between Base1, P1, and slider1.

  

Note: The figure from step 7 shows that the sliding axis between the Base and slider is the X-axis (the red arrow). The Prismatic joint is set to allow movement in the X-axis by default, so you do not need to make any setting changes for this connection. 

7. 

In the Local Components tab ( ), expand the Hierarchy > Hierarchy > Mechanism menu, and then drag a rod component to the right of slider1.

8. 

Drag a Wheel component to the right of Base1.

9. 

Double-click on rod1.

  

The Feature Detect window opens with the rod in the CAD Workspace. You will now add Coords to this part so that you can connect it to other components.

10. 

Click Coord ( ).

11. 

Place your pointer over the circular arc of the hole on the right end of the rod.

  

You will know when you are over an arc when the pointer changes to a crosshair (see the following figure). Also, circular arcs are automatically detected and highlighted when you are in the add Coord mode.

  

12. 

Click on the circular arc to place a Coord at the center of the hole.

13. 

Rename this Coord toWheel.

14. 

Place your pointer of the circular arc of the hole on the left end of the rod, and then click on the circular arc.

15. 

Rename this Coord toSlider.

  

The following figure shows the proper placement of the Coords on rod.

  

16. 

In the Object Tree, select the toWheel Coord, and then press Ctrl + C.

17. 

Click Accept and Return ( ), and then click OK.

  

Note that the rod components in the Hierarchy and on the Model Workspace have the toSlider and toWheel ports attached to them. This is due to CAD subsystems actually being shared subsystems. Changes that you make to one instance of a CAD subsystem are made to all instances, including its definition.

18. 

Right-click on rod1, and then select Show Port Labels.

19. 

Double-click on Wheel1 to open the CAD subsystem in the Feature Detect window.

20. 

In the Object Tree, select Wheel, and then press Ctrl + V.

  

This attaches an exact copy of the Coord you copied from rod1 to Wheel. This Coord will generate a matched port to the toWheel port on rod1.

21. 

Rename this Coord toRod.

22. 

Click on an empty section of the CAD Workspace, and then press Shift + X.

  

Your view changes to an orthographic view from the negative X-axis and you can now see the shaft of the Wheel.

23. 

Click Coord ( ), place the pointer on the arc at the end of the shaft (see the following figure), and then click on the arc to place the Coord at the end of the shaft.

  

Important: A correctly placed Coord will have its Z-axis perpendicular to the end of the shaft (see the following figure). If the Coord is not placed correctly, delete it, and then repeat this step until the Coord is in the correct position and orientation.

24. 

Press Esc.

25. 

Rename this Coord toBase.

26. 

Select toBase in the Object Tree, and then press Ctrl + C.

27. 

Click Accept and Return ( ), and then click OK.

28. 

Double-click on Base1 to open the CAD subsystem in the Feature Detect window.

29. 

In the Object Tree, select baseBlock, and then press Ctrl + V.

30. 

Rename the Coord you just pasted toWheel.

  

The toWheel Coord is placed on the back of baseBlock. If you want to verify this, rotate baseBlock.

31. 

Click Accept and Return ( ), and then click OK.

32. 

Right-click on Wheel1, and then select Show Port Labels.

  

Look at the locations of the matched ports you have just added, toWheel and toBase. You will be connecting these ports to a common component, which would be easier if toBase were on the left edge of Wheel1. This change will be made in the following four steps by changing the icon for Wheel.

33. 

Double-click on Wheel1 to open the CAD subsystem in the Feature Detect window.

34. 

Click on an empty section of the CAD Workspace, and then press Shift + X.

  

In this view, toBase is on the left and toRod is on the right. These are the preferred locations for these ports on the Wheel1 icon.

35. 

Click Capture Icon Image ( ).

  

The Capture Icon Image feature takes an image of the part in the CAD Workspace and then uses that image for the icon of the CAD subsystem. It also uses the locations of the Coords relative to the center of mass of the part to place the ports on the CAD subsystem.

36. 

Click Accept and Return ( ), and then click OK.

  

The icon for the Wheel CAD subsystem changes to the new view with the toBase and toRod ports in the preferred locations.

  

For more information on changing the icon for a CAD subsystem and the placement of ports, see Changing the Icon for a CAD Subsystem.

37. 

Double-click on rod1 to open the CAD subsystem in the Feature Detect window.

38. 

In the Object Tree, select toSlider, and then press Ctrl + C.

39. 

Click Accept and Return ( ), and then click OK.

40. 

Double-click on slider1 to open the CAD subsystem in the Feature Detect window.

41. 

In the Object Tree, select slider, and the press Ctrl + V.

42. 

Rename the Coord you just pasted toRod.

43. 

Click Accept and Return ( ), and then click OK.

  

The components in your Model Workspace should resemble the following figure. You will now complete your model so that it can be simulated in MapleSim.

44. 

In the Library Components tab ( ), expand the Multibody > Joints and Motions menu, and then drag a Revolute joint to the right of Base1.

45. 

Drag a second Revolute joint to the right of Wheel1.

46. 

Right-click on the Revolute you placed to the right of Wheel1, and then select Rotate Counterclockwise.

47. 

Drag a third Revolute joint above slider1.

48. 

Right-click on the Revolute you placed to the right of slider1, and then select Flip Horizontal.

49. 

Connect the components as shown in the following figure.

  

Note: The Revolute joints all rotate about the Z-axis by default. All of the matched ports that you created have their Z-axes aligned and in the same orientation at the Z-axis in MapleSim. Therefore, you do not need to make any settings changes to the components you have just added.

50. 

Expand the Multibody > Bodies and Frames menu, and then drag a Fixed Frame component to the left of Base1.

51. 

Connect the Fixed Fame component to the toGround port on Base1.

Simulate the model

Before simulating the slider-crank a Constant Speed component will be added that will drive the slider-crank during its simulation.

1. 

Select the Library Components tab ( ).

2. 

Expand the 1-D Mechanical > Rotational > Motion Drivers menu, and then drag a Constant Speed component between the R1 and R3 components.

3. 

Connect the flange from the Constant Speed component to flange_b on R1.

  

The following figure shows the complete model with all  the appropriate connections.

4. 

Click Run Simulation ( ).

  

After the simulation completes, the Simulation Results tab in the Analysis window opens. Press Play ( ) to play a 3-D animation of the slider-crank model in the 3-D Playback Window.