To prepare contours for milling or laser cutting on a CNC, it is important to set the correct direction of the cutting lines, the correct clockwise or counterclockwise bypass of closed contours. In addition, it is important at what point of the contour the cut will begin, the entry point of the cutter. To solve these problems, you need to clearly see where the starting point of the polylines is and in which direction they are directed. But standard AutoCAD / BricsCAD tools do not allow you to see either the starting points or the direction. Only the property panel helps a little in this, but you need to deal with each polyline separately, which is very time-consuming.
The Polyline Direction (PLineDir) program will help you in working with contours for CNC and for any other tasks where the direction and starting point of any curves are important. The program colors the curves and places conditional icons so that you can clearly see the direction and starting point. All these changes to the drawing are temporary, the colors of the curves will return to the original ones at the end of the command.
In addition to a visual demonstration of the direction, the program allows you to quickly change it. You can change the direction of the curves by clicking on each curve or by selecting many curves at once and assigning them all to clockwise / counterclockwise. You can also edit the starting points individually for each curve or reassign them to all curves at once.
The program works with all types of curves: lines, polylines, 2D polylines, 3D polylines, splines, arcs.
Circles and ellipses are automatically converted to polylines and splines so that they can be assigned a direction and starting points.
The program can "highlight" the direction and starting points of all curves visible on the screen or only selected curves.
While the command is running, all selected drawing objects are assigned 3 colors: for closed clockwise - green, counterclockwise - purple, the rest - yellow.
While the command is running, a red cross will be drawn at the starting point of the curves. In addition, the direction of the curve can be indicated by a red arrow from the beginning of the curve and to the end point of the curve.
Almost closed polylines and splines are automatically marked as closed.
There are 7 operating modes for convenient assignment of direction and starting point. Modes can be switched from the command line.
Reverse curves by clicking on one curve.
Rotate all closed curves clockwise/counterclockwise.
Set the start of one curve at the clicked point. Unclosed curves will be cut in two at this point.
Set the start of all selected polylines in the middle of the longest linear segment.
Set the start of all selected curves at the minimum point (lower left vertex) or at the maximum.
When changing the direction of closed polylines, the program saves the start point (unlike the Reverse command).
You can flexibly configure which objects in the drawing will be involved in the work: you can discard unnecessary ones by object type, by layer, too short.
All features and modes can be configured in a convenient dialog in the AVC Options Palette. You can create up to 9 settings styles and quickly switch between them.
You can pre-configure the program in the AVC Options Palette.
In large drawings, it is advisable to select objects to work with in advance, before calling the command.
Run the PLineDir command.
If nothing is selected, the program will select all suitable objects visible on the screen at the time the command is called. You can reconfigure the program so that it opens a prompt to select all curves at each call.
Then the program will start coloring the curves and drawing auxiliary objects - points and arrows (depending on the settings). This process takes some time. On very large drawings, thousands of curves, it may seem to you that the program has frozen, but this is not so. Try to limit the number of working objects by filtering by type or by layer.
After "highlighting" all the objects, the program will switch to one of 7 operating modes. The program will cyclically ask you to select one curve by clicking or many curves by a frame (in the second case, you need to press Enter to complete the selection). Then the program will process the selected objects and display the changes. You can even select objects that were not previously highlighted. Read more about all the operating modes in the Program Settings section below.
In the command line, you will see options for opening the settings dialog, for switching styles, and for changing the operating mode. This way, you can reconfigure the program right during operation.
The program will cyclically ask you to select objects for processing until you press ESC or click past the curves.
The program does not work with objects of the Mline, Xline, Ray, Leader type.
Follow the messages in the command line. There you will see how many objects were processed and what errors occurred.
To customize the Polyline Direction command, you can use the A>V>C> Options Palette (AvcOptions) on the Polyline Direction tab. Or reset the selection and call the PLineDir command with the TUNE option.
The name for this command style (set of settings). Not used in the program. Only for convenience of choice.
Configure here which objects you want to process, layers to ignore and other filtering conditions.
The fewer objects that meet these conditions, the faster the program will work.
The program will ask you to select one curve to reverse. You need to select with one click. Selecting with a frame does not work. You can reverse unclosed curves. When changing the direction of closed polylines, the program saves the starting point (unlike the Reverse command). Circles will turn into polylines. Ellipses will turn into splines.
The program will ask you to select several curves, and assign a clockwise direction to all of them. You must complete the selection of objects by pressing Enter. Unclosed curves are ignored. 3d-polylines and 3d-splines are ignored.
Same but Counterclockwise.
The program will ask for one point on the curve and move the start of the curve to this point. Open curves will be broken into two parts (a simplified version of the Break command). You need to select a point with one click. Selecting with a frame does not work. Snaps work, but be careful not to snap to temporary arrows. Clicking on the end of an open curve reverses the curve. If there are several curves under the point, they will all be processed.
The program will ask for several curves to be selected, and will assign a start to all of them in the middle of the longest linear segment. This option is convenient for milling, so that the cutter descends into the workpiece in a straight line and does not spoil the adjacent parts. Splines, arcs, ellipses, open curves and 3D polylines are ignored.
The program will ask you to select several curves and will assign the start to all of them at the node with the minimum UCS coordinates. That is, at the leftmost bottom point. You must finish selecting objects by pressing Enter. New nodes (vertices) are not created on polylines - the program selects from what is available. But a new control point is created on splines. Unclosed curves can also be reversed, but not cuted. Before working in this mode, you can set up a suitable user coordinate system (UCS).
The same but for the maximum node (upper right).
Usually, the command changes the color and draws arrows for all curves in the visible part of the screen. But you can set up a request to select curves for which you want to indicate the direction.
Change the color of all curves while the command is running. After the command is finished, the original color will be returned.
Flat closed curves with a clockwise traversal are green.
Flat closed curves with counterclockwise traversal are purple.
Circles that are either not flat or not closed are yellow.
All curves will have a cross drawn at the start point. The size of the cross is 3% of the screen. The color is customizable. Circles have no starting point.
All curves will have an arrow drawn from the start point in the direction of the curve traversal. The arrow size depends on the length of the curve. The color is customizable. Circles have no direction.
All curves will have an arrow drawn to the end point.
The color of temporary crosses and arrows. Choose one of the standard indexed colors from 1 to 255. 1 is red.