Ultimate solutions for AutoCAD




Converting objects into polylines

TotalPurge features
TotalPurge allows converting AutoCAD entities into polylines. The program converts the following objects: ACR, CIRCLE, LINE, SPLINE, ELLIPSE, and POLYLINE.

Attention! Before you begin, make sure that one of the two conversion methods is selected in the settings (see Fig. 1):

Fig. 1
For more information on the program settings, please see "Settings".
Please remember that with enabled "Optimization of blocks" the program converts objects into polylines within selected blocks.
To convert basic object types into polylines, make sure that the following settings are made on the "Polylines" tab (Fig. 2):
Fig. 2
For advanced conversion, in case of splines and other curves, please see "Converting curves into polylines".

Example. Conversion of selected drawing objects into polylines
Let's look at the essence of conversion by the example of converting a fragment of a drawing composed of simple objects (entities) into polylines.
As an example, let's take the drawing of a detail shown on Figure 3:
Fig. 3
As we can see it on the figure, our detail consists of eight objects: 6 LINE entities and 2 ARC entities.
TotalPurge implements two ways of converting objects into polylines:
  • Trivial (simple) conversion, where each object is converted into a polyline "as is", without analyzing the object's position in the drawing. In other words, each resulting polyline precisely follows the original entity.
    Cons: Drawing is not optimized; number of polylines equals to the number of objects.
    Pros: Simplicity of algorithm and, as consequence, high performance.

  • Smart (complex) conversion. This method analyzes the surroundings of the object to be converted. Should it identify objects filleted with the original one, it creates a polyline with a certain number of vertices. Thus, in place of several filleted objects, we obtain an optimized mono object (polyline with the number of vertices equal to the sum of the minimum number of vertices necessary for creating the contour formed by the filleted objects). The resulting polyline precisely follows the original contour formed by the filleted objects. In addition, the smart conversion method checks the new polyline for closedness. If the first and last vertex match condition is met, the new polyline is closed. Otherwise it is open.
    Pros: Drawing is optimized; series of filleted objects are converted into mono objects (multi-vertex polylines); number of new polylines is less than the number of the original objects.
    Cons: More sophisticated algorithm demanding more computing time.
Trivial conversion of objects into polylines
To convert objects using this method, on the "Polylines" tab in the settings, select "Trivial method (quick)" (Fig.4):
Fig. 4
The result of converting the objects from the original drawing into polylines using the trivial conversion is shown on Fig. 5:
Fig. 5
As the figure shows, after the conversion, instead of 8 entities of various types (6 lines and 2 arcs) we have obtained 8 polylines.

Smart conversion of objects into polylines
To convert objects using this method, on the "Polylines" tab in the settings, select "Smart method (slow)" (Fig.6):
Fig. 6
The program's output (objects converted using the smart conversion method) is shown on Fig. 7:
Fig. 7
After the conversion of the objects from the original drawing (Fig. 3), composed of 8 entities of various types (6 lines and 2 arcs), we have obtained 1 polyline object. And in the process of conversion the program has automatically identified that the object forms a closed area, and thus the resulting polyline is a closed one.

Conversion speed
As we mentioned earlier, the smart conversion method is more labor intensive in terms of computations produced. However, the real computing time consumption is comparable to that of other processes run by the program (primary and secondary optimization). Moreover, in a number of tasks to be solved, the conversion process is much more labor efficient than, for instance, the secondary optimization process.
Thus, if we compare the optimization and conversion processes combined with performance of other similar solutions, we will notice a significant advantage of TotalPurge over all known competitors.
For example, the well-known application OVERKILL, when handling polylines, demonstrates by times poorer performance compared to TotalPurge.
Copyright © 2005-2013 DEBALANCE