|
|
|
|
|
|
|
Tip #2 - Parametric Part Arrays
Note: This will work in both versions 2.0 and 3.0 of
Mechanical Desktop®.
Hi and welcome back to the second in our series of Mechanical Desktop® tips and tricks, Parametric Part Arrays. As you know, the AMARRAY command lets you do a parametric polar or rectangular array of any feature of the model, but try picking the base feature of the model to array and you are greeted with the error message "can't array base feature". You could use the AutoCAD® ARRAY command but this is not parametric and requires you to manually erase and re-array the part each time the model changes. The ARRAY command will also create (depending on the size of the array) tens and maybe hundreds of part instances. This dramatically reduces performance and increases file size and save time.
Our solution builds on the previous example's use of a "dummy" base feature. When the "real" part geometry is added to this tiny "dummy" base feature, it then becomes available for the AMARRAY command to use, thus allowing you to create a parametric array of the defined part.
Since this is not true parametric part instancing, there is one limitation. As in the previous example, when a mass property inquiry is made against the part, all output is correct. However, the browser (and any bill of material listing) will show the arrayed part as only one instance, regardless of the array values. If you are using the bill of material feature in Mechanical Desktop®, keep this in mind. (In our applications, we keep the real count in the related Excel spreadsheet and insert the data from there.)
In this example, we will create a polar array of pins (that must be inserted into each hole of a circular flange). The number and size of the pins will be controlled parametrically using design variables. As in the previous example be sure you can create and manipulate table driven Local Part Variables. Although I prefer to use Global Variables in my assemblies (along with a utility that imports the values from Excel and updates all the parts and the assembly), I have used Local Variables in the example to utilize the built in Excel to Mechanical Desktop link.
Please keep in mind that this technique works equally as well with rectangular arrays!
You should now have Mechanical Desktop® open and be ready to create a new part. Following are step by step instructions to create the polar array of pins.
Step 1 - Create the Variables
Table 1 shows the variable names and values to create. Figure 1 is a screen shot
of the AMVARS dialog showing all the variables required.
Table 1 - Variables |
||
| Name | Value (Formula) | Comment |
| pin_od | .75 | Pin Body Diameter |
| pin_length | 2 | Pin Length |
| pin_cap_dia | pin_od*2 | Pin Cap (Head) Diameter |
| pin_cap_thk | pin_od*1.25 | Pin Cap (Head) Thickness |
| pin_circle_dia | 15.5 | Pin Circle Diameter (for Array) |
| number_of_pins | 8 | Number of Pins in the Array |

Figure 1.
Step 2 - Create the "Dummy" Base
Feature.
This base feature will simply be a small cylinder 0.01 in diameter.
Extrude in the minus Z direction to a depth of 0.01. Variables are not needed as
this feature will not change.
Step 3 - Create the Pin Body Feature.
Create a new circle profile and constrain it concentrically to the profile of
the "dummy" feature. Set the diameter equal to the variable pin_od
and extrude (using the JOIN option) in the minus Z direction and set the depth to the
variable pin_length. Create the work axis and red and black work
planes as shown in Figure 2. Now comes the fun part. We need
to have an axis at the center of the array to anchor the polar array. AMARRAY allows
you to use both a work axis or a work point for this. Since Mechanical Desktop®
does not allow you to place a work axis unless it is anchored to a cylinder, cone or torus
(at least in version 2.0....I understand that this will change in version 3.0....), we are
left with the work point. Remember too that we will want to vary the distance of the
work point to the pin (since the pin circle diameter may vary...), so we will use the good
old work plane to anchor the work point to (Yes, you can constrain a work point to other
features). So first let us create the "center" work plane. Create a
work plane planar parallel/offset to the black work plane. Set the offset value
equal to pin_circle_dia/2. Now create the work point and place it
as shown in Figure 2. Since the work point is locked to the sketch
plane it was created on (the Z direction), we will need to constrain the work point in the
X and Y directions. One warning here.....I have found that if the work point is in
contact with another feature (don't ask me why....) It becomes impossible to select for
constraining. Therefore, you must project constrain (The ENDPOINT OSNAP works good
here....) the work point in the following order: Project constrain to the red work plane
and then to the green "center" work plane. Your model should now look like
Figure 3.

Figure 2.

Figure 3.
Step 4 - Add the Pin Cap Feature.
Create a new circle profile and constrain it concentrically to the profile of
the Pin Body feature. Set the diameter equal to the variable pin_cap_dia
and extrude (using the JOIN option) in the positive Z direction and set the depth to the
variable pin_cap_thk. Your model should now look like Figure
4.

Figure 4.
Step 5 - Set Up the Polar Array.
Create the array using the AMARRAY command. When asked to select the
feature to array, select the PIN BODY feature. If you select the lowest feature in
the tree that you want to array, all the features above it will be arrayed also (even
though they are not highlighted during the selection). Select the Polar tab and set
the Number of Instances equal to the variable number_of_pins, and set the
Angle Type to Full Circle. You will then use the work point as your array center.
After the completion of the command, your model should look like Figure 5.
(I have turned off the work plane and work axis visibility....).

Figure 5.
Step 6 - Link the variables to the spreadsheet.
Using the AMVARS command, link the local parameters to an Excel spreadsheet.
Edit the spreadsheet as shown in Figure 6. We have renamed
the "generic" values to "Size 1" and added values for 2 other possible
versions for the part, "Size 2" and "Size 3". Update the link
and return to Mechanical Desktop®.

Figure 6.
Step 7 - Update the Part!!!
The browser will now show 3 possible configurations for the part (you can add
as many as you like!!!), see Figure 7. All you need do now is
double-click on the version name that you wish to activate in the browser and the pin
array will update automatically.

Figure 7.
| DOWNLOAD!!! |
| Click Here to go to the download page to obtain the files used in this example (Mechanical Desktop® version 2 and Excel 95). |

Figure 8.
Mechanical Desktop® Tips & Tricks | What We Do | About Us | Links and Other Stuff
Copyright © 2000 LeaCar Consulting Inc. All rights reserved.