Content uploaded by Sergey Slyadnev

Author content

All content in this area was uploaded by Sergey Slyadnev on May 19, 2020

Content may be subject to copyright.

233

ISSN 0361-7688, Programming and Computer Software, 2020, Vol. 46, No. 3, pp. 233–243. © Pleiades Publishing, Ltd., 2020.

Russian Text © The Author(s), 2020, published in Programmirovanie, 2020, Vol. 46, No. 3.

Simplification of CAD Models by Automatic Recognition

and Suppression of Blend Chains

S. E. Slyadneva,* and V. E. Turlapova,**

aLobachevsky State University of Nizhny Novgorod, pr. Gagarina 23, Nizhny Novgorod, 603950 Russia

*e-mail: sergey.slyadnev@gmail.com

**e-mail: vadim.turlapov@itmm.unn.com

Received December 20, 2019; revised January 9, 2020; accepted January 19, 2020

Abstract—This paper presents a CAD model simplification procedure that consists in recognizing and sup-

pressing blend chains of certain types. The proposed method involves Euler operators (KEV, KEF, and

KFMV) developed on top of an open-source geometric modeling kernel. The simplification process consists

of two stages: recognition and suppression. The suppression stage ensures the geometric and topological

validity of the simplification result. The proposed approach is targeted for use in batch mode, which poses

strict requirements to the robustness of the suppression algorithm. The essential properties of the approach

are its sustainability, predictability of the result, and extensible architecture, which allows new topological

cases to be added without modifying the algorithm’s core. At the recognition stage, the algorithm constructs

an attributed adjacency graph, which is then enriched with the information about types of edges, their prop-

erties, and assumed kinds of blend faces. At the suppression stage, the algorithm iterates through the adja-

cency graph and composes candidate blend faces into chains. For each face in a chain, local topology analysis

is carried out to determine the corresponding sequence of Euler operators that are supposed to eliminate that

face. The algorithm can be extended by adding descriptors of new topological cases into the processing. Upon

applying the Euler operators, the affected edges are reconstructed to obtain a geometrically correct boundary

representation of the model.

DOI: 10.1134/S0361768820030081

1. INTRODUCTION

Simplification of CAD models is carried out to solve

a variety of engineering problems. Among them, we can

mention the preparation of geometries for computation

(numerical simulation), data compression for efficient

visualization, intellectual property protection during

data exchange, performance improvement of CAD sys-

tems, and elimination of secondary structural elements

to ensure recognition of primary ones. In history-

based parametric design systems, a CAD model can be

simplified by eliminating a certain set of structural ele-

ments (also called features) from the tree of opera-

tions. However, if the design history is not available or

does not contain desired structural elements, this

approach is not applicable. Thus, a need in direct edit-

ing operators arises, which are currently absent in

open-source libraries for geometric modeling.

In this paper, we describe an operator for blend

chain suppression that is based on the recognition of

structural elements with the subsequent use of Euler

operators. The contribution of this work is as follows:

(a) the implementation of some Euler operators (KEV,

KEF, and KFMV) on top of an open-source geomet-

ric modeling kernel; (b) the development of an exten-

sible architecture for the recognition and suppression

of blend chains; and (c) the implementation of an

algorithm for suppressing a number of structurally sig-

nificant types of blend chains.

The proposed algorithm can operate in global and

local modes. In the former case, incremental suppres-

sion is carried out, i.e., blend chains are eliminated

one after another with the intermediate modification

of auxiliary data structures. In the latter (local) case,

the recognition of a blend chain starts with a candidate

face selected by the user, the other chains being unaf-

fected. The suppression algorithm accumulates the

continuous history of model modifications, which

allows the resulting boundary representation to be

matched with the original one, thus ensuring the pres-

ervation of the associated data (colors, names, anno-

tations, tolerances, etc.).

The paper is organized as follows. Section 2 over-

views the most significant works on the recognition

and suppression of blend chains. Section 3 describes

our approach to the blend face recognition based on

an attributed adjacency graph. Section 4 presents a

suppression algorithm and an incremental procedure

for running this algorithm in the batch mode. Section 5

contains some examples that illustrate the application

of the algorithm to several CAD models from our

234

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SLYADNEV, TURLAPOV

everyday practice. That section also compares the

developed method with a more general face elimina-

tion algorithm. The directions for further research are

outlined in Section 6.

2. STATE OF THE PROBLEM

In [1], we analyzed some publications devoted to the

problem of CAD model simplification and described

the corresponding software packages. Let us dwell on

the results related mainly to the suppression of blend

chains.

The simplification of a CAD model consists in its

geometric transformation in accordance with certain

functional and technological requirements. With the

engineering semantics of the model being reflected in

its structural elements (SEs), to simplify its geometry,

the SEs need to be represented in an explicit form.

When the design history of a parametric model is

available, we can dispense with computationally com-

plex procedures, e.g., SE recognition and morpholog-

ical analysis [2]. Unfortunately, such parametric mod-

els are not always available, and even if they are, their

design history may not contain desired SEs. For

instance, a blind hole defined in a parametric model

can be transformed into a through hole when a new

volume element is removed from the model. Similarly,

when extending a prismatic body, the blend elements

defined on a f lat sketch are not automatically trans-

formed into the SEs of edge-blend faces. Thus, for

geometry simplification, direct editing tools need to be

employed even when a parametric model is available.

In [3, 4], a procedure for blend face suppression

implemented in Rhinoceros, a popular CAD system,

was described. The algorithm performs a preliminarily

classification of faces based on their types: edge-blend

face (EBF) and vertex-blend face (VBF) (see Fig. 1).

Then, the algorithm computes new geometric carriers

of boundary elements (an edge for the EBF and a ver-

tex for the VBF). The topology of the model is modi-

fied at the f inal stage of the procedure without any

preliminary prediction.

In [5, 6], a topological procedure for blend face sup-

pression based on Euler operators with subsequent

geometry stitching was described. In contrast to heuris-

tic “geometric” approaches, e.g., [4], the algorithms

described in [5, 6] first generate a topology transforma-

tion plan as a sequence of Euler operators that guaran-

tee the validity of the resulting boundary representation.

The predictability of the result achieved through the

local analysis of the blend face topology, in our opin-

ion, makes the algorithms [5, 6] suitable for automatic

simplification of CAD models in the batch mode.

However, complex blend configurations that cannot be

processed due to the limitations of the algorithm are

misrecognized already at the initial stage. Thus, the

algorithm processes only topological cases for which

the corresponding sequence of Euler operators is a pri-

ori known. On the other hand, the implementation of

such algorithms requires a geometric kernel with Euler

operators (e.g., Parasolid or ACIS). Since OpenCas-

cade, the only open-source geometric kernel, does not

provide these operators, their implementation was one

of our goals in the context of this research.

The recognition of blend elements on a boundary

representation is considered a relatively simple problem

(in contrast to the problem of their suppression).

Indeed, any face is defined by an exact equation of a

parametric surface , which generally has an

explicit specifier of its type at the level of data structures

(plane, cylinder, sphere, torus, spline, etc.). Based on

this specifier and differential properties of the surface, it

can be concluded whether the face is a blend element

or not.

The recognition of blend chains requires local topol-

ogy analysis in the neighborhood of several candidate

faces. A sufficiently general (from a practical perspec-

tive) chain recognition algorithm, which also extracts

the order of blend chain construction, was proposed in

[7]. The work [6] enriched the result obtained in [7]

with a suppression algorithm, which uses a face removal

operator [8] developed by the same authors.

The series of works [6–8], in our opinion, provides

a fundamental solution to the problem of blend face

recognition and suppression. As mentioned above, the

basic idea of this topological approach is to guess the

structure of a resulting model with the subsequent

transformation of the initial boundary representation

to an a priori known result. Thus, our goal is to formal-

ize and implement this principle by using open-source

geometric modeling tools.

3. BLEND FACE RECOGNITION

To suppress blend chains, they should be automat-

ically recognized in the original model. At this stage,

v

(,)

su

Fig. 1. Recognizable types of blend faces: edge-blend face

(EBF) and vertex-blend face (VBF).

Vertex-Blend Face

Edge-Blend Face

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SIMPLIFICATION OF CAD MODELS BY AUTOMATIC RECOGNITION 235

the problem consists not only in finding the faces, but

also in classifying the edges that belong to them (see

Fig. 2). The classification is carried out based on the

following types: (a) spring edges; (b) cross edges; and

(c) terminating edges. The recognition result is repre-

sented as attributes of an adjacency graph. This stage

does not form chains. A recognition technique that

transforms the adjacency graph to determine the

sequence of Euler operators is published for the first

time.

Below is a brief description of the recognition pro-

cess.

1. Construction of the attributed adjacency graph

(AAG).

2. EBF recognition.

3. VBF recognition.

4. Refinement of terminating edges (a terminating

edge cannot be part of two faces recognized as blend

elements).

5. Extraction of the result.

For EBF and VBF recognition, a set of geometric

and topological heuristics are employed, which are

described below.

The recognition procedure transforms the initial

adjacency graph G into an equivalent graph G*, which

is enriched with additional attributes associated with

its vertices (Fig. 3). The main types of attributes are a

blend element (attribute value is ) and a carry-

ing face (attribute value is ).

3.1. Attributed Adjacency Graph

The AAG is a key element of the proposed recogni-

tion architecture. This data structure can be used to

solve a wide range of recognition problems. The AAG,

which contains data on the convexity and concavity of

edges (see Fig. 4), allows us to recognize certain basic

SEs, e.g., cylindrical holes, pockets, and protrusions

[14]. The AAG is also a convenient data storage that

makes it possible to emphasize the adjacency relation

extracted by analyzing the topology of the model’s

boundary representation. Let us list the main advan-

tages of the AAG in solving SE recognition problems.

First, the AAG enables the transition from the geo-

metric description of a model to the corresponding

formalism of graph theory. Model classification pro-

cedures (recognition of sheet bodies, tubes, 2.5D

models, etc.) also use operations on graphs, e.g., find-

ing connected components, subgraphs, and shortest

paths, analyzing degrees of vertices, etc.

Second, the AAG acts as a short-term storage

(cache) for identifiers of edges, vertices and faces. The

boundary representation of a model in the OpenCas-

cade library does not include unique identifiers of

boundary elements in an explicit form. These identifi-

ers must be extracted when analyzing topological

structures, which can adversely affect the performance

(

)

⋅

1

A=

(

)

⋅

2

A=

Fig. 2. Types of edges that bound blend faces.

Spring

Cross

Terminating

Fig. 3. Enrichment of the adjacency graph G with attri-

butes as a result of blends recognition.

GG*

Attr

Attr

Fig. 4. Attributed adjacency graph.

G1

G1

G2

G2

G3

G3

G4

G4

F

F

Convex

Concave

G5

G5

G6

G6

236

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SLYADNEV, TURLAPOV

of the corresponding software. The presence of the

identifier cache as part of the AAG allows it to be used

as an “accelerating data structure.”

Third, the AAG is a carrier of boundary represen-

tation semantics and supplements it with the informa-

tion about the SEs extracted in the process of recogni-

tion.

3.2. EBF Recognition

EBF recognition relies on the classification of all

model edges based on the following types (Fig. 2).

1. Spring edges are smooth guide edges for EBFs.

2. Cross edges can be smooth and non-smooth;

they implement the adjacency of two blend faces

(EBFs or VBFs).

3. Terminating edges complete blend chains; a

closed chain does not contain terminating edges.

At the first stage, all smooth edges are found. With

dihedral angles being classified at the AAG construc-

tion stage, this stage is reduced to the attribute-based

selection of the corresponding edges from the AAG.

From the set of smooth edges, spring edges for

EBFs are selected. For this purpose, the principal cur-

vatures on a candidate edge are analyzed. The rela-

tionships between the absolute values of the curvatures

allow us to make an assumption about whether a face

A with the curvatures a1 and a2 is a blend face or not

(Fig. 5). Thus, the following conditions must be satis-

fied.

1. The absolute value a2 exceeds the absolute value

a1; i.e., the curvature in a transverse direction domi-

nates.

2. The absolute value a2 exceeds the absolute value

b2 by at least a factor of c (c > 1). This heuristic indi-

cates that the given EBF rests on a less curved surface,

e.g., on a plane.

The radius of the candidate blend face is assumed

to be .

Cross edges can be found from the condition that

the curvature of an EBF along a cross edge coincides

2

1/

a

with the principal curvature a2 found earlier. The cur-

vature of a surface along a curve is computed by the

following well-known differential geometry formula,

which involves the coefficients of the first and second

quadratic forms:

Here, and are parameters

of the carrying surface (see Fig. 6).

Terminating edges are not smooth and are not

included in the sets of spring and cross edges. A closed

chain has no terminating edges. An open chain is

bounded by terminating edges. Some terminating

edges are overridden to non-smooth cross edges (see

Section 3.4).

3.3. VBF Recognition

The next recognition stage is VBF extraction. At this

stage, a set of topological heuristics prompted by typical

blend co nfigu rations on real-world mo dels is empl oyed .

First, the VBF cannot be adjacent to another face of this

type (this heuristic ref lects the restriction of the algo-

rithm). Second, for the VBF, there must be at least

three adjacent EBFs with the adjacency being imple-

mented through cross (non-terminating) edges. Rec-

ognized VBFs receive the corresponding attribute in

the AAG.

3.4. Refinement of Terminating Edges

Finally, when all blend faces are marked, terminating

edges are refined. For each terminating edge e, a pair of

faces with the indices such that = 1

(i.e., both the faces are elements of a blend chain) is

found. Since the terminating edge must not occur

internally in a blend chain, its type is overridden to the

cross edge. A specific feature of the overridden cross

edges is that they do not form smooth connections

between blend elements (see Fig. 7).

()

+λ+λ

λ=

+λ+λ

2

2

2

.

2

LM N

k

EFG

λα

v

/tan

=d du=

v

(,)

u

(

)

,

ee

fg

() ()

ee

Af =Ag

Fig. 5. Curvature analysis to determine the blend face.

A

b2b1

a1

a2

p

B

Fig. 6. To the measurement of the curvature along the edge.

du

dv

v

α

u

x0

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SIMPLIFICATION OF CAD MODELS BY AUTOMATIC RECOGNITION 237

Fig. 7. Typical example of a terminating edge overridden to

a cross edge.

Overridden

terminating edge

4. BLEND FACE SUPPRESSION

Suppression of blend faces and their chains consists

in removing the corresponding faces and stitching the

adjacent ones to obtain a waterproof shell. The

removal can be implemented in several ways: (a) by

eliminating faces from the topological structure of a

model with subsequent collapsing of the gaps and (b)

by applying a sequence of Euler operators. In the first

case, the removal is carried out somewhat blindly

because there is no guarantee that the topological con-

figuration in the neighborhood of the chain allows for

a correct collapse of the gap. To control the collapsing

process, an additional analysis was carried out in [10]

to match the local topological configuration of a blend

chain with an abstract domain homeomorphic to it. If

Euler operators are employed [11], then topological

flaws are impossible by definition. On the other hand,

the Euler operator performs only the syntactic transfor-

mation of the model while preserving its semantics

(geometry). Therefore, upon applying Euler operators,

a local reconstruction of the geometry is required. We

refer to this stage as the geometry normalization pro-

cess.

Formally, the process of blend face removal

involves the following sequence of operations.

1. By traversing the graph , blend chains are

formed as sets of faces . Here,

(where K is the number of chains), while Nk

and Mk are the starting and ending indices of the faces

in the kth chain. Only the AAG vertices to which the

subgraph (where ) corre-

sponds are extracted. The function returns a

graph vertex with the number i = Nk, Mk. The func-

tion returns an attribute value for this vertex (1 for

a blend element, 2 for a spring face, or 0 for the other).

2. The faces of the chain are removed from the

model. The graph plays a supplementary role in the

process of face removal, which is why its reconstruc-

tion (or modification) is necessary only if the suppres-

sion is continued to the next chain, i.e., .

3. The affected edges of the model are recon-

structed to merge the support faces.

4.1. Basic Algorithm

The basic suppression algorithm processes the fol-

lowing topological cases of a unit face.

1. The face is an isolated blend face.

2. Th e face is part of a closed or o pen cha in of EBFs

and VBFs.

At the preliminary stage, the possibility of sup-

pressing the entire chain is checked. For this purpose,

additional topological heuristics are employed. In par-

ticular, any cross edge of the chain must be part of

exactly two faces of this chain. Otherwise, the chain is

*

G

{

}

==:,

kj kk

FfjNM

1,

k= K

⊂

*

k

CG

(( )) 1,

ik

AV C =

(

)

⋅

i

V

i

f

(

)

⋅

A

k

F

*

G

≠

kK

not completely recognized and is considered insup-

pressible.

The next steps of the suppression algorithm are as

follows.

1. Using the Euler operators for the topological

preparation of the result.

2. Reconstructing the edges to adapt the geometry

to a new topological structure (normalization).

3. Posterior validation of the faces affected.

Step 1 consists in the sequential application of the

kill-edge-vertex (KEV), kill-edge-face (KEF), and

kill-face-make-vertex (KFMV) operators in the order

determined by the type of a particular topological con-

figuration.

Step 2 performs purely geometric constructions on

a predetermined topological structure of the model.

At this step, the edges, vertices, and faces affected by

the topological operation are reconstructed. For

instance, to obtain a new supporting curve of an edge,

the corresponding supporting surfaces are intersected.

Step 3 protects the algorithm from possible errors

in geometric constructions (intersection of surfaces,

projection of a curve onto a surface, etc.) that are due

to the imperfect reliability of the geometric kernel. In

addition, at this step, for each affected face, the

boundary of the domain D is checked for self-intersec-

tion. This is required because the suppression of blend

faces can, generally speaking, change the number of

connected components in the domain D (see Figs. 8

and 9). The number of connected components in this

domain is assumed to be an invariant of the blend sup-

pression operator. The analysis of alternative invari-

ants, e.g., a bounding box for the domain D, will make

it possible to introduce new operating modes of the

suppression algorithm.

238

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SLYADNEV, TURLAPOV

4.2. Incremental Procedure

The basic algorithm described above simplifies a

CAD model by suppressing a single blend chain

selected. However, to simplify models in the batch

mode (without user involvement), this is not enough.

To remove all blend chains, we implemented an auxiliary

procedure of the so-called incremental suppression.

The incremental procedure begins with construct-

ing the AAG (G). The graph G must be reconstructed

whenever the topology of a model is modified,

because the graph vertices address the boundary ele-

ments of the model through their integer indices,

which are not robust to modification operators [12].

The procedure implements two nested data process-

ing loops (see Fig. 10). At each iteration of the outer

loop, the blend chains of the entire model are recog-

nized. Upon selecting an arbitrary face , an

attempt is made to suppress the corresponding chain

. If successful, the graph is reconstructed

for the updated model and the local history of modi-

fications is concatenated into the global history H. If

the chain cannot be deleted (inner loop), the

corresponding faces are removed from the suppression

queue and a new chain is selected without recon-

structing the graph. In addition, the algorithm stores

the set of addresses T for the insuppressible faces,

which generally remain relevant even after the modifi-

cation of the topology (these are the so-called tran-

sient indices for the boundary elements of the model).

In the inner contour, the algorithm iterates over the

chains until the suppression is complete or the queue

F is empty.

4.3. History of Modifications

Like any shape editing operator, the suppression

operator must preserve associativity between the

boundary elements of the resulting and original mod-

els. For this purpose, the suppression algorithm is sup-

plemented with a data structure that represents the

modification history of topological elements as a

graph. With the above-described incremental proce-

dure consisting in multiple calls of the suppression

F

∈

fF

(

)

chain f

G

s

h

(

)

chain f

F

operator, the corresponding data structures must be

concatenated (glued) to obtain a continuous history of

each boundary element.

5. COMPARISON

To suppress blend faces and their chains, the face

removal (FR) operator can be employed. The FR

algorithm removes a target face or a set of faces from

the structure of a model with subsequently merging

the adjacent faces to restore adjacency [8]. In the

OpenCascade library, this approach is implemented in

Fig. 8. Violation of the topological validity of the model

when removing the inner blend.

Fig. 9. Self-intersecting contour of the support face.

Self-intersecting

contour

Fig. 10. Flowchart of the incremental suppression procedure.

Outer contour

F empty

T empty

G get or initialize AAG

F

Ok?

|F|=0

|F|=0

Ok?

Failure

Success

recognize(r, G)

F F \{f}

F F \chain(f)\{f}

F F \chain(f)\{f}

TT ∪ chain(f) ∪ {f}h, s suppress(f)

G build AAG

H H+h

f

f ∈ T

take any face from F

H get or initialize history

Inner contour

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SIMPLIFICATION OF CAD MODELS BY AUTOMATIC RECOGNITION 239

the BRepAlgoAPI package. The blends recognition

and suppression (BRS) algorithm proposed in this

paper is an alternative to the FR algorithm.

Table 1 compares the two algorithms based on

three criteria: runtime in seconds ( and ),

validity of the result ( ∈ {0, 1}), and efficiency

in terms of the number of removed faces ( and

). The experiment was conducted on a computer

with Intel(R) Core(TM) i5-9500 @ 3.00 GHz and 32

GB RAM.

The parameter sets a limit on the maximum

radius of the blend faces to be recognized. The symbol

“i” (“interactive”) marks the time measurements in

the cases where user involvement was required. The

algorithms were run on a pre-selected public dataset

[16]. To run the FR algorithm, we used the prelimi-

nary stage of blend chain recognition described in Sec-

tion 3. The time measurements for the FR algorithm do

not include the recognition stage and do not take user

actions into account. The time measurements for the

BRS algorithm include both recognition and suppression

because, in the BRS algorithm, these stages are insepara-

ble. The symbol “d” (“design intent”) marks the simpli-

fication results that are formally valid but violate the

design intent of a model at the level of its structural ele-

ments. The symbol “?” means that the corresponding

result cannot be obtained (the algorithm did not termi-

nate in an acceptable time of 5–10 min).

A key feature of the automatic simplification algo-

rithm is its robustness. The shaded cells of Table 1

contain the results that demonstrate the insufficient

robustness of the corresponding algorithm.

The BRS algorithm runs 14.6 times faster on aver-

age (see Fig. 11) than the FR algorithm in the cases

where both algorithms perform well, i.e., and

. The higher performance of the incremental

BRS procedure is owing primarily to the fact that the

proposed algorithm is a local operation (see p. 287 in

[17]; see also [18]), while the FR algorithm is based on

the apparatus of global Boolean operations. The local-

ity of the BRS algorithm also guarantees that the

FR

T

BRS

T

,

FR BRS

VV

FR

N

BRS

N

max

r

≠

0

FR

N

≠

0

BRS

N

design intent of a CAD model is preserved, because

the boundary elements outside the neighborhood of a

suppressed chain are not affected.

Having lower overall productivity ( in

the majority of the cases considered), the BRS algo-

rithm is more robust, exhibiting aberrant behavior

only in 1.05% of cases versus 23.15% for the FR algo-

rithm. We should also point to a non-obvious fact that

the FR algorithm does not guarantee model simplifi-

cation, as evidenced by the result on the test set #73

(see Table 1). Indeed, with the FR algorithm, the

topology of a model is modified twice: when a face is

removed and when its neighbor faces are merged up to

intersection. The second topological modification, in

some cases, can cause the formation of new faces. This

is generally due to a poor selection of faces to be

removed (see Fig. 12).

The results of applying the incremental BRS pro-

cedure are shown in Fig. 13.

6. CONCLUSIONS

This work completes the development of our new

approach to CAD model simplification by means of

recognizing and suppressing blend chains. In the

BRS FR

N<N

Fig. 11. Performance comparison between the BRS algorithm and the FR algorithm.

30

25

20

15

10

5

0468151721333740

Rate

BRS performance compared to FR

Average

42 45 47 50 62 66 69 72 74 80 86 92 95

Fig. 12. Ab normal res ult o f th e FR alg ori thm o n th e tes t se t

#73 (see Table 1) for .

∞

max

r=

240

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SLYADNEV, TURLAPOV

Table 1. Comparison between the FR and BRS (incremental procedure) on the test data [16]; the cells that correspond to

the unsatisfactory results of the algorithms are shaded.

Case rmax TFR VFR NFR TBRS VBRS NBRS

1 ∞ 0.05 1 1 0.01 1 0

2 ∞ 0.025 1 1 0.003 1 0

3 ∞ 0.07 1 2 0.008 1 0

4 ∞ 0.08 1 3 0.012 1 3

5 ∞ 0.13 1 12 0.016 1 4

6 ∞ 4.98 0 9 0.08 1 4

7∞0.0181 10.0051 1

8 ∞ 0.02 1 2 0.004 1 2

9 ∞ 0.02 1 2 0.003 1 0

10 ∞ 0.025 1 4 0.005 1 4

11 ∞ 0.035 1 7 0.006 1 0

12 ∞ 0.0005 1 0 0.003 1 0

13 ∞ 0.033 1 4 0.006 1 0

14 ∞ 0.01 1 4 0.007 1 0

15 ∞ 0.08 1 18 0 .0 2 1 18

16 ∞ 0.067 1 4 0.006 1 1

17 ∞ 0.026 1 4 0.008 1 4

18 ∞ 0.075 1 5 0.02 1 5

19 ∞ 0.025 (i) 1 4 0.004 1 0

20 ∞ 0.02 (i) 1 20 0.017 1 0

21 ∞ 0.085 1 8 0.01 1 8

22 ∞ 0.045 1 2 0.005 1 2

23 ∞ 0.028 1 2 0.003 1 0

24 ∞ 0.96 1 (d) 26 0.005 1 0

25 ∞ 0.0004 1 0 0.004 1 0

26 ∞ 0.085 1 (d) 20 0.01 1 0

27 ∞ 0.15 1 (d) 34 0.04 1 0

28 0.45 16.7 (i) 1 44 0.64 1 0

29 ∞ 1.28 (i) 1 13 0.004 1 0

30 ∞ 0.0004 1 0 0.012 1 6

31 4 11.1 0 111 0 .2 5 1 0

32 ∞ 0.0005 1 0 0.01 1 3

33 ∞ 2.07 1 6 0.2 1 5

34 ∞ 0.51 1 11 0.05 1 2

35 ∞ 0.0004 1 0 0.015 1 3

36 ∞ 44.5 1 0 8.92 1 80

37 ∞ 111.7 1 210 19.5 0 105

38 ∞ 8.14 1 47 0.64 1 27

39 ∞ 4.26 1 16 0.06 1 0

40 ∞ 13.67 1 (d) 39 0.48 1 13

41 ∞ 10.73 1 (d) 39 0.35 1 13

42 ∞ 1.7 1 0 0.1 1 8

43 ∞ ? ? ? 2.58 1 4

44 ∞ 0.08 1 18 0.02 1 18

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SIMPLIFICATION OF CAD MODELS BY AUTOMATIC RECOGNITION 241

45 ∞ 0.15 1 35 0.04 1 35

46 ∞ 0.017 1 1 0.003 1 1

47 ∞ 0.04 1 2 0.006 1 2

48 ∞ 11.8 1 97 0.447 1 75

49 ∞ 2.22 (i) 1 3 0.096 1 0

50 ∞ 8.11 1 42 0.19 1 8

51 ∞ ? ? ? 0.036 1 0

52 41 ? ? ? 0.17 1 1

53 ∞ 3.46 1 (d) 80 0.062 1 0

54 ∞ 0.0005 1 0 0.01 1 3

55 ∞ ? ? ? 2.56 1 0

56 ∞ 66 1 4 0.17 1 0

57 ∞ 1.58 1 (d) 15 0.15 1 6

58 ∞ 0.5 1 11 0.003 1 0

59 ∞ ? ? ? 1.76 1 11

60 ∞ 0.0004 1 0 1.22 1 11

61 ∞ ? ? ? 49. 62 1 90

62 ∞ 0.15 1 5 0.013 1 3

63 ∞ 0.14 1 5 0.009 1 3

64 ∞ 0.09 1 3 0.004 1 0

65 ∞ 1.01 1 0 0.07 1 8

66 ∞ 143.5 1 39 1.69 1 4

67 ∞ 1.48 1 27 0.133 1 6

68 ∞ 0.0004 1 0 0.14 1 12

69 ∞ 0.327 1 4 0.02 1 4

70 ∞ 11.25 1 32 3.98 1 24

71 ∞ 1.08 (i) 1 6 0.017 1 0

72 ∞ 0.591 1 (d) 12 0.041 1 4

73 ∞ 21.2 1 (d) 42 + 0.789 1 6

74 ∞ 0.82 1 4 0.07 1 4

75 ∞ ? ? ? 9.48 1 23

76 ∞ 0.15 1 4 0.018 1 4

77 ∞ 0.39 1 2 0.44 1 0

78 ∞ ? ? ? 0.21 1 0

79 5 3.1 1 (d) 32 0.022 1 0

80 ∞ 0.29 1 46 0.068 1 46

81 ∞ 28.52 1 51 0.14 1 0

82 5 ? ? ? 3.39 1 21

83 ∞ 8.29 1 47 0.64 1 27

84 6.5 2.08 1 30 0.071 1 0

85 ∞ 0.38 1 9 0.011 1 0

86 ∞ 0.16 1 3 0.015 1 3

87 6.5 2.14 1 34 0.004 1 0

88 ∞ 4.55 1 (d) 87 0.94 1 0

89 ∞ 9.77 1 47 0.56 1 6

90 ∞ 79.26 1 0 0.66 1 0

Case rmax TFR VFR NFR TBRS VBRS NBRS

Table 1. (Contd.)

242

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SLYADNEV, TURLAPOV

framework of this research, for the first time, the Euler

operators KEV, KEF, and KFMV have been imple-

mented on top of the open-source geometric kernel

(OpenCascade) and the architecture for feature recog-

nition on the attributed adjacency graph (AAG) has

been proposed. The recognition procedure yields the

graph that is isomorphic to the graph and

includes some additional attributes used at the stage of

blend element suppression. The suppression algorithm

involves the incremental procedure that allows recog-

nized blend chains to be removed in the batch mode.

The algorithm can be extended by adding descriptors

of new topological cases. Due to the accumulation of

the modification history for all affected boundary ele-

ments, the semantically important information (col-

ors, names, and tolerances) associated with the origi-

nal model can be transferred to a simplified model

without losses.

*

G

G

Simplification of CAD models with absent design

histories remains an important engineering problem,

as was shown in [19, 20] and some other works. In the

framework of this research, an experimental software

environment [13] was proposed, available on a non-

profit basis with open-source code. It includes the

implementations of the AAG, Euler operators, BRS

algorithm, and incremental suppression procedure. As

input and output data, it uses STEP files (ISO 10303).

Once constructed, the AAG can be transferred to

third-party systems, e.g., MATLAB, for subsequent

analysis. In [20], the JSON format was used to transfer

AAG data.

The proposed approach to blend chain recognition

and suppression was implemented in C++ by using

the OpenCascade geometric kernel and Analysis Situs

platform [13], which was employed for prototyping.

The latest version of the algorithm and a test dataset

are available in open access [9]. The algorithm was

also integrated into CAD Processor [15].

Based on the results of the experiment, we can outline

some directions for further development of the proposed

algorithm. First, the “catalog” of supported blend types

is currently incomplete and can be extended. Second, it

seems reasonable to optimize the performance of the

incremental procedure, which carries out the global

reconstruction of the AAG, even though each iteration

modifies the topology locally. The reconstruction of

the AAG can be replaced by its modification, whereby

the faces of a deleted chain are removed and existing

attributes are copied at each iteration.

The comparison with the FR algorithm has showed

that, in some cases, the BRS algorithm does not cope

well with the blend chains correctly processed by the

FR algorithm. For these cases, the BRS algorithm

should be further improved. In addition, the list of

types of topological configurations supported by the

BRS algorithm should be extended and tested.

An obvious direction for further improvement of

the proposed approach is its adaptation to chamfer

suppression as this requires only the adaptation of the

recognition algorithm, while the set of Euler operators

remains the same due to the topological equivalence of

blend chains and chamfers.

91 ∞ 1.25 (i) 1 0 0.053 1 0

92 ∞ 13.32 1 232 2.55 1 161

93 ∞ 0.194 1 3 0.015 1 3

94 ∞ 0.0004 1 0 0.01 1 3

95 ∞ 87.67 1 38 4.95 1 61

Case rmax TFR VFR NFR TBRS VBRS NBRS

Table 1. (Contd.)

Fig. 13. Some results of the BRS algorithm (top-down):

test sets #92, #80, and #48.

PROGRAMMING AND COMPUTER SOFTWARE Vol. 46 No. 3 2020

SIMPLIFICATION OF CAD MODELS BY AUTOMATIC RECOGNITION 243

REFERENCES

1. Slyadnev, S.E., Malyshev, A.S., and Turlapov, V.E.,

Automated simplification of mechanical-engineering

CAD models and assemblies without design history, Tr.

Mezhdunar. Konf. Grafikon (Proc. Int. Conf. Grafikon),

2018, pp. 488–494.

2. Belaziz, M., Bouras, A., and Brun, J.M., Morphologi-

cal analysis for product design, Comput. Aided Des.,

2000, vol. 32, nos. 5–6, pp. 377–388.

3. Lai, J.Y., You, Z.W., Chiu, Y.K., et al., On the develop-

ment of blend faces and holes recognition algorithm for

CAE applications, Key Eng. Mater., 2015, nos. 656–

657, pp. 789–794.

4. Lai, J.-Y., Wong, C., Huynh, T.T., et al., Small blend

suppression from B-rep models in computer-aided en-

gineering analysis, J. Chin. Inst. Eng., 2016, vol. 39,

no. 6, pp. 735–745.

5. Cui, X., Gao, S., and Zhou, G., An efficient algorithm

for recognizing and suppressing blend features, Comput.

Aided Des. Appl., 2004, vol. 1, nos. 1–4, pp. 421–428.

6. Venkataraman, S., Sohoni, M., and Rajadhyaksha, R.,

Removal of blends from boundary representation mod-

els, Proc. 7th ACM Symp. Solid Modeling and Applica-

tions (SMA), ACM, 2002, p. 83.

7. Venkataraman, S., Sohoni, M., and Elber, G., Blend

recognition algorithm and applications, Proc. 6th ACM

Symp. Solid Modeling and Applications (SMA), ACM,

2001, pp. 99–108.

8. Venkataraman, S. and Sohoni, M., Reconstruction of

feature volumes and feature suppression, Proc. 7th ACM

Symp. Solid Modeling and Applications (SMA), 2002,

pp. 60–71.

9. Analysis Situs, Suppress blend. http://analysissi-

tus.org/features/features_suppress-blends.html.

10. Zhu, H. and Menq, C., B-rep model simplification by

automatic fillet/round suppressing for efficient auto-

matic feature recognition, Comput. Aided Des., 2002,

no. 34, pp. 109–123.

11. Mantyla, M. and Sulonen, R., GWB: A solid modeler

with Euler operators, IEEE Comput. Graphics Appl.,

1982, vol. 2, no. 7, pp. 17–31.

12. Kripac, J., A mechanism for persistently naming topo-

logical entities in history-based parametric solid mod-

els, Comput. Aided Des., 1997, vol. 29, pp. 113–122.

13. Slyadnev, S., Malyshev, A., and Turlapov, V., CAD

model inspection utility and prototyping framework

based on OpenCascade, Proc. GraphiCon, 2017,

pp. 323–327.

14. Malyshev, A., Slyadnev, S., and Turlapov, V., Graph-

based feature recognition and suppression on the solid

models, Proc. GraphiCon, 2017, pp. 319–322.

15. OPEN CASCADE, CAD Processor software.

http://www.opencascade.com/content/cad-processor.

16. Analysis Situs, Test data for BRS algorithm.

http://analysissitus.org/features/suppress-blends/fea-

tures_suppress-blends_data.html.

17. Corney, J.R. and Lim, T., 3D Modeling with ACIS,

Saxe-Coburg Publications, 2001, 2nd ed.

18. Stroud, I. and Nagy, H., Solid Modelling and CAD Sys-

tems: How to Survive a CAD System, Springer, 2011.

19. Song, P.-P., Lai, J.-Y., Tsai, Y.-C., and Hsu, C.-H.,

Automatic recognition and suppression of holes on

mold bases for finite element applications, Eng. Com-

put., 2019, vol. 35, no. 3, pp. 925–944.

20. Zhu, F., Application of analytical and AI-based feature

detecting methods for an energy optimized industrial

process, Bachelor’s thesis, 2019.

Translated by Yu. Kornienko