The subject of AutoCad’s constraints has come up a few times recently, as such, I would like to take some time to explore the functionality of these native tools within AutoCad’s Block Editor.

Let’s start with the basics. Constraint is defined as the state of being restricted or confined within prescribed bounds. Some practical examples are items such as; W-Beams, Plates and Hole Circles, and Threaded Rod. All of these items have tolerances and properties based on ratios and formulas that describe the overall shape for a standard production.

For this series we will look at making a block to display all Unified Thread Profiles using the information below for a 9/16” coarse thread rod. We will be utilizing the Major Diameter of the thread as well as the desired Threads Per Inch.

Nominal Diameter Major Diameter Threads Per Inch
916 0.5625” 12

 
This may seem to be a lot of information but we will deal with only with the above numbers in our exercise. Firstly, you can see there are only two variables to making thread. The first variable is P, this is simply 1/Threads Per Inch, or 1/12 [0.8333333] and is referred to as the Pitch of the thread. The second variable is H, this is the height of the total thread, point to point. To solve for the value of H, AutoCad will calculate P * 0.866666.

To summarize the information available at Wiki [https://en.wikipedia.org/wiki/Unified_Thread_Standard];
P = 1/Threads Per Inch
H = P * 0.86666

AutoCad will also be utilized to calculate the diameters; Pitch Diameter (Dp) and Minor Diameter (Dmin).

Pitch Diameter (Dp)        = Major Diameter – 0.649519 * P
Minor Diameter (Dmin) = Major Diameter – 1.082532 * P

Inside AutoCad, make a basic thread shape as shown below;

Create a block from the two red shapes above and edit the new block in the Block Editor.

User Parameters

Once the Block Editor has been started, issue the PARAMETERS command. The Parameters Manager Pane will launch as shown (lower left). Utilizing the Create New Parameter command (*fx icon), the parameters below need to be created to define the bounds that the constraints will adhere to. Notice the SHOW column dictates that only the Major Diameter and Threads Per Inch are set to be shown. This will allow the block user to set the value of these parameters via the Properties Panel while hiding the other non-editable formula values.

Parameter Name      Value                    Show Desc
Major_Diameter    .5625 Yes Thread Body Diameter
Threads_Per_Inch    18   Yes Thread Count
aPitch               60 No  Pitch Angle
dHeight           Sqrt(3)/2*dPitch No  Thread Height
dPitch 1/Threads_Per_Inch No  Pitch Distance
dRoot dHieght*17/24 No  Root Depth
rFillet dPitch*0.108 No  Rounded Root Radius
rMaj        Major_Diameter/2 No  Radius – Major Diameter
rMin  (Major_Diameter-5*Sqrt(3)/8*dPitch)/2 No Radius – Minor Diameter
rPitch (Major_Diameter-3*Sqrt(3)/8*dPitch)/2 No Radius – Pitch Diameter

Next, the constraints will be applied to the geometry within the block utilizing the Constraints tab on the Block Authoring Palette (above right).

Geometric Constraints

Begin by creating a new vertical line within the Block Editor (as shown [cyan]) and apply a Vertical parameter to the end points of the line. It is now possible to edit the value in place via the text editor however, if an erroneous value is supplied the constraint will disappear. The values and parameter name can be edited via the Properties Panel as well. Set the length to dPitch*2.5. Apply a Vertical constraint to the new line.

The next constraint to apply is the Coincidental Constraint. The first point will be the vertical midpoint of the external thread profile center line. The second point will be the midpoint of the newly created line. The order of selection is important for a properly functioning block. Take the time to reverse the selection order and notice that the thread block distorts to coincide with the midpoint of the newly created line.

In order to make sure that the block does not distort during use other constraints need to be applied. Firstly, a Vertical Constraint needs to be applied to the thread profile’s centerline. This will keep that line vertical within the block’s coordinate system. This will serve as the “anchor” for the rest of the geometry.

Be aware that the adage “Less is More” holds true with constraints. AutoCad will give an alert if too many constraints are applied to an entity and the reason for the alert. Most commonly an alert is given due to a contradictory constraint on a given entity.

Next, apply a Perpendicular Constraint between the vertical “centerline” of the thread profile and the top horizontal line. Now that we have the 2 lines locked at 90 degrees a good number of the remaining constraints will be of the Parallel type to ensure the rest of the geometry stays aligned properly.

Apply (3) three Parallel Constraints, 1) top horizontal line, bottom horizontal line; 2) vertical center line, top vertical polyline segment; 3) vertical center line, second top polyline segment.

The next constraint type to be used is the Collinear Constraint. Now that the top (2) two vertical lines of the thread are constrained to be parallel to the center line, the remaining lines can be constrained to be collinear with the first two constrained lines. Apply a Collinear Constraint to the top vertical polyline segment and the next segment below on the Y axis, repeat a second time applying the Collinear Constraint between the top most polyline segment and the lower most segment. Next apply a Collinear Constraint between the second pair of vertical lines and the lower segment below on the Y axis.

Next, apply a Fix Constraint to the top left corner of the thread profile (or the desired basepoint).

Create a helper line on the Defpoints layer near the top horizontal line and rotate the line 30 degrees. Apply the Coincidental Constraint by selecting the upper most end point of the helper line. Next select the option Object and select the top horizontal line of the thread profile. This will lock the endpoint of the helper to the same plane of the horizontal thread profile segment.

Constraint Parameters

Next, apply an Angular Parameter between the top horizontal line and the helper line placing the parameter inside the angle. Set the value to aPitch/2 to constrain this helper line to a 30 degree angle off of the top horizontal line.

The next constraint parameter will be the Horizontal Parameter. First, select the midpoint of the centerline of the thread profile and then select the midpoint of the top most polyline segment of the thread. Set the value to equal rMaj-dRoot. Repeat the process for the outermost upper thread crest and set the value to rMaj. If the thread profile distorts, use polyline midpoints to regain the general thread shape. Apply a new Horizontal Parameter between the thread profile’s center line midpoint and the upper most end point of the helper line. Set the value to equal rMaj-dHeight*7/8.

Apply a Collinear Constraint between the helper line and the upper most thread diagonal. Apply a Horizontal Parameter between the thread’s centerline midpoint and the outer most end point of the helper line setting the value to rMaj+dHeight*1/8.

Create a new horizontal helper line and apply a Horizontal Parameter setting the value to dHeight. Apply a Parallel Constraint between the upper thread horizontal polyline segment of the thread profile. Apply a Coincidental Constraint from the outer most endpoint of the new helper line and the outermost endpoint of the first helper line.

To complete the first thread point, utilize the Symmetric Constraint by selecting the upper most thread diagonal and the next lowest diagonal. Select the last helper line when prompted for a symmetry line. Apply a Horizontal Parameter from the outer most endpoint of the helper line to the midpoint of the uppermost thread flat’s midpoint setting the value to dHeight/8.

Create a third helper line and apply a Coincidental Constraint to the left most end point, select the option Object for the second point and select the outer most flat of the upper thread crest. Apply a Horizontal Parameter and set the value to 3 * dHeight / 8. Apply a Parallel Constrain between the upper horizontal of the thread profile and the new helper line. Lastly, apply a Vertical Parameter from the second helper line and the new helper line. Set the value to equal dPitch/2.

To create the constraints for the second thread crest simply apply the Symmetrical Constraint selecting the lower diagonal on the first thread crest and the next lowest diagonal utilizing the last helper line as the symmetry line. Apply a second Symmetrical Constraint to the upper most diagonal and the lower most diagonal utilizing the last helper line as a line of symmetry.

To finish this simple shape a Vertical Parameter needs to be added to the threads’ polyline segment that is the centerline of the thread. Set the value to equal dPitch*2.

Now the thread’s root fillets can be created by filleting the upper thread diagonal and the upper vertical root line with a fillet as defined by the User Parameter rFillet 0.006” for this example. After filleting all four locations between the diagonals and the thread root line apply a Radius Parameter to the uppermost fillet with the value rFillet. Apply a Horizontal Parameter from the uppermost vertical line segment on the thread’s root line and the center point of the fillet setting to the value to rFillet.  Apply a second Horizontal Parameter from the uppermost vertical line segment on the thread’s root line and the fillet end point lying on the thread’s diagonal setting the value to rFillet/2.

Utilizing the previous horizontal lines as lines of symmetry, apply Symmetrical Constraints to the remaining (3) three filets to complete the complex shape.

Using the Parameters Panel ensure that all of the newly created constraints and parameters are set to NO under the column SHOW. The only two parameters that should be showing are Major_Diameter and Threads_Per_Inch.

Close the block editor saving your progress, open the Properties Panel and select the new block. Locate the Custom properties; Threads_Per_Inch and Major_Diameter. Changing these values will change the thread profile block to fit the information provided here.

Congratulations, you have now created the external thread profile for ALL Unified Thread Standard sizes! Practice the skills by completing the Internal Thread profile.

The completed block inside the Block Editor,
The completed block ready to be manipulated via the Custom Properties.