The Curve Subtraction (CSub) command is designed to work in 2D with polylines, splines and other curves. The command subtracts one curve from another, as if the curves denote the boundaries of a certain area from which a section of another area needs to be removed. The usual _SUBTRACT command works in exactly the same way with flat regions. But now you don’t need to convert closed curves to a region, subtract and convert them back to curves. The program will do it all itself. In addition, the program can be used to cut closed and open curves into parts at the points of intersection with other curves. The program can create gaps, set up layers, save or delete the original drawing objects and trims.
Program capabilities:
In 1 click, you can subtract many curves at once, there is no need to call the command hundreds of times for each pair of curves. There is no need to copy the subtrahend curves, the subtrahend curve will be deleted only after the program subtracts it from all the source ones. You don't have to select the subtrahend curves with a separate query, but select all the curves at once. The program will find what to subtract by the specified layer.
The program considers almost closed curves with a small gap to be closed.
The source curves can be scattered and rotated in 3D space as you like - the program will project everything onto the XY plane of the current user coordinate system UCS. You can even work with 3D-polylines.
Subtrahend closed curves are considered as solid areas and this area will disappear from the original contour, and open curves are considered as a cutting line.
You can set the gap between the resulting contour and the cut. That is, the program can automatically offset the subtrahend curve, build zones around unclosed curves.
Any existing or new layer can be assigned to the results and cuts.
The original curves can be deleted from the drawing, or saved.
You can set up to 9 different command styles with different settings and quickly switch between them each time you call the command.
The AVC_CurveSub plugin, in addition to the Curve Subtraction command, also contains the following commands:
Curve Intersect (CInt)
Curve Union (CUnion)
Read about downloading and installing the program here.
To run the plugin, you will have to register account and top up your account balance or receiving bonuses.
Then you can activate one of the licenses:
Annual license - 10 EUR.
Unlimited license - 50 EUR. Free updates for 1 year.
The trial period is 20 days.
An example of three commands working with a zero gap, without saving trims.
The initial curves are closed and open polylines, a line, a spline, an ellipse. The subtracted curves are highlighted in red.
The results are lines, polylines, splines. Green color.
Two lines were not involved in the unification procedure and they remained in the drawing.
You can configure all the command options in the AVC Options Palette on the Curve Subtract tab.
Configure the coordinate system (UCS) - the program will project all curves onto XY.
Self-intersecting curves are not suitable for region construction and will not be processed. It is recommended to pre-process the curves with the Simplify Polylines (CPoly) or Outside Loop (OSL) commands.
You can select the source curves before calling the command.
Call the CSub command. If nothing is selected in advance, the program will ask you to select curves. You can work with any finite curves: lines, polylines, 2D polylines, 3D polylines, splines, circles, arcs, ellipses. Infinite rays, xLine, multi-lines are not processed.
The curve selection prompt has options for quickly switching the style and for opening the settings dialog.
If the selection of subtrahend by layer is configured, the program will immediately separate the source and subtracted objects from those already selected. If there is no layer of subtrahend curves, the program will open a dialog for selecting a layer from all available ones.
If the subtrahend curves are not selected by layer, the program will make another curve selection request for you to specify the subtrahend curves.
All curves will be projected onto XY. If a gap is specified, closed subtrahend curves will be offset outward, and a zone of two gaps wide will be built around the unclosed ones.
After subtraction or cutting, all closed contours will remain closed. The result will be a closed polyline or spline. But you can set the result of subtraction for a closed source curve to be a Region.
Curves that have not participated in any subtraction will remain in the drawing unchanged (even if the source ones are set to be deleted).
The process of subtracting hundreds and thousands of curves can take a long time. You will see a progress bar and can interrupt the command by pressing ESC.
Watch the command line. The program will display messages about the current settings, all failures and the results of the work.
You can configure all the options in the AVC Options Palette on the Curve Subtract tab. Keep in mind that the settings for this command are the same as the Curve Intersect s and Curve Union commands.
The name for this Curve Subtract style. It is not used in the program. It is only for ease of selection.
You can select subtractable (subtrahend) curves manually in a separate query. But if you assign the same layer to all subtrahend curves, you can enable this option, and the program will automatically transfer the curves from the source list to the subtrahend list and will not ask you any unnecessary questions. By default, the Holes layer is used for subtrahend curves, the same as in the Drilling command. If the layer is not specified or is missing in the drawing, the CSub command will display a dialog with a list of all layers so that you can layer.
Assign a layer to all curves from which at least something was subtracted. If such a layer is not in the drawing, the program will try to pull it out of your template. Or create a new one. Leave the field blank to keep the layer of the source curve.
After subtracting closed curves as regions, the program can also find the intersection of regions for each pair of source-subtrahend curve. This intersection region can be saved in the drawing. This way you will get the results of two commands at once - subtraction and intersection. If the original curve was not closed, then the piece cut out of it will remain in the drawing.
You can change the layer of the stub. If there is no such layer in the drawing, then the program will try to pull it out of your template. Or create a new one. Leave the field empty to save the layer of the original curve.
Increase (offset outward) the subtrahend curve by this distance before subtraction. Moreover, the curve that is not enlarged is used to obtain the stub. Therefore, as a result, you will see a gap between the contours of the result and the stub. If the subtrahend curve is not closed, then the program will build a symmetrical zone by shifting the curve in both directions by the specified gap. That is, the zone will be 2 gaps wide. In this way, you can cut the original closed curves into parts, leaving a gap between the parts.
Users often forget to reset the gap and think that they subtract curves without a gap. And they get erroneous contours. To avoid these errors, the program resets the gap value by default at the end of the work. But if you want to call the program many times with the same gap value, then check this option and the gap will not be reset. It is better to create a separate subtraction command settings style in which the gap is specified and this option is checked.
Process curves that could not be closed. If you disable this option, all open curves will be ignored - both the source and the subtrahend ones.
After subtraction, do not explode regions, but place them in the drawing. The setting only works for closed source curves.
Delete source curves if at least something has been subtracted from them. If the selected curve was not processed due to failures or simply did not intersect with any subtrahend curve, then such a curve will remain unchanged in the drawing in any case.
Delete subtracted curves from the drawing if they were used in at least one subtraction operation.
The calculation accuracy setting is on the Common Options tab. Linear tolerance affects the permissible gaps when closing curves, constructing offsets, and other operations.