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
From the File menu, select Import CAD....
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.
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:
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.
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.
In the Object Tree on the left of the Import CAD window, Ctrl-click on baseBlock and baseLetters.
Right-click on baseLetters and then select Create Subassembly. Alternatively, you can click Create Sub-assembly (
) in the toolbar.
Enter Base in the Name field.
The Object Tree updates to include the new Base sub-assembly. Base has two children, baseBlock and baseLetters.
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.
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.
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:
Click Coord (
Depending on the size of the model, the preparation (that is, arc detection) may take a while.
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).
Click on the surface to place the Coord.
Press Esc to exit Coord mode
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.)
Select the Coord in the Object Tree.
Press Ctrl + C to make a copy of the Coord.
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.
Rename the Coord attached to baseRail by doing the following:
Select the Coord attached to the baseRail.
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.
Enter toSlider in the name field.
Rename the Coord attached to slider by doing the following:
Select the Coord attached to the slider.
Enter toBase in the name field.
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.
Attach another Coord to the baseBlock.
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.
Select toGround in the Object Tree.
Click Display Settings (
Select Units, and then select deg from the Rotation list.
In the Object Tree, right-click on toGround, and then select Properties.
Select the Pos tab, and then enter 0 (zero) for Rx.
This setting will align the axes of toGround with the Orientation Indicator axes.
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.
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.
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.
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:
From the Hierarchy, drag a Base component onto the Model Workspace.
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.
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:
The toGround port.
The toSlider and to and toBase matched ports.
A Rigid Body Frame connecting toSlider to the center of mass (CoM) of Base.
A Rigid Body Frame connecting toGround to the CoM of Base.
A Rigid Body Frame connecting toBase to the CoM of slider.
A Rigid Body at the CoM of slider.
A Rigid Body at the CoM of Base.
Tip: Click Show/hide implicit geometry (
) to hide the multibody components.
Show the port labels on the components by doing the following:
In the Model Workspace, right-click on the Base1 component, and then select Show Port Labels.
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.
Click Show 3-D Workspace (
) in the MapleSim toolbar.
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.
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.
In the Library Components tab (
), expand the Multibody > Joints and Motions menu, and then drag a Prismatic joint to the left of slider1.
Right-click on P1, and then select Rotate Counterclockwise.
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.
In the Local Components tab (
), expand the Hierarchy > Hierarchy > Mechanism menu, and then drag a rod component to the right of slider1.
Drag a Wheel component to the right of Base1.
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.
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.
Click on the circular arc to place a Coord at the center of the hole.
Rename this Coord toWheel.
Place your pointer of the circular arc of the hole on the left end of the rod, and then click on the circular arc.
Rename this Coord toSlider.
The following figure shows the proper placement of the Coords on rod.
In the Object Tree, select the toWheel Coord, and then press Ctrl + C.
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.
Right-click on rod1, and then select Show Port Labels.
Double-click on Wheel1 to open the CAD subsystem in the Feature Detect window.
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.
Rename this Coord toRod.
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.
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.
Rename this Coord toBase.
Select toBase in the Object Tree, and then press Ctrl + C.
Double-click on Base1 to open the CAD subsystem in the Feature Detect window.
In the Object Tree, select baseBlock, and then press Ctrl + V.
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.
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.
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.
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.
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.
Double-click on rod1 to open the CAD subsystem in the Feature Detect window.
In the Object Tree, select toSlider, and then press Ctrl + C.
Double-click on slider1 to open the CAD subsystem in the Feature Detect window.
In the Object Tree, select slider, and the press Ctrl + V.
Rename the Coord you just pasted toRod.
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.
In the Library Components tab (
), expand the Multibody > Joints and Motions menu, and then drag a Revolute joint to the right of Base1.
Drag a second Revolute joint to the right of Wheel1.
Right-click on the Revolute you placed to the right of Wheel1, and then select Rotate Counterclockwise.
Drag a third Revolute joint above slider1.
Right-click on the Revolute you placed to the right of slider1, and then select Flip Horizontal.
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.
Expand the Multibody > Bodies and Frames menu, and then drag a Fixed Frame component to the left of Base1.
Connect the Fixed Fame component to the toGround port on Base1.
Before simulating the slider-crank a Constant Speed component will be added that will drive the slider-crank during its simulation.
Select the Library Components tab (
Expand the 1-D Mechanical > Rotational > Motion Drivers menu, and then drag a Constant Speed component between the R1 and R3 components.
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.
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.
Download Help Document
What kind of issue would you like to report? (Optional)