Tag Archives: Tutorial

A & B Tip 9 – drilling holes 3 – counterbores

In this series of posts, I’ll be providing tips that show how to do something in both AutoCAD and BricsCAD, hence A & B.

The Series

The idea behind this series is to provide useful information for several sorts of reader:

  1. AutoCAD users.
  2. BricsCAD users.
  3. People in the process of transitioning from AutoCAD to BricsCAD and who need to know what to do differently (if anything).
  4. People considering transitioning from AutoCAD to BricsCAD and who want to know about the differences and similarities.

Counterbored holes

This post continues to explain more about how to put holes in your 3D models. In this post I’ll be describing how to construct counterbored holes. Hint: the most efficient method is described last.

I’m going to start with this model and use different methods to create three counterbored diameter 10 holes that go through the block, each with a diameter 20 x 18 deep counterbore. I’ve placed circles of diameter 10 and 20 in place to indicate where the holes are going to go, and in some cases to act as the basis for extrusion.

If you’re unsure about how to locate these circles in exactly the right spots in 3D space, see my earlier drilling holes posts, part 1 and part 2.

Extruding circles

Assuming we have appropriate circles to work with, we can extrude them to create cylinders, then subtract them. This works in basically the same in both AutoCAD and BricsCAD, but there are differences:

AutoCAD BricsCAD
Invoke the EXTRUDE command:
Invoke the EXTRUDE command:
Select the inner circle and press Enter to complete the selection process:
Select the inner circle and press Enter to complete the selection process:
Move your cursor down and click when the extrusion goes beyond the bottom of the block:
Enter a negative number that equals or exceeds 100 (the thickness of the block):
If you just pick a point as per AutoCAD, the extrusion will go up rather than down. It’s also possible to point to the direction and amount to extrude by using the Direction subcommand and picking two points, for example a top and bottom corner of the solid.
Repeat the above process for the second circle, but this time specify an extrusion height of 18 while the cursor is located such that the extrusion is going down rather than up:
Repeat the above process for the second circle, but this time specify an extrusion height of -18. It has to be negative, otherwise the extrusion will go up even if you’re pointing down (unlike AutoCAD).

We’ll subtract these cylinders later.

Drawing cylinders

You can draw cylinders to subtract without needing construction circles. In this case one of the circles is just used to help locate the cylinder center point, but you can use other methods that involve no construction geometry instead, as explained in my first drilling holes post.

AutoCAD BricsCAD
Invoke the CYLINDER command (Solid, not Surface):
Invoke the CYLINDER command (Solids, not Meshes):
Locate the center of the cylinder, in this case using the center object snap:
Locate the center of the cylinder, in this case using the center entity snap:
Enter a radius of 5:
Enter a radius of 5:
Move your cursor down and click when the extrusion goes beyond the bottom of the block:
Move your cursor down and click when the extrusion goes beyond the bottom of the block:
Repeat the above process for the second cylinder, but this time specify a height of 18 while the cursor is located such that the extrusion is going down rather than up:
Repeat the above process for the second cylinder, but this time specify a height of -18:

Subtracting the cylinders

We can subtract all four cylinders at once to create two of the counterbored holes. This process is the same in both applications.

AutoCAD BricsCAD
Invoke the SUBTRACT command:
Invoke the SUBTRACT command:
Select the main solid as the object to subtract from and press Enter to complete that selection. Then select the cylinders to remove. This is easiest with an implied window. Pick a corner point containing no objects, starting on the left. Then pick the opposite corner to the right.
Press Enter to complete that selection and the command.
Select the main solid as the object to subtract from and press Enter to complete that selection. Then select the cylinders to remove. This is easiest with an implied window. Pick a corner point containing no objects, starting on the left. Then pick the opposite corner to the right.
Press Enter to complete that selection and the command.
End result:
End result:

Note that the first method replaces the circles with cylinders. The second method only uses the circles to help locate the center; they don’t really need to be there at all and are ignored.

Presspulling or Push/pulling

As described before, planar objects such as circles can be extruded by presspulling them. We’ll use that method to create the third counterbored hole. In this case, the operations differ somewhat between AutoCAD and BricsCAD.

AutoCAD BricsCAD
Hold down Ctrl+Shift+E to turn on dynamic presspull mode, hover over the space between the two circles and pick:
Hover over the inner circle. You should see the Quad Cursor appear, suggesting a push/pull operation. Pick the icon to accept that operation:
Now you can release Ctrl_Shift+E. Move your cursor down and enter 18:
Move your cursor down beyond the bottom of the block and pick.

Note the on-screen reminder that you can hit the Ctrl key to switch between several different types of push/pull operations. We can ignore this because in this case we want to use the default. However, it’s worth noting that this feature exists because it’s very handy.
Hold down Ctrl+Shift+E to turn on dynamic presspull mode, hover over the inside of the inner circle and pick. Release Ctrl+Shift+E, move your cursor down beyond the bottom of the block and pick:
Hover over the outer circle and pick the push/pull icon on the Quad Cursor. You could enter a height of -18, but in this case there’s a handy nearby hole counterbored to the correct depth and we can just pick the center of that instead:
In the AutoCAD presspull end result, the circles are left behind so if you don’t want them you will need to erase them.
Note also that your UCS origin is changed by this operation even if dynamic UCS is turned off. To restore it, use UCS Previous or use the UCS menu under the ViewCube to change it to World or any other named UCS:
In the BricsCAD push/pull end result, the circles are converted to holes so no more action is required. No UCS restoration is necessary.

Summary

Assuming you have construction circles in place, presspulling is the most efficient of the three methods in AutoCAD, even allowing for the tidy-up required at the end.

BricsCAD’s Quad-based push/pull operation is the most efficient method of the lot. Hover, pick, pick and hover, pick, pick is enough to create a counterbored hole.

Next: countersunk holes.

A & B Tip 8 – drilling holes 2

In this series of posts, I’ll be providing tips that show how to do something in both AutoCAD and BricsCAD, hence A & B.

The Series

The idea behind this series is to provide useful information for several sorts of reader:

  1. AutoCAD users.
  2. BricsCAD users.
  3. People in the process of transitioning from AutoCAD to BricsCAD and who need to know what to do differently (if anything).
  4. People considering transitioning from AutoCAD to BricsCAD and who want to know about the differences and similarities.

Drilling holes

This post continues to explain more about how to put holes in your 3D models. More than one method involves starting with a planar object (e.g. a circle for a cylindrical hole), but it needs to be in the right spot and in the right plane. The most efficient way of drawing an object in a given plane, where that plane exists on a 3D solid, is to use Dynamic UCS.

Dynamic UCS

First, we need to make sure Dynamic UCS is turned on. In AutoCAD, the Dynamic UCS icon looks like this:

If that’s not visible, you may need to make it visible using the hamburger menu on the far right of the status bar:

In BricsCAD, the text-based toggle (like the one AutoCAD users have been asking to return ever since it was removed a few releases ago) is DUCS:

Just in case that toggle’s not visible, there’s a list of toggles in a menu at the bottom right of the BricsCAD user interface, too:

You can also toggle the Dynamic UCS status in both applications using F6.

Having established that DUCS is on, invoke the Circle command. Hover over the plane that’s on the left as we’re looking at it, thus:

You are now working in a temporary UCS with an origin point in one corner of the 3D solid’s face, and as you move around you can use the coordinate display to get an idea of where the coordinates lie. If I enter -100,50 this is used in relation to the origin of the dynamic UCS and I will get a circle here:

Things work in a similar way in BricsCAD. You don’t get the on-screen dynamic coordinates, but you can still see them in the status bar and you do get a UCS icon that shows you how the temporary UCS is aligned. If you move your cursor around, you will be able to obtain different UCS alignments and easily see where the origin is and which way X and Y are oriented:

With this visual information and the dynamic UCS shown above, you can enter 100,50 to place the circle in the same spot as in AutoCAD.

Now we have our circle (and it could just as easily be a filleted rectangle or any other shape), we could extrude it as described in my previous post. Instead, let’s push and pull it into shape as described below.

Presspulling or Push/pulling

Instead of using the EXTRUDE command, planar objects can be extruded by presspulling them. Before drilling some holes, I should explain that there are several differences (some subtle) between extrusion and presspull:

  • Extruding replaces the original objects whereas presspulling leaves them in place and creates new objects.
  • The EXTRUDE command expects you to select objects to extrude; the PRESSPULL command allows you to point within an enclosed area. Depending on what you’re starting with, one command will be more suitable than the other.
  • Extruding an area enclosed by individual objects (e.g. lines) extrudes the objects into planar surfaces. Presspulling such an enclosed area results in a 3D solid being created based on an extrusion of the enclosed area.
  • An EXTRUDE of an enclosed planar object (e.g. circle, closed polyline) creates a 3D object. PRESSPULL can also do this, but when the planar object lies on the surface of a 3D solid, it can also create a hole in that solid.
  • Both commands can be used on faces of 3D solids; EXTRUDE will create a new solid based on an extrusion of that face and PRESSPULL will modify the original solid.

Presspulling in AutoCAD

In AutoCAD, you can use the PRESSPULL command:

Alternatively, you can use Ctrl+Shift+E to invoke presspulling: hold all three keys down and point within an enclosed area. Here’s an example. A circle has been drawn on the left vertical surface of our solid. Hold down Ctrl+Shift+E together and pick the interior of the circle. Let go of the keys and move your mouse to the right:

Pick a point beyond the extents of the solid. A hole is automatically created in the solid without having to explicitly subtract it, thus:

User actions required: a three-key combination and two picks. Note that the original circle is still present and if you don’t want it there you will need to erase it.

Push/Pulling in BricsCAD

In BricsCAD, there is no PRESSPULL command. Instead, the closest equivalent command name is DMPUSHPULL (the DM stands for Direct Modeling).

This command expects to work on faces of 3D solids, which is not exactly what we’re after for drilling holes. Instead, we use the DMEXTRUDE command. Now it might seem confusing that there are different commands to use for similar things, but in practice that doesn’t matter. That’s because we can just use the Quad Cursor and really not care what the underlying command is called. If you hover over a 3D solid’s face, the Quad Cursor gives you the options you need for dealing with that, and if you hover over a circle you are given the appropriate options for that instead.

Here’s the same example as above, this time done in BricsCAD. Hover over an object that defines an enclosed area, in this case our circle:

The Quad Cursor uses AI technology to initially provide the option that it thinks you’re most likely to use with that object under the current circumstances. I find it’s remarkably good at guessing what you want to do. If it’s wrong, you can get at a whole bunch of other options with a bit more hovering, but in this case it’s right; we do want to extrude the circle. Pick that icon, move over to the right and pick. That will create the hole:

User actions required: a hover and two picks. Again, the original circle remains behind and will need to be erased if you don’t want it left hanging around.

What about more complex holes? There are more tips and tricks coming, so watch this space.

A & B Tip 7 – drilling holes 1

In this series of posts, I’ll be providing tips that show how to do something in both AutoCAD and BricsCAD, hence A & B.

The Series

The idea behind this series is to provide useful information for several sorts of reader:

  1. AutoCAD users.
  2. BricsCAD users.
  3. People in the process of transitioning from AutoCAD to BricsCAD and who need to know what to do differently (if anything).
  4. People considering transitioning from AutoCAD to BricsCAD and who want to know about the differences and similarities.

Drilling holes

This post explains how to put holes in your 3D models. This post will cover some fairly straightforward topics but I intend to cover more involved details in future posts. I’ll assume you have a basic understanding of creating 3D primitives and the boolean operations (union, subtract and intersect). I will be using the 3D Modeling workspace in both AutoCAD and BricsCAD. I’m going to start with the dynamic UCS feature turned off and the 2D Wireframe visual style.

Vertical cylinder subtraction

Let’s take the simplest case. You have a solid and you just want to place a cylindrical hole in a known location that you already have geometry you can snap to. For example, you want to drill a DIA 40 hole right through this part, using the centerlines shown:

Start with the CYLINDER command:

AutoCAD BricsCAD

Pick the intersection of the two centerlines, enter a radius of 20 and a height of 100. You don’t have to be precise with the height, you can just point to any height that’s over 100:

To create the hole, use the SUBTRACT command:

AutoCAD BricsCAD

With this command it’s important to select the objects in the right order. Select the object(s) you’re substantiating from first, then press Enter to finish the selection process for those objects. Then select the object(s) you’re subtracting and press Enter to finish that selection process. That will give you your hole (temporarily switched to X-Ray visual style for clarity):

Extruding a circle

Instead of creating the cylinder diectly, you can instead extract a circle. This is an extra step if you don’t already have a circle of the right size in the right place, but less work if you do. For example, if you’re converting a 2D drawing to a 3D model, you’ll probably have the circle already.

Invoke the EXTRUDE command:

AutoCAD BricsCAD

Select the circle, press Enter to finish the selection (because you can extrude several objects at once) and specify a height of at least 100, as with the CYLINDER command. Subtract the resultant cylinder and you’re done.

It’s important to note that extrusions work perpendicular to the plane of the object(s) being extruded. In this case the cylinder is created vertically because the circle lies flat (in terms of the World Coordinate System). If you have a circle lying in a different plane, the extrusion will be perpendicular to that plane. For example, here a circle that lies in a vertical plane is being extruded horizontally:

Drawing a circle in the other planes

That’s all well and good if you have a circle in the right plane, but what if you need to draw one? You have several alternatives.

One method is to draw your circle in whatever plane you like, then use the ALIGN command to move it into place. That works, but it’s not that efficient.

Alternatively, you can change your UCS to align with your desired plane, and then just draw your circle. That can be fiddly, but if you have a handy solid object containing the plane you want to draw in, you can use the UCS command’s OBject option (hot tip: E for Entity does the same thing). By carefully hovering over the plane, you can set up your desired UCS with one click and a lot less tiresome fiddling around than trying to work out what the other (somewhat arcane) options of the UCS command all mean. Here, the UCS command’s OBject option is shown in action:

Note that this is an example of one of the very few things that works in AutoCAD but not BricsCAD. The UCS command’s OBject (and Entity) option exists, but you can’t use it to align a UCS with a solid’s face. You can, however, use the UCS command’s Face option. That exists in both applications, but I prefer the way it works in BricsCAD where the origin of the UCS is placed in one corner of the face with no further interaction required. In AutoCAD, the default is to place the UCS origin at some random point you used to select the face so if you need to locate points precisely there is a bit more messing around required.

Upshot: Use UCS E in AutoCAD and UCS F in BricsCAD.

In any case, there are other, more efficient ways to skin this particular cat. In my view, the most efficient way of drawing an object in a given plane, where that plane exists on a 3D solid, is to use Dynamic UCS. I’ll explain that, and how to push and pull your holes into submission, in the next post.

A & B Tip 6 – making polylines when you don’t have any

In this series of posts, I’ll be providing tips that show how to do something in both AutoCAD and BricsCAD, hence A & B.

The Series

The idea behind this series is to provide useful information for several sorts of reader:

  1. AutoCAD users.
  2. BricsCAD users.
  3. People in the process of transitioning from AutoCAD to BricsCAD and who need to know what to do differently (if anything).
  4. People considering transitioning from AutoCAD to BricsCAD and who want to know about the differences and similarities.

Why might you need a polyline?

In my last post (A & B Tip 5 – polyline areas) I described different methods of finding the areas (and perimeters) enclosed by polylines. That’s all well and good, but what if the objects that enclose your area aren’t nice convenient polylines? This post will help you make some. There are other reasons you might want polylines rather than whatever you have now. These include:

  • You can offset a polyline in one go rather than offsetting multiple objects and then joining them together.
  • You can apply fillets to a whole polyline with a single pick rather than lots of them.
  • A polyline can be extruded to make a 3D solid (or hole).
  • You can use a polyline to define a path that is used to extrude or sweep another polyline to make a solid with automatically mitred corners.
  • You can apply a width to a polyline and override that width for individual segments.
  • You can use a polyline as the basis to create a region, which allows you to do various cool things such as perform boolean operations on 2D objects.
  • Using polylines to define a hatch boundary can be less error-prone than using individual objects.
  • You can locate the geometric center of a polyline with the GCE object snap.
  • A polyline’s linetype can be persuaded to flow around the whole polyline rather than being confined to individual segments. In some cases, this means you will see a linetype where you would otherwise see only solid lines.

Having established various uses for polylines, and assuming you already have some objects and don’t want the tedious job of drawing over them manually, what can you do? Read on.

Note: in this post, the operations are exactly the same in both AutoCAD and BricsCAD with a couple of minor exceptions that I will point out as I go along.

PEDIT Join

If you’re fortunate enough to have a series of lines, polylines and/or arcs that are connected end-to-end without overlap to exactly define the area you want, then you can use the PEDIT command’s Join option to convert those objects to a single polyline. The command sequence dates from the mid-80s and is rather convoluted:

Command: PEDIT
Select polyline or [Multiple]: [pick an object]
Object selected is not a polyline
Do you want to turn it into one? [Enter] (this only appears if you pick a line or arc)
Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Reverse/Undo]: J
Select objects: [select a bunch of objects]
Select objects: [Enter]
X segments added to polyline
Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Reverse/Undo]: [Enter]

Note that the Do you want to turn it into one? prompt can be suppresses if you set PEDITACCEPT to 1. It’s also worth noting that if the properties of the objects vary, then the properties of the first-selected object will be used for the resultant polyline.

If you do a lot of this kind of operation, then it can be made more efficient using a menu macro. Some of us even made commands in LISP to simplify matters. A few releases ago, Autodesk did that for us when it added the JOIN command. BricsCAD followed suit to maintain command compatibility. This command joins various things in various ways, and one of those ways involves creating a polyline.

JOIN

The JOIN command, when applied to the same kind of convenient end-to-end objects described above, performs the same task as PEDIT Join, but with fewer prompts. Why not use it all the time then? Because sometimes it doesn’t work (in AutoCAD, at least). See the video for an example.

Video – PEDIT Join and JOIN in AutoCAD and BricsCAD

BOUNDARY

The BOUNDARY command, unlike the joining commands above, does not require that the objects lie conveniently end-to-end. Any group of objects that form an enclosed area can be used to create a closed polyline. Also unlike the joining commands, the existing objects are not converted to a polyline. Instead, a new polyline is created on top of the existing objects. The current properties (layer, etc.) are used to create the new polyline.

Assuming you’ve set your current properties to match the objects you want to create, invoke the BOUNDARY command (short form BO). A dialog will appear. There are minor differences between the AutoCAD and BricsCAD dialogs, but nothing that need concern us here.

Just pick the button at top left and start picking inside bounded areas. When you’re finished, press Enter and you’ll be left with a bunch of closed polylines. This video shows how it’s done.

Video – BOUNDARY in AutoCAD and BricsCAD


Finally, you can cut out the dialog box altogether and go straight to picking points if you use the command-line version, -BOUNDARY (note the leading hyphen). Just enter -BO, pick pick pick, Enter and you’re done.

A & B Tip 5 – polyline areas

In this series of posts, I’ll be providing tips that show how to do something in both AutoCAD and BricsCAD, hence A & B.

The Series

The idea behind this series is to provide useful information for several sorts of reader:

  1. AutoCAD users.
  2. BricsCAD users.
  3. People in the process of transitioning from AutoCAD to BricsCAD and who need to know what to do differently (if anything).
  4. People considering transitioning from AutoCAD to BricsCAD and who want to know about the differences and similarities.

What area is that polyline?

There are several ways of determining the area enclosed by a polyline. This post goes through the various methods. You will also notice that in each of the methods, you get the length (perimeter) as a bonus.

Spoiler alert: the most efficient methods are at the bottom. There’s a one-click method in AutoCAD (it needs a little setting up first) and a zero-click method in BricsCAD.

LIST command in AutoCAD

The oldest method is the good old LIST command. Although this has been around for ever, here’s how it works in recent AutoCAD releases. Issue the LIST command, select the polyline, press Enter to finish the selection, and above your floating command line AutoCAD will show something like this:

If this display goes away and you want to see it again, hit F2 and it will return. If you have a docked command line, AutoCAD will display the information on the text screen, which it will then display:

If you have a floating command line but want to see the text screen rather than the over-the-command-line popup, you can switch to it using Ctrl+F2.

LIST command in BricsCAD

The command works in just the same way in BricsCAD as it does in AutoCAD with the docked command line.. The main differences are that the BricsCAD default interface has a docked command line, and that the text screen (called Prompt History in BricsCAD) is displayed even when using a floating command line.

If the text screen goes away or is obscured, you can restore it using the familiar-to-AutoCAD-oldtimers keystroke of F2 (not Ctrl+F2, which toggles the ribbon in BricsCAD).

Unit precision in BricsCAD

Another difference you might notice is that the only whole units are displayed. This is because BricsCAD respects the setting of DIMZIN when displaying values in the AREA command and AutoCAD doesn’t. In this drawing, DIMZIN is set to 8, which suppresses trailing zeroes. Because the area is exactly 448.0, BricsCAD displays it as 448. If DIMZIN is not set to suppress trailing zeroes, this doesn’t happen. If DIMZIN is set to 0, BricsCAD displays the area using the setting for linear units precision, LUPREC. If this is 4, the LIST command will display the area as 448.0000, as it does in AutoCAD.

This respect for DIMZIN applies in other places in BricsCAD too. For the remainder of this post I’ll have DIMZIN set to 0.

AREA command in AutoCAD

Another good old method is the AREA command. Issue the command, use the Object option and pick your polyline. You will be shown the area in two places as shown here:

AREA command in BricsCAD

The AREA command works similarly in BricsCAD. Although the options displayed indicate that the subcommand is Entity rather than Object, you can in fact use either E or O to initiate selection of an object. Unlike AutoCAD, the area is displayed in one place only, the command prompt area:

Note that the AREA command in both applications gives you more options, including adding together several areas.

Properties palette in AutoCAD

If you have the Properties palette visible (Ctrl+1 will toggle it on), you can simply select the polyline and the area will be displayed in the palette, thus:

Note that unlike the AutoCAD AREA command, the Properties palette does respect the value of DIMZIN. To display the trailing zeroes, first set DIMZIN to 0.

Properties palette in BricsAD

Using the Properties palette in BricsCAD is identical to AutoCAD. Here’s the display:

Quick Properties in AutoCAD

Quick Properties is a cursor-based cut-down version of the Properties palette. It’s not what you get when hovering, which is this:

What you want is Quick Properties, which you only get when you select an object, for example:

Unfortunately, Area is missing. It was there once upon a time, but there were performance problems so it was removed by default. However, you can add it back in. Invoke CUI and pick Quick Properties on the left. Scroll down on the right and pick Polyline.

Turn on Area (and Length if you want). Pick OK. Now see what happens when you select a polyline:

Note: in AutoCAD 2014 (and maybe others), the Area option was missing. There’s a workaround, but it’s a complex hack and well beyond the scope of this post.

Quad cursor in BricsCAD

The easiest way to find a polyline area in BricsCAD is just to hover over it. The Quad cursor will appear, giving you the information you need:

Alternatives

If you’re doing this regularly, it makes sense to automate it as much as possible. Depending what you want, menu macros might help. There are also various free LISP routines around that do this sort of thing, for example these by Lee Mac. If you have more specific requirements (e.g. automatic area label, export to CSV), then that’s the sort of thing I do for a living so feel free to get in touch.

A & B Tip 4 – turning on toolbars

In this series of posts, I’ll be providing tips that show how to do something in both AutoCAD and BricsCAD, hence A & B.

The Series

The idea behind this series is to provide useful information for several sorts of reader:

  1. AutoCAD users.
  2. BricsCAD users.
  3. People in the process of transitioning from AutoCAD to BricsCAD and who need to know what to do differently (if anything).
  4. People considering transitioning from AutoCAD to BricsCAD and who want to know about the differences and similarities.

Your First Toolbar

If you are using a ribbon-based workspace, you may want to have some toolbars visible, too. There are several reasons you might want to do this. You might want some buttons to be consistently visible, no matter what the ribbon state. Although the QAT in AutoCAD provides some toolbar space, you might want more space than it offers. You might also want toolbar controls that are not available in the QAT; several of them only work in conventional toolbars. You might want the buttons in a different place, such as down one side or on a second screen.

If you have at least one toolbar visible already, things are easy. If you right-click on that toolbar, you will get a menu that allows you to turn on any other toolbar in the same customization group (CUI or CUIx file). Here it is in AutoCAD:

Here’s the equivalent in BricsCAD:

Note that in BricsCAD, the list of toolbars is one level down because the first-level right-click menu in BricsCAD gives you many more interface options.

What if the toolbar you want to turn on is in a different customization group? You can get at those easily enough by right-clicking on any blank (unused) area of a docked toolbar area. AutoCAD:

You can do the same in BricsCAD:

The difference with BricsCAD is that you don’t need to have a docked toolbar with spare space in it to access toolbars in different groups. They’re all available by right-clicking any toolbar button, docked or not.

That’s all easy enough, but what if you don’t have any toolbars visible? You’re stuck in a Catch-22 situation. You need a toolbar to click on to load a toolbar. How do you get that first toolbar loaded?

AutoCAD Interactive Method 1

The first trap to avoid in AutoCAD is using the TOOLBAR command. From Release 13 to AutoCAD 2005, that was useful. With the introduction of CUI files in 2006, the TOOLBAR command became a near-useless cut-down version of the CUI command.

Ignore that. If you’re going to use the CUI interface, use the whole thing. Enter the CUI command. In the top left pane, pick the workspace you want to change:

In the top right pane, pick Customize Workspace. In the left pane, expand the Toolbars part of the tree and turn on one of the toolbars:

Pick Done (top right) and OK (bottom). Your chosen toolbar will appear.

AutoCAD Interactive Method 2

If you have your pull-down menu bar turned on, you can get at the toolbars using the Tools menu as shown here:

You can turn on your pull-down menu bar by setting MENUBAR to 1.

Thanks to James Maeding for pointing that out.

BricsCAD Interactive Method

In BricsCAD, you can turn on toolbars interactively even if there are none visible, without having to deal with the CUI interface. Just right-click in any part of the ribbon, and you will see the same menu you get when right-clicking a toolbar area. That gives you access to all of the toolbars in all of the groups.

AutoCAD Command Line Method

If you want to use the command line to turn on a toolbar, you need to use the -TOOLBAR command (note the leading hyphen). You also need to know the name of the customization group and what the toolbar itself. One example is the Object_Snap toolbar within the ACAD group. The command line required is therefore:

-TOOLBAR ACAD.Object_Snap Show

To be sure this will work in all environments, I recommend you add the special characters _ and . thus:

_.-TOOLBAR ACAD.Object_Snap _Show

BricsCAD Command Line Method

In BricsCAD, you don’t need the leading hyphen in the TOOLBAR command (although you can use it if you like). The customization group and toolbar names will be different, but the syntax is the same. For example:

TOOLBAR BRICSCAD.TB_EntitySnaps Show

The recommended special characters also do the same job in BricsCAD:

_.-TOOLBAR BRICSCAD.TB_EntitySnaps _Show

A & B Tip 2 – realistic threads

In this series of posts, I’ll be providing tips that show how to do something in both AutoCAD and BricsCAD, hence A & B.

The Series

The idea behind this series is to provide useful information for several sorts of reader:

  1. AutoCAD users.
  2. BricsCAD users.
  3. People in the process of transitioning from AutoCAD to BricsCAD and who need to know what to do differently (if anything).
  4. People considering transitioning from AutoCAD to BricsCAD and who want to know about the differences and similarities.

Realistic Threads

This post explains how to create realistic-looking threads for screws, nuts and the like in your presentation 3D models. I don’t suggest you do this routinely because it will add pointless complexity to your everyday models, but occasionally you will need to make a model that looks highly realistic. For example, you might need a photorealistic rendering of an assembly or an exploded view for a user manual. This example will use ISO metric parts, but the principles are the same for all threads. I’ll assume you have a basic understanding of creating 3D primitives and the boolean operations (union, subtract and intersect).

BricsCAD Standard Parts

The first thing to note is that unless you insist on the threads being helical, you probably have very little work to do. Have a look at this ISO M10 screw and bolt. It doesn’t have helical threads, but is it good enough for your needs?

If so, and if you have BricsCAD Platinum, you can save yourself a lot of work. I created this model using the Standard Parts panel on the left. To create the nut, I used ISO > HEX NUT > ISO 4033 > M10 x 1.5. Having chosen my component, I just dragged and dropped it from the panel (the bit that’s highlighted above) into the drawing and specified an insertion point. The screw was similarly easy: ISO > HEX NUT > ISO 4018 > M10 x 1.5 and Length 50.

Here’s a close-up. This is good enough for most cases, but if you’re picky you can tell the threads aren’t helical. If you’re really, really picky you can tell that the threads aren’t the exactly correct profile (e.g. no flats on the peaks or troughs).

Also, getting really, really, really picky, there is neither a runout of the thread at the top nor a spherical end at the bottom. If that’s not good enough and you need to construct a model that provides a completely accurate representation, how can you do this? Read on.

Creating helical threads in BricsCAD and AutoCAD

I’m going to recreate the above screw as our example, but will make it dimensionally accurate. For simplicity, I’ll ignore the hex head and just do the shaft part. I’ll use BricsCAD to work through this, but it doesn’t matter. The steps are exactly the same in AutoCAD. There are a few things in BricsCAD’s 3D repertoire that might make things a little easier than in AutoCAD, but I won’t be using them here. I will be switching back and forth between visual styles in order to better show what’s going on with the geometry, so don’t expect consistency between the images.

First, construct a few basic parts from solid primitives. Here are the dimensions you’ll need for doing that:

From left to right, we have:

  1. DIA 20 x 40 cylinder that has been unioned with an DIA 20 sphere
  2. DIA 10 x 50 cylinder
  3. DIA 10 x 1.25 cylinder that has been unioned with a truncated cone DIA 10 to 7 x 3.75

The next step is to create the thread. There are two parts to this: the path and the profile. The path is easy: we just use the HELIX command. Specify the center of the middle cylinder as the base, a base and top radius of 5 (but specify the base radius using a known point such as a quadrant), a turn height of 1.5 (that’s the thread pitch) and a height of 50.

You might be tempted to make a simplified profile using an equilateral triangle with a side length of 1.5 (the pitch). Hot tip: don’t do this. Unfortunately, this will cause problems. Both AutoCAD (usually) and BricsCAD (sometimes) may refuse to create the thread because it thinks it self-intersects. You can use a simple triangle profile, but you’ll need to make it slightly smaller than the pitch: scaling by a factor of 0.95 should do.

Instead, let’s do it more accurately. The profile can be created as a polyline using conventional 2D techniques. Here are the profile dimensions for an M10 x 1.5 thread:

Note: to be completely accurate, the thread profile should also have a root radius. Feel free to add one if you like.

Either draw this profile in place using an appropriate UCS such that it is vertical up against the middle cylinder, or draw it in WCS and then move it into place using the ALIGN command. Although having the profile located in the right plane and location is theoretically not necessary, in practice it makes creating the thread much less fraught.

Here’s a tip that will save you a lot of trouble later: move the profile very slightly away from the center of the cylinder. A distance of, say, 0.01 will do. Here’s what it should look like if you zoom in far enough:

If you don’t do this, your CAD application will get into trouble later when you try to subtract the thread, because the outside of the thread and the cylinder will coincide, causing problems for the software. Having the outside of the thread just slightly beyond the edge of the cylinder will prevent this issue. Instead of kludging things by moving the profile slightly as described here, you could alternatively draw the profile such that it’s dimensionally accurate but with an outside edge slightly beyond the cylinder. Just make sure you don’t extend the profile so far that you run into the self-intersecting problem.

Next, use the SWEEP command, select the profile and the path. That should give you this:

Subtract the thread from the cylinder. Now move the cylinder/cone primitive into place on top of the shaft using CENter osnap and union the two solids, producing the elegant thread runout you see here:

Move the cylinder/sphere primitive into place on top of the shaft using CENter osnap:

Finally, intersect the two solids, producing this domed end to the threaded shaft:

Here’s the finished product in BricsCAD after I added a hex head to the top, unioned the solids together and added a brushed metal material.

Summary

The steps are the same in AutoCAD and BricsCAD:

  1. Create the primitive objects you’ll use later to define the threaded object
  2. Create a thread path using HELIX
  3. Create a thread profile polyline and move it into position
  4. Ensure the profile extends slightly beyond the edge of the shaft
  5. Use SWEEP to create the thread
  6. Subtract the thread from the shaft
  7. Move the cone/cylinder primitive into place and union the parts
  8. Move the sphere/cylinder primitive into place and intersect the parts

If you want to do this in a nut or hole, use the same principles. You just need to reverse the thread profile such that it’s pointing outwards into the hole before sweeping and subtracting.

What is loaded at AutoCAD startup, and when?

Warning, CAD nerd stuff ahead. This is a long and technical post and if you’re using AutoCAD in a largely out-of-the-box state you probably won’t care about any of it.

If your modification of AutoCAD extends beyond the trivial, you may find it useful to know what AutoCAD loads, and in what order things are loaded. It is possible for LISP files in particular to tread on each other’s toes, so knowing what gets loaded when can be useful information for diagnosing such clashes. This post aims to provide that information. It uses AutoCAD 2009 as an example, but the same principles apply to all releases from AutoCAD 2006 onwards.

On startup, the first things AutoCAD loads are its CUI files. It first loads the Enterprise CUI file, then the Main CUI file, then any partial CUI files attached to the Main, then any partial CUI files attached to the Enterprise. I have no idea of the reasoning behind this slightly strange order, but there it is. The order of the partial CUIs loaded in each case is determined by the order in which they appear in the parent CUI files, which is determined by the order in which you attached them. If you don’t like this order, you can attach and reattach them in the CUI interface, or you can do the same thing much quicker with a text editor if you feel confident enough. If there are LISP files associated with these CUI files, they are not loaded yet. You’ll need to wait a few paragraphs for that.

Next, if you have created a file called acad.rx in AutoCAD’s search path, any ARX files listed in that file will be loaded. There are other ways in which developers can load their ARX files at startup, but I won’t go into that here.

Following that, the acad*.lsp files are loaded. First, Autodesk’s acad2009.lsp file is loaded. Next, if you have created a file called acad.lsp, that is loaded. These two files are only loaded at first startup, unless the ACADLSPASDOC system variable is set to 1, in which case the acad.lsp file is reloaded with each new drawing. Next comes Autodesk’s acad2009doc.lsp and any acaddoc.lsp file you may have created, in that order. These two files are loaded at startup and with every new drawing session.

It’s worth pointing out here that the acad200x.lsp and acaddoc200x.lsp files are Autodesk’s and are not intended to be modified by users. You can modify them, and adding things in there works fine, but updates and hotfixes can overwrite these files, leaving you to patch things up again afterwards. The acad.lsp and acaddoc.lsp files are yours, and that is where you are best advised to put your additions.

I hesitate to mention VBA because I have long avoided that development environment and my knowledge in that area is very limited, but if you’re a VBA developer and have created an acad.dvb file in AutoCAD’s search path, it gets loaded at this point.

Once the acad*.* files are loaded, then come any LISP files associated with the CUI files that were loaded at the beginning. For each CUI file, if there is a *.mnl file of the same name, that will be loaded first (*.mnl files are just *.lsp files renamed). After that, any LISP files that are specified in the CUI file will be loaded, in the order in which they appear in the CUI file itself. This order can be modified in the same ways that the partial CUI loading sequence can be modified; “delete” and “load” (detach and attach, really) the files within the CUI interface, or hack the CUI file with a text editor.

The CUI-associated LISP files are loaded as described in the above paragraph for each CUI file in turn, in the same order as the CUI files themselves: Enterprise, then Main, then partials to Main, then partials to Enterprise.

The Appload command provides a Startup Suite facility, where you can specify any number of files to load (*.arx, *.lsp, *.dvb, *.dbx, *.vlx or *.fas). If you have done so, those files are loaded at this point, in the order in which they appear in the Startup Suite list.

That’s all the actual loading done, but we’re not finished yet. At this point AutoCAD’s environment should be all ready to do pretty much anything, including things that modify the drawing database, including invoking commands. This was not true earlier on, so if you want to do things like change the drawing or run commands, this should be done using a startup routine rather than called directly at load time from any of the files loaded above.

If you’ve defined a VBA sub called AcadStartup(), it will be called now. If starting a new drawing, any sub called AcadDocument_Activate() will be called instead. The caveat about my VBA ignorance still applies here.

If a LISP function called (S::STARTUP) has been defined, it will be called next. Where could that be defined? Anywhere in any of the LISP files mentioned above, or in any LISP or other files that are loaded by any of those files, or by any files that are loaded by any of those files, and so on ad infinitum. It could even be defined in one of the ARX files loaded at any point. This would be unusual, but is quite possible.

If there are multiple (S::STARTUP) functions defined in various places, which one wins? Whichever one loaded last. That’s why the load order can be important, but it’s also why you should never have an unconditional (defun S::STARTUP …) definition in your LISP code. Instead, you should append your startup code to any existing (S::STARTUP) function. That way, your startup can cooperate with any others in your environment rather than walking all over it. If there is some interest in that subject, I can cover it in more detail in a future post.

In summary, here is the AutoCAD startup sequence:

A. CUI files loaded:
1. Enterprise
2. Main
3. Partials to Main
4. Partials to Enterprise

B. acad*.* files loaded:
1. Files listed in acad.rx
2. acad2009.lsp
3. acad.lsp
4. acad2009doc.lsp
5. acaddoc.lsp
6. acad.dvb

C. CUI-associated MNL and LSP files loaded:
1. Enterprise named MNL
2. Enterprise loaded LSP and MNL
3. Main named MNL
4. Main loaded LSP and MNL
5. Partials to Main named MNLs
6. Partials to Main loaded LSPs and MNLs
7. Partials to Enterprise named MNLs
8. Partials to Enterprise loaded LSPs and MNLs

D. Startup suite files loaded

E. Startup routines run:
1. AcadStartup() called (AutoCAD startup)
2. AcadDocument_Activate() called (Drawing startup)
3. (S::STARTUP) called