Boundary Builder for AutoCAD 12 to AutoCAD2012
BB pro is an AutoLisp routine that helps designers create clean polyline boundaries from their drawings. The resulting drawing is then suitable for translation to a number of mask making formats - Gerber, GDSII, Electromask and Mann - that depend on receiving clean boundaries in DXF format.
Contents:The BB Pro distribution consists of:
Installing BB ProBbpro.lsp should be copied to the directory where AutoCAD normally stores Lisp files. This directory may vary depending on how you installed AutoCAD, but a typical installation is shown below.
acad12c4 | -------------------------------------------------- | | | | | | ads fonts igesfonts samples source support bbpro.lspAutoCAD 13 often has a more complex directory tree. Here is a typical one -
acad13c4 | ------------------------------------ | | com windows | | ------------------ -------------------------------------- | | | | | | | | | fonts sample support ase drv edoc sample support tutorial bbpro.lsp
Automatic startupYou may wish to configure AutoCAD so that it loads BB pro each time that AutoCAD starts up. To do so, you should add a line to the lisp startup file used by AutoCAD. For AutoCAD release 12, the file is called acadr12.lsp. For AutoCAD release 13, the file is called acadr13.lsp. The entry is the same in both cases.
;;;===== Autoload LISP Applications ===== (autoload "appload" '("appload")) (autoload "filter" '("filter")) (autoload "bbpro" '("bbpro"))
Loading BB Pro ManuallyIf you do not configure BB Pro to load automatically then you will have to load it manually before using it. This is normally done from the AutoCAD command line:
Command: (load "bbpro")
How BB Pro WorksBB Pro helps you build closed zero width polyline boundaries from lines, arcs and open zero width polylines. It works on the current layer. Data on other layers is ignored. It can only work on entity data - not data that is part of a block.
It cleans up lines/arcs whose endpoints don’t quite touch or overlap.
It removes any zero length segments, arcs or polyine sections that might cause a postprocessor problem.
It removes any stand alone lines/arcs that don’t form part of a boundary.
It uses the concept of a search radius to determine whether or not two endpoints should be linked.
If BB Pro reaches an ambiguous situation, such as a point where more than two lines meet, it stops, zooms in, and asks the user to interactively choose the correct path to follow.
BB Pro PreliminariesFreezes all layers except for the current layer
Create two new layers
bb_open - open entities moved to this layer
Moves the following entities to the closed layer:
User InputBB Pro prompts the user for several pieces of information prior to starting the linking routines.
Command: bbpro [enter]BB Pro version 2.03 (C) Artwork Conversion Software (831) 426-6163 email:email@example.com
Enter Units of Drawing (IN/MIL/UM/MM/CM/Other)Prompts the user to select a units value. The units information is used only to calculate a search radius around each line or arc endpoint. Units and their search radii are shown below:
Use other and specify a different search radius as needed.
Select the color for the Boundary layer (Red/Yellow/Green/Blue/Magenta/Cyan)You should select a color that is not the same as the current layer’s color.
Select the color for the Open layer (Red/Yellow/Green/Blue/Magenta/Cyan)You should select a color that is not the same as the current layer’s color. This is quite important since BB Pro may zoom in and ask you to select the line to continue building the path - unless the current layer’s color, and the open layer color are different, you may not be able to tell which line to select.
Do you want to process 0 width closed polylines (Y/N)
YESBB pro will explode all zero width closed polylines into lines and arcs. It will then rebuild the polyline. It does this so that it can find and remove any zero length segments as well as any co-linear segments. While co-linear segments are not necessarily bad, we have found some data translators that do not correctly process boundaries containing co-linear segments.
NOBB pro will immediately move all zero width closed polylines to the boundary layer (bb_closed) without processing them in any way. This is fast but does not check for any problems in such polylines.
Selecting the Area to ProcessBB Pro will prompt you to select the entities to work on. This is done using a window. Use your mouse or tablet to define the area you wish to process.
Building the Closed PolylineBB Pro graps the first line or arc in the selected area and using the search radius trys to find a line or arc whose endpoint is within this search radius. There are three possible outcomes:
2. A single endpoint is found
3. More than one endpoint is found
Case 1: Nothing is foundIf nothing is found, BB Pro will increase the size of the search radius and try again. If nothing is found after the second try BB Pro will send the unlinked lines to the open layer.
If an endpoint is found within the larger search radius BB Pro will offer you the following options:
Leave Open - the pline under construction is sent to the open layer.
Fillet - you select an entity to fillet to the polyline under construction.
Close - closes the polyline under construction back to the starting vertex.
Case 2: A single endpoint is foundBB Pro will use the fillet command to clean the intersection and attach the line to the pline under construction. If an arc is involved BB Pro uses a different approach since arcs do not fillet well.
Case 3: More than one endpoint is foundBB Pro will zoom in to the area under consideration and prompt you to select a line to follow. Leftover lines will eventually be sent to the open layer.
“Multiple Entities Found: Please select Entity to Continue:”
In order to help you select the correct path the last segment joined to the polyline under construction is highlighted. It takes on the color of the Open layer. The entities to be joined have the color of the current layer.
Example FilesWe’ve provided 3 example files that show the operation of BB Pro.
A microwave mixer circuit. This was originally drawn using a CAD program that could not output lines and arcs. BB Pro links it into closed polylines in a couple of seconds. Doing by hand takes 20 minutes.
units=other search radius=0.0002 (although you can select inches, using a radius of 0.0002 on this example runs faster)
This is a chemically milled part (for a heart pacemaker.) It has two extremely complex boundaries that have lines under lines, and some lines that don’t touch. The service bureau that tried to clean up this drawing by hand, spent over 8 hours working on it without finding all the errors. BB Pro will fix it in about 1 minute.
This is a microwave circuit. In several areas there were drawing errors - lines not touching, lines under lines and co-linear lines. BB Pro removes these in about one minute with only minimal user input.