Automatic Restoration of Omitted 2D Drawings by Using Pattern
Learning of Repetitive Features
Tanaka, M.1, Kaneeda, T. 1, Yamahira, T. 1, Sasae, D. 1, Fukagawa, J.1 and Iwama, K. 2
1
Mechanical Systems Engineering
1
Okayama University of Science, 2Engicom Corporation
1
Ridai-cho 1-1, Okayama 700-0005, 2Jinpo-cho 2-32, Kanda, Chiyoda-ku, Tokyo 101-0051
JAPAN1{ tanaka, kaneeda, Yamahira, Sasae, Fukagawa }@mech.ous.ac.jp, 2k-iwama@engicom.co.jp
Abstract: When the overviews of mechanical products are drawn in 2D drawings, various simplified expressions
are often applied. Though many researches have been conducted on the automatic conversion of 2D drawings into
solid models, it has been still difficult to convert 2D drawings including the simplified expressions to solid models
because they are not geometric and are based on human understanding. In this paper, a method is proposed that 2D
drawings including partial omissions are automatically restored to correct drawings. When there are repetitive
features in the omissions, they can be recognized and restored in the method. In this process, various patterns ofrepetitive features are learned and generalized patterns are made such as straight and circular patterns in themethod. When 2D drawings including omitted repetitive features, they can be restored by applying the generalized
patterns in the method.
Key-Words: pattern learning, repetitive feature, symplified expression, partial omission, 2D drawing, restoration

1 Introduction
When the overviews of mechanical products are
drawn in 2D drawings, various simplified expressions
are often applied to them. The automatic conversion of
2D drawings into solid models has been an issue andmany methods have been proposed for the conversion(e.g. [1-5]). However, it has been still difficult tohandle the simplified expressions in their methods
because their methods are based on only geometric
processes. The simplified expressions are usuallybased on human understanding. For example, when along bar is drawn in a 2D drawing, the middle part ofbar is often omitted in the drawing. This omission is
not geometric but is based on human understanding. In
this paper, a method is proposed that 2D drawings
including partial omissions are automatically restored
to correct drawings. If the long bar can correspond to arectangle in a 2D drawing, it is easy to restore its
omission because the solution can be obtained byrecognizing correct dimensions and making only acorrect rectangle. However, if there are small holes
repetitiously in the bar such as Example 1 illustrated inFig. 1, it becomes difficult to restore its omission. In
human understanding, the repetitive circles in Fig. 1
can be recognized and that the circles would be
repeated in the omission of bar can be assumed.
To computerize assumptions such as describedabove and the restoration of omissions in 2D drawings,

the properties of line segments and the learningalgorithm of repetitive features are applied in themethod. Each of the features consists of line segments.
For example, the properties of a circle as a line
segment are coordinates of central point, diameter, etc.
When the properties are applied to 2D drawings, forexample, it is found seven circles are the same in theirdiameters in Fig. 1. Also, it is found all of the intervals
between two adjacent circles are the same except forthe omitted part and their arrangement is horizontal in
Fig. 1. The same intervals and horizontal arrangementof the circles are learned as a horizontal pattern ofrepetitive line segments in the method. In the sameway, several different horizontal patterns are learned,
and a generalized horizontal pattern can be generated
in the method. When the generalized horizontal
pattern is applied to the circles in Example 1, omitted
circles can be restored automatically by the method as
in Fig. 2. As a result, the solid model of Example 1 canbe made from Fig. 2 by using previously proposed
methods (e.g. [1-2]).
In the method, horizontal, diagonal, vertical andcircular patterns of repetitive line segments can begeneralized, and repetitive features can be made fromthe repetitive line segments. As a result, omitted
repetitive features can be restored in 2D drawings by
the method. The method has been implemented as
experimental systems and the effects of the method

60

20

30

20

340

SCALE 1 : 1

60

Fig. 1 Example 1

340

20

Fig. 2 Restored Example 1

2 Related Works

Problem Formulation

In 2D drawings of this paper, central lines,
detailed dimensions and parts lists are almost deleted
because they are not important to explain the method.
Generally partial omissions in 2D drawings are
expressed by using break lines. In the method, breaklines are drawn as free-form curves and the scales ofobjects are indicated in 2D drawings if necessary.
DXF files are used as CAD files in the method. So
texts and various lines can be recognized respectively
in 2D drawings. Especially, since free-form curves areused only as break lines in 2D drawings, they can berecognized in the method. Two types of partial
omissions are handled in the method. One is theomissions of middle parts in slim objects such as
Example 1. Another is the omissions of partial outlines
in symmetrical objects such as Example 2 illustrated
in Fig. 3. In general, to avoid the interferences of theother parts, the partial omissions such as Example 2
sometimes appear in 2D assembly drawings.
The following preprocessing is performed in themethod when dimensions and scales are different in
2D drawings such as Example 1.
(1) Search a different dimension from the scale of a 2D
drawing. In Example 1, 340mm is searched as adifferent dimension from the scale of 1:1.
(2) Recognize two isolated surfaces concerned withthe different dimension. In Example 1, two isolated
surfaces can be recognized and colored red and blue
respectively as in Fig. 4.
(3) Rearrange two isolated surfaces in accordance withthe correct dimension of the 2D drawing. In Example
1, two isolated surfaces are rearranged as in Fig. 5.
10
10
45

In our research, firstly an algorithm wasdeveloped that 2D assembly drawings could be
converted to 3D models [1]. Though the algorithm
could obtain solutions from various 2D assembly
drawings, it was an issue that the numbers of solutions
were exponentially increased when complex assembly
drawings were applied. To reduce the numbers ofsolutions, the information of dimensions and parts lists
was applied [2]. However, it had been an issue thatmany simplified expressions were applied to complex
2D assembly drawings. Though an algorithm tohandle them was proposed [3], it could not apply tocomplex omissions such as Example 1. In the method,
complex partial omissions in 2D drawings can berestored.
There are many researches to automaticallyconvert 2D drawings to 3D models. Recently, Lu et al.
handled architectural 2D drawings [4]. Dimri andGurumoorthy handled 2D sectional views [5]. Also,
many approaches have been tried to automaticallyconvert single freehand sketches to solid models (e.g.
[6-9]). Generally these researches were based on theapplications of geometric constraints. Therefore, it
seems to be difficult to handle simplified expressionsin 2D drawings when they become complex in thoseresearches. In the method of this paper, learningalgorithms referring [10] are introduced to handle thesimplified expressions. The method would be applied
to handle complex simplified expressions because thelearning process of the method could be reinforced.

3

60

have been verified by applying many examples tothem.

Fig. 3 Example 2

340

Fig. 4 Two isolated surfaces in Example 1

5 Properties of Repetitive Line Segments
340

Fig. 5 Rearranged two isolated surfaces in Fig. 44 Properties of Line Segments
To handle repetitive line segments, various
properties are given to line segments in the method.
Presently, straight lines, circles, arcs and sine curves
are handled as line segments in the method. Each ofline segments is numbered in 2D drawings. In the front
view of Example 1, there are thirteen line segments.
They are numbered as L1, L2, ... , L13 as in Fig. 6.
Also, x-y coordinate system is arranged in this figure.
All properties of a line segment are type (straight lineor circle or ...), style (solid or dotted), diameter, length,
slope, center point, starting point and end point. Eachof those points is expressed as (x, y). The slope iscalculated as an angle of a line segment from x axis.
Especially, type, style, diameter, length and slope arecalled the properties of shapes in line segments.
For example, the properties of L2 in Fig. 6 are as
follows. The type is straight, style is solid, diameter isdefault, length is 60, slope is 90°, central point is(20,70), starting point is (20,40), end point is (20,100),
Also, the properties of L4 in Fig. 6 are as follows. The
type is circle, style is solid, diameter is 20, length is
62.83, slope is default, central point is (40,70), startingand end points are default.
In Fig. 6, by comparing the properties of shapes
in all line segments, it is found L2, L8 are the same andL4, L5, L6, L10, L11, L12, L13 are the same. In Fig. 7,
they are colored red and blue respectively.
L1
L4

L5

L7
L6

L10 L11 L12 L13
L8

L2
L9

L3

y

340

o

x

Fig. 6 Numbered line segments in Example 1
L1
L4

L5

L7
L6

L10

L11

L12

L13
L8

L2
L9

L3
340

Fig. 7 Recognition of the same line segments

Fig. 8 illustrates two patterns of repetitive line
segments. In each of the patterns, line segments arearranged horizontally and all of the intervals between
two adjacent line segments are the same. Thosepatterns are learned and generalized in the method.
The elements of pattern learning are defined as various
properties in the method. To learn the patterns, theproperties of repetitive line segments are defined by atleast three adjacent line segments. In the method,
seventeen properties of repetitive line segments aredefined as follows. Here, the center point of Li (i=1,2, ...) that is a line segment is expressed as (xi, yi).
[Properties of repetitive line segments](1) name (=horizontal or vertical or ...) (2) xi-xi-1(=∆xi,i-1) (3) yi-yi-1 (=∆yi,i-1) (4) tan-1(∆yi,i-1 /∆xi,i-1) (=Ai,i-1) (5) ∆xi,i-1*∆xi,i-1+∆yi,i-1*∆yi,i-1 (=Di,i-1) (6)Whether all of Ai,i-1, Ai-1,i-2, ... , A2,1 are the same or not(=same or different) (7) Whether all of Di,i-1, Di-1,i-2, ... ,D2,1 are the same or not (=same or different) (8) The
radius of curvature calculated from three center pointsof Li, Li-1 and Li-2 (=Ri) (9) x value in the center ofcurvature (=Cxi) (10) y value in the center of curvature(=Cyi) (11) The slope of Li based on the center ofcurvature (=Si) (12) The slope of Li-1 (=Si-1) (13) The
slope of Li-2 (=Si-2) (14) Whether all of Si, Si-1, Si-2, ... ,S1 are the same or not (=same or different) (15)Whether all of Ri, Ri-1, ... , R1 are the same or not (=same
or different) (16) Whether all of Cxi, Cxi-1, ... , Cx1 are
the same or not (=same or different) (17) Whether allof Cyi, Cyi－1, ... , Cy1 are the same or not (=same ordifferent)
In the values of those properties, 0/0=1 is defined
and the value is default in the case of a/0 ( | a |>0 ) in
the method. The properties form (8) to (17) are applied
to only circular patterns. So they are used andexplained later. In a pattern of repetitive line segments,
firstly the properties of Li is calculated and then theproperties of Li+1 is calculated. In the same way, theproperties of Li+2, Li+3, ... are calculated continuously.
For example, the properties of Pattern A in Fig. 8(a)are calculated as follows. Here, "h", "d", "s", "dif"mean "horizontal", "default", "same" , "different"
respectively.
[Pattern A]
Step L1: (1) h (2) d (3) d (4) d (5) d (6) d (7) d.
Step L2: (1) h (2) 40 (3) 0 (4) 0° (5) 1600 (6) d (7) d.
Step L3: (1) h (2) 40 (3) 0 (4) 0° (5) 1600 (6) s (7) s.
Also, the properties of Pattern B in Fig. 8(b) arecalculated as follows.

[Pattern B]
Step L1: (1) h (2) d (3) d (4) d (5) d (6) d (7) d.
Step L2: (1) h (2) 15 (3) 0 (4) 0° (5) 225 (6) d (7) d.
Step L3: (1) h (2) 15 (3) 0 (4) 0° (5) 225 (6) s (7) s.
Step L4: (1) h (2) 15 (3) 0 (4) 0° (5) 225 (6) s (7) s.
15

15(a) Pattern A

o

x
L1

L2

L3

L4

(b) Pattern B

Fig. 8 Two horizontal patterns of repetitive
line segments

6

Generalization of Patterns in
Repetitive Line Segments

6.1

Generalized straight pattern

Generalized circular patternFig. 10 illustrates two circular patterns ofrepetitive line segments. The properties from (8) to(17) described in chapter 5 can be calculated in thisfigure. Si is calculated as an angle between Li and thestraight line whose end points are (xi, yi) and (Cxi, Cyi).
(Cxi, Cyi) is the center of curvature in the pattern
including Li. The properties of Pattern C in Fig. 10(a)are calculated as follows. Here, "c" mean "circular".
[Pattern C]
Step L1: (1) c (2) d (3) d (4) d (5) d (6) d (7) d (8) d (9)d (10) d (11) d (12) d (13) d (14) d (15) d (16) d (17) d.
Step L2: (1) c (2) -21.21(3) 8.79 (4) 157.49° (5)632.52 (6) d (7) d (8) d (9) d (10) d (11) d (12) d (13) d(14) d (15) d (16) d (17) d.
Step L3: (1) c (2) -21.21(3) -8.79 (4) 202.51° (5)632.52 (6) dif (7) s (8) 30 (9) 0 (10) 0 (11) 45° (12) 45°(13) 45° (14) s (15) s (16) s (17) s.
Also, the properties of Pattern D in Fig. 10(b) arecalculated as follows.
[Pattern D]
Step L1: (1) c (2) d (3) d (4) d (5) d (6) d (7) d (8) d (9)d (10) d (11) d (12) d (13) d (14) d (15) d (16) d (17) d.
Step L2: (1) c (2) -20 (3) 0 (4) 180° (5) 400 (6) d (7) d(8) d (9) d (10) d (11) d (12) d (13) d (14) d (15) d (16)d (17) d.
Step L3: (1) c (2) 0 (3) -20 (4) 270° (5) 400 (6) dif (7)s (8) 14.14 (9) 5 (10) 5 (11) 90° (12) 90° (13) 90° (14)s (15) s (16) s (17) s.
Step L4: (1) c (2) 20 (3) 0 (4) 0° (5) 400 (6) dif (7) s (8)14.14 (9) 5 (10) 5 (11) 90° (12) 90° (13) 90° (14) s (15)s (16) s (17) s.
20
L2
L1
L3

L2

4 5°

L1

(5, 5)

4 5°

R
30

When Pattern A and B in Fig. 8 are compared, it isfound there are same properties and different
properties. In the different properties, when the valuesof them are replaced as "token", a generalized pattern
can be made as follows.
[Generalized horizontal pattern](1) h (2) token (3) 0 (4) 0° (5) token (6) s (7) s.
The generalized pattern can be applied to any
kind of horizontal patterns in repetitive line segments.
In 2D drawings, when the same line segments arerecognized, whether they form a horizontal pattern or
not can be decided by applying the generalized
horizontal pattern.
Fig. 9 illustrates a diagonal pattern of repetitive
line segments. The finally properties of this pattern are
as follows. (1) diagonal (2) 25 (3) 10 (4) 21.8° (5) 725(6) s (7) s. When horizontal patterns are included into
diagonal patterns, the generalized horizontal patterndescribed above can be synthesized to the diagonal
pattern as follows. Here, "t" means "token".
[Generalized diagonal pattern](1) t (2) t (3) t (4) t (5) t (6) s (7) s.
In the same way, vertical patterns can be generalized
as follows.
[Generalized vertical pattern](1) vertical (2) 0 (3) t (4) 90° (5) t (6) s (7) s.
Since the generalized diagonal pattern can coverhorizontal and vertical patterns, it can be called thegeneralized straight pattern in the method.

6.2

20

40

10 10

Fig. 9 A diagonal pattern of repetitive line segments

14

40

25

28

x

25

x

o

y

y
o

15

L3

L1

y

4 5°

L2

L1

L3
L2

L3

L4

(0,0)

(a) Pattern C(b) Pattern D

Fig. 10 Two circular pattern of repetitive line segments

The generalized circular pattern can be madefrom Pattern C and D as follows.
[Generalized circular pattern](1) c (2) t (3) t (4) t (5) t (6) dif (7) s (8) t (9) t (10) t(11) t (12) t (13) t (14) s (15) s (16) s (17) s.

7Restoration of Omitted Repetitive
Line Segments

7.1 Search of repetitive line segments in 2D
drawings
Fig. 11 illustrates Example 3 that is a plate having
many holes. To restore omitted repetitive line
segments in 2D drawings, firstly repetitive line
segments are searched in the method. The searchalgorithm of them is as follows.
(1) Pick up three adjacent line segments in a 2D
drawing. Their properties of shapes are the sameand they are called a core in this algorithm.
(2) If the core forms a straight or a circular pattern, theother line segments are searched whose propertiesof shapes are the same as the core and theirproperties of repetitive line segments except for(7) are the same as the core.
(3) The core and searched line segments in (2) of thisalgorithm are made as a set of repetitive line
segments. The line segments of the set arearranged sequentially in x-y or polar coordinate
system of the 2D drawing.
(4) In the same way, the other sets of repetitive line
segments are searched.
In Example 3, three sets of repetitive line
segments can be searched as {L1, L2, L3, L12, L11, L10},{L14, L13, L4, L5, L6} and {L9, L8, L7, L15, L16}.
L1

L2

L3

L12

L4

L13

L5

L11

L10

L1

L2

L3

L17

L12

L4

L18

L13

L5

L14

L10

L14

L6

L6

L11

L19
L20

L9

L8

L7

L15

Fig. 11 Example 3

7.2

L16

L9

L8

L7

L21

L22

L15

In a set of repetitive line segments, if the property(7) of repetitive line segments cannot always be"same", omissions of line segments might exist. In thiscase, the set is called an incorrect set. In the method,incorrect sets are restored to correct sets. Suppose a setof repetitive line segments consists of { L1, L2, …, Ln}.
Also, suppose the core of set consists of Li, Li+1 andLi+2 that form a straight pattern. The properties of (1),(2), (3), (4) and (5) in repetitive line segments can becalculated from Li, Li+1 and Li+2. Of course, (6) and (7)are "same" in this case. When the values of theproperties are applied from L1 to Ln, the correct set canbe redrawn in the 2D drawing. In the same way,
incorrect circular patterns can be restored correctly.
In an incorrect pattern of repetitive line segments,
whether added line segments to generate a correct
pattern are omitted line segments or not in a 2D
drawing can be decided as follows. Suppose a group ofadded and adjacent line segments exist between two
groups of adjacent line segments existing originally ina 2D drawing. If two break lines become border lines
among the three groups, the added and adjacent line
segments are usually omitted line segments. Also, if
there are incorrect dimensions in 2D drawings, added
and adjacent line segments are usually omitted line
segments. As a result, in Example 3, omitted line
segments are restored by the method as in Fig. 12. In
this figure, three patterns of repetitive line segments
are colored blue, red and green respectively. Also, twobreak lines are colored purple. In the blue and green
patterns, {L17} and { L21, L22} are added respectively.
In the red pattern, {L18} and { L19, L20} are added
sequentially.
When two break lines are deleted in Example 3,
four straight line segments that cannot form any closed
loops of outlines are made. They are colored brown in
Fig. 12. They are extended until connecting to theother line segments in the method. These operations
are the postprocessing of the method and are applied
only to straight lines and arcs. As a result, Example 3
can be restored by the method as in Fig. 13. Also,
Example 1 can be restored as in Fig. 2 and Example 2
can be restored as in Fig. 14.

L16

Fig. 12 Recognition ofpatterns in Example 3

Restoration proccess of omitted line
segments

Fig. 13 Restored Example 3 Fig. 14 Restored
Example 2

Restoration of Omitted Repetitive
Features

8.1 Generation of repetitive features
In Fig. 15, three horizontal patterns of line
segments can be recognized as {L1, L3, L5}, {L2, L4,
L6} and {L7, L8, L9}. These patterns can be considered
as a horizontal pattern of triangles. These triangles canbe made as follows. Firstly, recognize that L1 and L2
can be connected as a single line L12. In the same way,
L3, L4 and L5, L6 can be connected as L34 and L56
respectively. Next, recognize that L12 and L7 can beconnected as a single line L127. In the same way, L348
and L569 can be made. Since L125, L348 and L569 are thesame triangles, a horizontal pattern of triangles can be
made. In the same way, the patterns of various
repetitive features can be made. The connections ofline segments are continued until they form closed
loops or they break their original patterns. The making
of features can be effective when 2D drawings becomecomplex.
All properties of a feature are the properties ofshapes in all line segments forming that and centroid
point. For example, the properties of L125 describedabove are the properties of shapes in L1, L2, L5 and (30,12). When line segments are changed to features in theproperties of repetitions, center points are changed
into centroid points and a slope is calculated in a
typical line segment that is an element of a feature.
L1

y
o

x

L2
L7

L3

L4

155

SCALE 1 : 1

Fig. 16 Example 4
155

Fig. 17 Recognition of repetitive line segments in
Example 4

L6

L5

L8

a result, Example 4 can be restored as in Fig. 20 by themethod.
Fig. 21 illustrates a mechanical drawing of ascrew as Example 5. Four repetitive features can berecognized as in Fig. 22 after preprocessing of themethod. In this figure, they are colored green, red,
yellow and blue respectively. When they arerecognized as incorrect patterns of features, the correct
patterns of features can be generated by adding
omitted features as in Fig. 23. As a result, Example 5
can be restored as in Fig. 24 by the method.

30

8

155
L9

Fig. 15 A horizontal pattern of repetitive features

8.2 Examples in mechanical parts
Fig. 16 illustrates a mechanical drawing of aspring as Example 4. Five horizontal sets of repetitive
line segments can be recognized after preprocessing of
the method in Example 4. They are colored green, red,
yellow, orange and blue respectively in Fig. 17. By
forming closed loops in these line segments, twohorizontal sets of repetitive features can be recognized.
They are colored green and blue respectively in Fig.
18. When they are recognized as incorrect patterns offeatures, the correct patterns of features can begenerated by adding omitted features as in Fig. 19. As

Fig. 18 Recognition of repetitive featuresin Example 4
155

Fig. 19 Restoration of omitted features in Example 4

would be generalized in the method. Moreover, therestorations of various omitted line segments that are
not repetitive in 2D drawings are an issue in themethod.

155

30

Fig. 20 Restored Example 4260
SCALE 1 : 1

Fig. 21 Example 5260

Fig. 22 Recognition of repetitive features in Example 5260

Fig. 23 Restoration of repetitive features in Example 5260

Fig. 24 Restored Example 5

9Conclusion

Horizontal, vertical, diagonal, straight andcircular patterns of repetitive line segments can belearned and generalized in the method. Also, thepatterns of repetitive features can be made in themethod. Various partial omissions in 2D drawings canbe restored by using those patterns in the method.
More various patterns can be made by increasing
various properties. For example, the generalized
pattern of repetitive circles of which diameters arecontinuously increased can be made by adding
properties such as Dmi/Dmi-1 where Dmi expresses
diameter i. Also, zigzag patterns, eddy patterns, etc

References:[1] Tanaka, M., Iwama, K., Hosoda, A. and Watanabe,T., Decomposition of a 2D assembly drawing into 3Dpart drawings, Computer-Aided Design, Vol. 30, No. 1,
1998, pp 37-46.
[2] Tanaka, M., Anthony, L., Kaneeda, T. andHirooka, J., A single solution method for converting
2D assembly drawings to 3D part drawings,
Computer-Aided Design, Vol. 36, No. 8, 2004, pp.
723-734.
[3] Tanaka, M., Kaneeda, T., Iwama, K., Hirooka, J.
and Yamane, S., A Method to Convert 2D Drawings
Including Simplified Expressions into 3D Models,
The Third International Conference on Leading Edge
Manufacturing in 21st Century (LEM21), Vol. 1, No.
05-204, 2005, pp. 57-62.
[4] Lu, T., Tai, C., Bao, L., Su, F. and Cai, S., 3D
Reconstruction of Detailed Buildings from
Architectual Drawings, Computer-Aided Design andApplications, Vol. 2, Nos. 1-4, 2005, pp. 527-536.
[5] Dimri, J. and Gurumoorthy, B., Handling sectionalviews in volume-based approach to automaticallyconstruct 3D solid from 2D views, Computer-Aided
Design, Vol. 37, No. 5, 2005, pp. 485-495.
[6] Sugihara, K., Machine Interpretation of Line
Drawings, The MIT Press, 1986.
[7] Lipson, H. and Shpitalni, M., Optimization-based
reconstruction of a 3D object from a single freehandline drawing, Computer-Aided Design, Vol. 28, No. 8,
1996, pp. 651-663.][8] Lipson, H. and Shpitalni, M., Correlation-Based
Reconstruction of a 3D Object from a Single Freehand
Sketch, AAAI Spring Symposium on Sketch
Understanding, 2002, pp. 99-104.
[9] Cao, L., Liu, J. and Tang, X., 3D Object
Reconstruction from a Single 2D Line Drawing
without Hidden Lines, ICCV’05, Vol. 1, 2005, pp.
272-277.
[10] Iwama, K., A Hypothesis of Introspection put
forth on the basis of robotic program, Toward a
Science of Consciousness, 2005