Intelligent Comparison of 2D Drawings in PDF, Image or CAD Format

This functionality is one of the strong points of the “COMPARE” software, it makes it possible to detect in a few seconds all the contours which only differ by a TRANSLATION, A ROTATION or a CHANGE OF SCALE.

This feature is very powerful, because among the selected items, the “COMPARE” software identifies edges and finds differences despite moving, rotating and resizing.

The intelligent comparison is broken down into 4 main phases :

  • Identification of contours,
  • Relating the contours on the 2 files,
  • Transformation detection,
  • Calculation of similarities and differences.

Identification of contours

Contour identification is different for raster images or CAD or PDF vector images.

On a raster image, a contour is the set of selected points whose distance between 2 points is less than the precision. In the selection, there can be one or more contours.

On PDF or CAD files, a contour is the set of elements whose minimum distance between two elements of this contour is less than the precision. The minimum distance between two elements is equal to the minimum distance between the characteristic points of these 2 elements. The characteristic points depend on the element. A drawing in a PDF or CAD vector file is composed at the most basic level of segments and/or polylines (set of segments). The characteristic points are the ends of these segments.

2 conditions must be met for a contour thus defined to be taken into account in the intelligent comparison :

  1. For raster images, the number of points that constitute them is greater than a threshold defined in the “THRESHOLD” tab. and is composed of more than 80% points difference
  2. For CAD or PDF vector images, the number of elements that constitute them is greater than a threshold defined in the “THRESHOLD” tab. and is composed of more than 80% different elements.

Relating the contours on the 2 files

This first step completed, the “COMPARE” software will try to identify the pairs of contours to compare. This identification may, in certain cases, fail. For example, when contours are too similar in a file or there are too many modifications to an outline in the two versions of the files.

If the intelligent comparison ever fails for a certain contour, which is rare, you can always use the comparison by reference point which works in all cases.

This relationship is different for raster images and CAD or PDF vector images: in one case we manipulate points, in the other they are elements.

We will not describe the identification method because this is the strong point of intelligent comparison. To learn more about identifying similarities and differences on PDF and CAD files, refer to the articles and thesis below:

Transform detection

From the connection of the characteristic elements of the contours, the COMPARE software calculates the transformation matrices which make the contours of the first file coincide with the contours of the second file. There are as many transformation matrices as there are linked contours. These matrices take into account the basic transformations which are TRANSLATIONS, ROTATIONS, CHANGES in SCALE or AFFINITIES. These basic transformations make up the transformation matrices.

Calculating similarities and differences

With the transformation matrices calculated in the previous step, the COMPARE software finds elements that are identical or different. This detection of similarities and differences takes into account a tolerance (as for comparison by superposition or comparison by points). This tolerance is modifiable. It can be adapted to each of the intelligent comparisons. And you can run the smart comparison as many times as you want by modifying this tolerance.

During an intelligent comparison the 3 phases are necessary:

These 3 phases are repeated several times with thresholds which automatically adapt to find the corresponding contours and the best transformation matrices which give the least differences.


Click here to learn more about 1A3i’s "COMPARE" software.