Content uploaded by Sergey Slyadnev

Author content

All content in this area was uploaded by Sergey Slyadnev on Jul 28, 2019

Content may be subject to copyright.

202

ISSN 0361-7688, Programming and Computer Software, 2019, Vol. 45, No. 4, pp. 202–212. © Pleiades Publishing, Ltd., 2019.

Russian Text © The Author(s), 2019, published in Programmirovanie, 2019, Vol. 45, No. 4.

To the Development of Open Source Software

for the Reconstruction of CAD Models

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

aLobachevsky State University of Nizhni Novgorod (UNN),

pr. Gagarina 23, Nizhni Novgorod, 603950 Russia

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

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

Receive d February 16 , 2019; revised March 19 , 2019; accepted March 19, 2019

Abstract—In this paper, we describe an open source software package aimed at solving reverse engineering

problems for CAD models defined in polygonal form. We briefly discuss the main principles behind the new

software, its architecture, and directions for its further development. The use of the software is illustrated by

examples of a turbine blade. In the first example, the turbine blade is reconstructed automatically from a

structured point cloud. Another example is the interactive reconstruction of the turbine blade from an

unstructured surface triangulation. In both the cases, we use a surface skinning strategy enhanced by a curve

fairing operator. We show that the modif ied skinning operator does not minimize the total bending energy of

the surface, but yields a smooth patch where input inaccuracies are compensated for. The reconstruction

result is a parametric model of the turbine blade where the design variables are the coordinates of the poles

for each profile curve. The proposed software architecture can be used for partial or complete parameteriza-

tion of reconstructed CAD models with the aim of their subsequent optimization.

DOI: 10.1134/S03617688190 4008X

1. INTRODUCTION

Reconstructing the exact digital model of an object

from an incomplete description of its geometric shape is

an important engineering problem [1]. These data are

generally obtained by digitizing the man-made object,

e.g., with 3D scanning. The result is then recon-

structed for further use in some engineering software.

This problem is solved by reverse engineering (reengi-

neering). The key stage of industrial reengineering is

modeling the geometric shape of the object as its

boundary representation (B-rep) [2], which is pres-

ently a de facto standard for computer-aided design

(CAD) systems. As noted in [1], the CAD model (in

B-rep) is a kind of “language” in which various design

and production automation tools communicate.

In engineering practice, reconstruction problems

have different origins. For instance, if a part was

designed without CAD, then its digital representation is

a priori unavailable. Sometimes the geometric model is

not available due to other reasons, e.g., the obsoles-

cence or loss of the original CAD system. In these cases,

reengineering is used to obtain a previously non-exis-

tent or lost digital model. The reconstructed geometry

can be used for subsequent CAD model editing, auto-

mated manufacturing on a CNC machine, solving

computational problems (strength analysis, thermal

analysis, aerodynamic analysis, etc.), and parametric

shape optimization. If parametric optimization is car-

ried out on a polygonal model, then the reengineering

problem can arise in the reverse transition from a

deformed mesh [3] to CAD representation.

Reverse engineering approaches are also employed

as the main tools for modeling objects that not yet exist

[4]. In the automotive industry, the physical model

made by a sculptor to demonstrate the outer contours

of a vehicle body is often digitized. Sometimes, geo-

metric modeling is initially carried out in polygonal

form; then, reengineering is employed to obtain an

exact B-rep [5]. In the latter case, reconstruction tech-

niques play basically the same role as traditional bot-

tom-up modeling techniques do, with the difference

that, instead of modeling from scratch, an auxiliary

polygonal “basis” is used. When solving reconstruc-

tion problems, in one way or another, the engineer

deals with some reference geometric representation in

the form of an unordered or structured point cloud or

a surface triangulation. The reference geometry guides

the modeling process and is used to match the target

shape of the object with its reconstructed shape.

Depending on the goal of reverse engineering, var-

ious criteria of success for the reconstruction process

can be considered. For instance, when creating a digi-

tal copy of a physical model, it is required to ensure the

minimum geometric discrepancy between the CAD

model and its polygonal representation. The automo-

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

TO THE DEVELOPMENT OF OPEN SOURCE SOFTWARE 203

tive industry also imposes strict requirements for the

aesthetic qualities of the product, which is why the

modeling process must use the so-called “class A” sur-

faces. On the other hand, when reconstructing the

digital model of a damaged part, or a part with signif-

icant wear, the high accuracy of reconstruction is not

required; moreover, it is undesirable in those regions

where the actual shape of the part significantly devi-

ates from the reference one. Minimizing only the geo-

metric discrepancy deprives the resulting model of

such key properties as axial symmetry, parallelism or

orthogonality of faces, etc. Thus, reverse engineering

is a multi-criteria process, in which the set and strict-

ness of quality criteria depend on a particular indus-

trial application.

To solve reverse engineering problems, specialized

software or plug-ins for traditional CAD systems are

employed. Difficulties encountered in the process of

reconstruction call for comprehensive scientific

research aimed at developing accurate, reliable, and

efficient reengineering algorithms. At the same time,

engineering practice suggests that, for the full-fledged

solution of even a narrow class of reconstruction prob-

lems, one algorithm is not enough. There is a need for

the consistent application of many geometric opera-

tors, as well as the implementation of the correspond-

ing object model for problem domain representation

and organization of computations. Unfortunately, the

available literature on the problem pays little attention

to the architecture of software packages meant for

reverse engineering. In our opinion, this is due to the

fact that almost all automated reengineering software

products are commercial ones, and their developers

are not interested in disclosing the details of their

implementation.

The main contribution of this work is the develop-

ment of an open software architecture aimed at solving

reverse engineering problems for CAD models defined

in polygonal (mesh) form. This paper provides general

information about the operation principles of the

developed software and outlines the directions for its

further development. Following the authors of [6], we

believe that the publication of open source systems

contributes to the independent reproduction of scien-

tific results. In addition, as mentioned in [7], the

implemented prototyping tools allow one to use the

proposed system to exchange ideas and transfer tech-

nologies from academic researchers to the industry.

The paper is organized as follows. Section 2

describes some existing methods for CAD model

reconstruction and outlines some criteria for their

classification. Section 3 introduces working hypothe-

ses for the proposed system and considers the main

steps of the interactive reconstruction procedure. Sec-

tion 4 describes principles underlying the developed

software. The application of the reconstruction system

to the parametric model of a turbine blade is illus-

trated in Section 5. In the Conclusions section, we

outline some directions for the further development of

the open source software.

2. STATE OF THE PROBLEM

In [8], it was noted that reverse engineering inves-

tigations often sidestep the question about software

packages that implement particular reconstruction

approaches. Meanwhile, it is the availability and

demand for the corresponding software (including

commercial one) that makes it possible to estimate

practical applicability of the published approaches and

algorithms, as well as their accuracy, reliability, and

efficiency. The review [8] compared some software

products in terms of the completeness of their reverse

engineering operators. However, all considered sys-

tems are commercial ones, which significantly com-

plicates their use by the scientific community. Thus,

the following problems arise. First, in most cases,

commercial systems do not disclose their bibliographic

databases that store the information about particular

reconstruction approaches implemented. Second, the

original investigations carried out by commercial com-

panies are rarely available through public means of sci-

entific communication because the preference is given

to issuing internal technical reports. In solidarity with

the author of [9], we believe that a truly scientific

approach to reverse engineering problems should be

based on the principles of open science, which implies

publication of the corresponding scientific papers, as

well as the source codes and input data for the reengi-

neering algorithms.

In [10], some CAD model reconstruction approaches

implemented in popular commercial software were

described. In particular, it was noted that interactive

methods that use manual segmentation of meshes are

still in demand in the industry, despite their complexity.

In addition, according to [10], interactive reconstruc-

tion with manual segmentation allows the user to

achieve the best quality of the resulting surfaces.

Of special interest are the approaches that allow one

to reconstruct a parametric family S(a) (where a ∈ RN is

the vector of design variables and N is the dimension

of the parameter space) rather than a single instance of

a geometric model. The parametric model is not only

a shape descriptor but also a model generator that

implements the so-called design intent for different

values of the vector a. Reengineering approaches that,

in addition to geometric artifacts, can reconstruct

engineering concepts (design intents) dominate, e.g.,

in turbine engineering [11, 12]. Reengineering meth-

ods for parametric models of mechanical parts are

developed. For instance, in [13], an efficient method

was proposed for synthesizing a CSG tree in the form

of a program that performs Boolean operations on a

predefined set of primitives recognized from polygo-

nal meshes. In [14], we proposed a method for volume

decomposition of boundary models. In [15], a set of

approaches to parametric model reconstruction based

204

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

SLYADNEV, TURLAPOV

on the SolidWorks commercial system was described.

When considering systems for parametric model

reengineering from a software implementation per-

spective, of interest are not only geometric operators

but also linked data models.

Most of the reengineering methods published are

confined to the reconstruction of dumb models,

which do not have structural elements (features) and,

therefore, do not enable full-fledged editing. In par-

ticular, for models without history of their construc-

tion, the solution of parametric optimization problems

is complicated. In [16], two methods of parameteriza-

tion—partial and complete—for functional models

(which allow for aerodynamic flow) were distin-

guished. Infeasibility of model decomposition into

structural elements leaves room only for partial

parameterization.

Different software packages may use different geo-

metric representations. It is desirable that the recon-

structed model can be transferred to popular CAD

systems for further processing, e.g., subsequent editing

or manufacturing planning. Presently, the STEP for-

mat (ISO 10303), which specifies B-rep as a basic

model representation [2], is a lingua franca for CAD

systems. Non-uniform rational B-spline (NURBS) is

a universal form that enables modeling of both canon-

ical geometry and sculptured surfaces. However, the

reconstruction process can use other representations,

e.g., subdivision surfaces [17, 18] and T-splines [19],

provided that they are converted into the standard

form at the end of modeling. For example, popular

NURBS-compatible modeling tools that use subdivi-

sion surfaces are the Clayoo and Xirus plug-ins for the

Rhinoceros CAD system and the Power Surfacing

plug-in for SolidWorks.

Another aspect of reengineering systems is the

degree of automation. In [20], an automated approach

to the reconstruction of the B-rep composed of G1

smooth NURBS patches was proposed. However, the

automatically reconstructed topology of a model does

not reflect its design intent because it does not rely on

the engineering knowledge about its feature lines (if

they can be extracted). In [21], the popular commer-

cial system Tebis was described, in which the model

topology is defined by the user interactively (using the

rapid surface creation (RSC) technology). A similar

method is implemented in the PolyWorks system and,

e.g., in the Mesh2Surface plug-in for Rhinoceros. The

authors of [22] developed an interactive platform for

inverse modeling that enables reconstruction of free-

form objects, including kinematic surfaces. Interactive

systems are not intended to replace the human in the

process of reconstruction; rather, they are designed to

automate routine operations, which is in line with the

concept of intelligence amplification (IA) introduced

by Brooks in [23].

Open source software is widely employed to solve

various scientific and engineering problems. For exam-

ple, popular systems for 3D geometry processing are

OpenFlipper [24] and MeshLab [25]. Unfortunately,

these systems (which are used mostly to work with

polygonal models) do not enable full-fledged integra-

tion with geometric kernels that implement curvilinear

Fig. 1. Main steps of free-form reconstruction in the pro-

posed system.

Import STL

Prepare mesh

Evaluate mesh curvatures

Retopologize model

Fit surfaces

Evaluate deviations

Export NURBS

Outline curve network

Fig. 2. Curve network that forms the topology of the polyg-

onal model (vertices and edges are labeled).

e5

e6

e7

e4

e3

e2

e1

V1V2

V3

V4V5

V6

Fig. 3. Directed half-edges of the wireframe model.

ce1ce2

ce3

ce4

ce8

ce7ce6

ce5

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

TO THE DEVELOPMENT OF OPEN SOURCE SOFTWARE 205

B-rep. Our system is integrated with the OpenCascade

open source kernel, which provides multi-purpose

operators for surface and solid modeling, as well as

services for geometric data exchange (in the STEP and

IGES formats). General-purpose CAD operators

(skinning, extrusion, revolve operation, blending, etc.)

are key components of reconstruction systems as many

stages of reverse engineering are based on direct model-

ing [15]. In [26], a reengineering procedure that uses the

history of modeling operations and OpenCascade oper-

ators (to design features) was described. The growing

importance of open source software in solving design

problems was also noted in [27].

3. RECONSTRUCTION PROCEDURE

This section describes the interactive reconstruc-

tion procedure, which is the main procedure in the

proposed system. It should be noted, however, that

our software system can also be used for fully auto-

mated reconstruction of parametric models, which is

demonstrated in Section 5.

3.1. Main Stages

The reconstruction process begins with importing

the initial data in the form of a spatial triangulation

mesh. STL is a popular format for storing and transfer-

ring mesh data in CAD; it represents polygonal geom-

etry in the simplest form, without topology. Mesh data

often require additional processing, e.g., filling holes,

eliminating self-intersections, decimation, smooth-

ing, etc. Even though this processing is not directly

related to reconstruction, the corresponding geomet-

ric operators are generally implemented in reengineer-

ing systems, because the lack of these operators com-

plicates the reconstruction process. For manipulating

and displaying polygonal models, our system uses the

VTK library [28].

Model segmentation must take into account the

arrangement of feature lines. For this purpose, the

reengineering system evaluates the curvature of the

input mesh [29]. The curvature data are used to sup-

port the interactive specification of the topology by the

user. Once the model topology is defined, the system

constructs geometric primitives selected by the user.

In this case, various operators are employed, e.g.,

Coons and Gordon surface generation, ordered point

cloud interpolation, skinning, etc. At the final step,

the user evaluates the quality of reconstruction: if the

result is satisfactory, then the process is terminated;

otherwise, the user can return to the previous steps to

modify the topological model and associated parame-

ters. Figure 1 shows the main steps of free-form object

reconstruction. It should be noted that reengineering

is not a sequential process because, in order to achieve

a satisfactory result, the user needs to return to the pre-

vious steps.

When reconstructing a typical mechanical part, the

reengineering approach generally differs from the one

described above. In addition to the use of other seg-

mentation and reconstruction methods, the reengi-

neering procedure involves the recognition of the

mechanical features [30]. The latter is necessary to

yield an editable model that meets the design intent.

Our system implements feature recognition based on

the classical principle of analyzing attributed face

adjacency graphs [31].

3.2. Topological Model

Polygonal surface segmentation is one of the key

reengineering stages. As a working hypothesis, we

assume that the user performs interactive segmenta-

tion to define certain topology on the mesh model (see

Fig. 2). This approach was described in [32] as applied

to segmentation of free-form models.

There are some successful implementations of

interactive reconstruction based on curve networks in

commercial software [21]. The user partitions the

Fig. 4. Topology of the wireframe model defined by the

hierarchical oriented graph; the nodes p1 and p2 corre-

spond to two reconstructed patches shown in Fig. 2.

p1

ce1ce2ce3ce4ce8ce7ce6ce5

e5

e6

e7

e4

e3

e2

e1

V1V2V3V4V5V6

p2

Fig. 5. System Input and Output.

Reconstruction

scenario

Triangulation

Node Part Node

Fig. 6. Data node and the Presentation class that contains

a set of pipelines.

Data Node Presentation

Pipeline 1

Pipeline 2

Pipeline N

206

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

SLYADNEV, TURLAPOV

model into patches based on certain practical consid-

erations and, possibly, a discrete curvature distribu-

tion map. In the simplest case, the system may restrict

the user to quadrangular curvilinear cells as they admit

covering with NURBS patches in their natural bound-

aries [33]. The latter allows one to do without trimmed

surfaces, which simplifies the data structures and

algorithms (e.g., smooth transition) used.

The curve network not only provides polygonal

data segmentation but also serves as a carrier for the

attributes that control the reconstruction process. In

particular, the edges of the model can store informa-

tion about the desired order of joint smoothness,

markers of contour lines, etc. In addition, the presence

of a curve network determines the method of model

editing, which consists in modifying support edges

and reconstructing the affected surfaces.

Each edge of the wireframe model has a natural

(geometric) orientation given by the parameterization

of the corresponding curve. To ensure the consistent

order of contour traversal, the patch of the wireframe

model includes occurrences of the edges with the ori-

entation sign, rather than the edges themselves (see

Fig. 3). Thus, the wireframe model is a directed hier-

archical graph (Fig. 4).

The structure of the wireframe model defines a

representation scheme that is equivalent to B-rep in

terms of the differentiation between “geometry” and

“topology” (see [34]). For full-fledged modeling with

the use of the curve network, the system must provide

the basic set of topology editing operators, including

edge and face splitting functions, boundary merging,

contour completion, etc. The work [35] devoted to an

interactive reengineering system reports some relevant

data on a sufficient set of topological operators for

editing subdivision surfaces. The same approaches are

also applicable in a NURBS-based representation

scheme.

3.3. Reconstruction Operators

In its current version, our system implements the

following geometric operators, not counting the algo-

rithms already available in the OpenCascade and VTK

libraries:

1. curve and surface interpolation (algorithms A9.1

and A9.4 from [36]);

2. surface skinning (as described in Chapter 10.3 of

the monograph [36]);

3. curve and surface fairing (based on the ideas dis-

cussed in [37]);

4. Coons patch construction in the form of

NURBS surfaces [33];

5. local editing of NURBS curves [38];

6. line segment projection onto triangulation for

curve network modeling;

7. envelope generation for point clouds on a plane [39].

3.4. Constructing the Boundary Model

Upon modeling the patches that fill the curvilinear

cells of the curve network, the geometrical and topo-

logical information in the structure of the target object

Fig. 7. Representation of the model edge by two curves (in

the modeling space and in the domain of the carrying sur-

face).

r(p) : R1 → R3

g(t) : R1 → R2

s(u, v) : R2 → R3

u

v

Fig. 8. Interaction between two geometric kernels.

OpenCascade

In-house NURBS library

JSON Direct conversion

Fig. 9. Code fragment for the first-degree B-surface in the

JSON format.

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

TO THE DEVELOPMENT OF OPEN SOURCE SOFTWARE 207

is completely defined. The synthesis of the final

boundary model is reduced to transforming the data

structures into the representation scheme of the

OpenCascade geometric kernel for subsequent trans-

lation into neutral formats (STEP or IGES).

4. ARCHITECTURE OF THE SYSTEM

Below, we describe the basic implementation princi-

ples behind the open source reconstruction platform.

4.1. Object Model

The central object of the system is the Part to be

reconstructed. The Part contains the resulting CAD

model in the OpenCascade B-rep. The system’s input

is a surface mesh that is uploaded to the Triangulation

node from the corresponding STL file (see Fig. 5).

The nodes of the data model and the relationships

among them are organized using the OCAF module of

OpenCascade [40]. This module implements a multi-

purpose hierarchical data storage that provides some

basic services, e.g., transaction support, undo/redo,

and CRUD (create, read, update, and delete) opera-

tions. Data access is based on the data access object

(DAO) design pattern.

Each data node is associated with an instance of the

Presentation class that contains one or several VTK

pipelines (Fig. 6).

In our system, the pipeline is an adaptation of the

VTK pipeline with the following reservations: (1) the

data source for our pipeline is the OCAF node that

stores the time of the last modification to enable effi-

cient redrawing and (2) it is assumed that one pipeline

is associated with one object of the scene.

4.2. Visualization

To work with CAD data, we implemented a visual-

ization subsystem, which translates the curvilinear

representation of the CAD model into a polygonal

shape, and the corresponding interactive services

based on the VTK library. In popular geometric ker-

nels (e.g., OpenCascade or Parasolid), the boundary

model includes errors caused by limited machine rep-

resentation of real numbers, approximation errors,

and geometric inaccuracies. In practice, these errors

are stored in the structure of the CAD model as geo-

metric tolerances locally associated with its boundary

elements [41]. Even though modern CAD systems

generally hide visible defects of the model, the very

presence of errors can cause incorrect operation of

modeling algorithms or problems with data transfer

from one engineering system to another. The visual-

ization subsystem of our platform is implemented in

such a way as to display the geometric and topological

defects to the user. For B-rep and mesh models,

defects, such as open and non-manifold edges, open

faces, dangling vertices, etc., are automatically recog-

nized and marked with color. The accentuation of

anomalies allows them to be eliminated as soon as at

the stage of modeling, which exempts one from the use

of healing operators [42] on the model.

High geometric tolerances are usually due to the

defects at the joints of model faces. These defects are

often caused by mismatched edges on adjacent con-

tours; moreover, mismatch can occur between the

parametric curve r in the modeling space and its own

pre-image g in the definition domain of the carrying

surface s(u, ) (see Fig. 7). Thus, the requirement of

synchronous parameterization arises, which is formal-

ized as follows:

(1)

where ε is the geometric tolerance, the parameter t

takes values on the interval [t0, t1] and ||⋅|| is the Euclid-

v

−<ε

|| ( ( )) ( )|| ,sgt rt

Fig. 10. Solid model of the turbine blade.

Fig. 11. Blade sections constructed by intersecting the tri-

angulation with the interactively positioned plane.

208

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

SLYADNEV, TURLAPOV

ean distance. Geometric modeling with guaranteed

observance of rule (1) becomes easier if the data struc-

ture of the model is organized on the 3D curve net-

work that defines the model topology (see Section

3.2). In this case, surface modeling does not use para-

metric curves g(t) up to the point at which the model

is converted into the data structures of the OpenCas-

cade kernel.

In addition, the system provides graph visualiza-

tion tools and tools for analyzing the differential prop-

erties of curves and surfaces. These tools were

described in detail in our previous work [43].

4.3. Geometric Kernel

As a basic geometric kernel, we employ the Open-

Cascade library [44]. The data structures of this library

are used to represent CAD models in the form suitable

for visualization, basic modeling, and exchange

through open translators (STEP and IGES). New

modeling operators are developed with the open

source NURBS library implemented in accordance

with the well-known monograph [36].

Data transfer between the two libraries is carried

out in the JavaScript object notation (JSON) format

or by using a specialized software module for curve

and surface editing (Fig. 8). The in-house library is

adapted to solving reverse engineering problems, while

OpenCascade acts as a general-purpose geometric

kernel. Similar architectural solutions were described,

e.g., in [45].

The JSON format (Fig. 9) is neutral for both the

libraries. It is used to implement module testing pro-

cedures.

4.4. Command Console

In its current version, the system provides a com-

mand console as a main user interaction tool. It sup-

ports more than one hundred commands for various

Fig. 12. Blade surface constructed by skinning after the

unification of the profile curves. The isolines correspond

to the knot values of B-splines. One can see typical con-

centration. The surface has more than 43 thousand poles.

Fig. 13. The surface constructed by skinning on a priori

compatible curves (with 3100 poles). The twisting effect is

due to the asynchronous parameterization of the profile

curves.

Fig. 14. Skinning with and without fairing (right and left

images, respectively) at λ = 1.

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

TO THE DEVELOPMENT OF OPEN SOURCE SOFTWARE 209

operations on the model. The corresponding graphical

interface will be implemented in future versions.

5. APPLICATIONS

5.1. Automatic Blade Reconstruction

One of the problems solved using the proposed sys-

tem is the reconstruction of the parametric model of a

turbine wheel from discrete streamlines [12]. Figure 10

shows the geometric model of a turbine blade, which,

at the next step, is replicated in the axial direction of

the rotor and is combined with the turbine hub model

by using the solid Boolean operator.

The turbine blade is an example of a functional sur-

face modeled using NURBS patches. At the same

time, to solve shape optimization problems, the geo-

metric model of the blade should include a parametric

structure, which is usually composed of its radial sec-

tions. Each section is parameterized in such a way as to

obtain a certain set of design variables that form the

search space for finding the optimal geometry. In [12],

design parameters were coordinates of section poles;

however, the same organization of computations is

suitable for other parameterization methods.

The key difference of the reengineering procedure

from direct bottom-up modeling is the need for the

elimination of noise in the input data. For this pur-

pose, a fairing technique [37] was implemented and

applied to the set of intermediate interpolation curves

used to obtain the final poles of the skinning surface.

5.2. Interactive Blade Reconstruction

The reengineering process described above is com-

pletely automatic due to the fact that the original point

cloud is structured and ordered. For instance, the

blade sections are initially represented in the cloud

structure by individual slices that belong to some sur-

faces of revolution whose generatrices are also recon-

structed automatically. If the reference geometry of

the blade is represented by triangulation, then auto-

matic reconstruction becomes complicated. Below,

we describe the interactive procedure for reconstruct-

ing the aerofoil geometry in such cases.

The procedure begins with the selection of sec-

tional planes to extract the points that form the profile

curves of the blade. The triangulation–plane intersec-

tion is carried out using the VTK library; then, the

resulting set of points is sorted in the sequence order by

the envelop construction algorithm [39] implemented

in our system (see Fig. 11).

The ordered points are fitted by the least squares

method to obtain B-curves with desired accuracy. For

further skinning, the section curves must be compati-

ble [46]; however, the previous reconstruction steps do

Fig. 15. Approximate bending energy versus fairing coeffi-

cient λ.

Bending energy

2e+5

1e+6

2e+6

5e+5

1e-8 1e-6 1e-4 0.01

Fairing coecient

Unexpected (?) minimum

1

Fig. 16. Maximum geometric deviation versus fairing coef-

ficient λ.

10

Deviation

5

2

1

1e-81e-7 1e-61e-5 1e-41e-3 0.01 0.1

Fairing coecient

No eect

1

Table 1. Maximum and minimum mean curvatures in the

neighborhood of a local minimum of the bending energy

(Fig. 15)

λMean curvature

(min)

Mean curvature

(max)

1e-4 –0.492 1.25

1e-3 –0.492 1.21

0.01 –0.493 1.21

0.1 –0.539 1.22

1–0.5571.22

210

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

SLYADNEV, TURLAPOV

not guarantee that. In addition, bringing the sections

to a compatible form by unification of knots is unrea-

sonable in practice because the resulting surface

becomes too complex (Fig. 12).

As noted in [47], reducing the amount of data that

represent the blade geometry allows one not only to

speed up the reconstruction procedure but also to

obtain a smoother surface and improve memory con-

sumption. It should also be noted that the unreason-

ably high number and concentration of spline poles

complicates the parametric optimization process.

Moreover, the excessive complexity of the geometric

representation adversely affects the reliability of the

subsequently used modeling operators (e.g., surface

intersection). An easy way to reduce the complexity of

the resulting surface is to avoid the unification of the

profile curves by initially specifying them on a single

knot vector. For this purpose, the original curves are

sampled with a specified number of points and then

interpolated using centripetal parameterization [48].

The resulting surface has a much lower complexity;

however, shape defects remain (see Fig. 13).

To eliminate the blade twisting effect, each section

is presegmented. We use interactive segmentation;

however, this process can be automated [49].

The initial data for reconstruction usually have cer-

tain inaccuracy due to the imperfection of the sam-

pling method. In addition, user-defined feature lines

for blade segmentation may prove unintentionally tor-

tuous due to input errors or sparse point clouds. To

eliminate shape distortions, a skinning strategy

enhanced by a fairing operator is employed [12]. The

idea of the strategy is to change the spatial location of

the poles for the intermediate skinning curves to min-

imize the bending energy [50]. Adjusting the fairing

coefficient λ > 0 allows us to obtain a smoother surface

at the expense of increased geometric deviations (see

Fig. 14).

Thus, the interactive reconstruction procedure

consists of the following steps:

1. triangulation–plane intersection and sorting of

points by constructing their envelope based on K near-

est neighbors [39];

2. segmentation of each section to separate the

sides of the blade;

3. fitting of section points with a specified toler-

ance;

4. additional interpolation of the regular cloud

constructed by sampling profile curves [51] to define

them on a single knot vector;

5. merging the curves to form closed contours;

6. fairing-enhanced skinning [12].

To estimate the effect of the fairing coefficient on

the shape of the blade, we use an approximate value of

the bending energy E computed by the formula

(2)

Here, the operator (⋅)2 is a scalar square, and inte-

gration is performed over the entire domain of the sur-

face s(u, ).

Figure 15 shows the experimental dependence of

the bending energy on the fairing coefficient.

It can be seen that this dependence is not a mono-

tonically decreasing function. Indeed, the energy

functional (2) is not an objective to the procedure of

fairing the skinning directrices. According to [12],

fairing the curve c(u) guarantees the minimization of

functional (3) only; this functional aggregates the geo-

metric deviation c – c0 with the bending energy:

(3)

Let us make sure that the procedure of fairing-

enhanced skinning can increase the surface curvature

of the blade. Table 1 shows the increase in the absolute

value of the minimum mean curvature with the

increase in the fairing coefficient λ.

It should be noted that, in order to obtain a

smoother shape, it is reasonable to apply the fairing

operator also to the profile curves (in addition to the

skinning directrices).

Finally, let us analyze the growth in the geometric

deviation with the increase in the fairing coefficient.

Figure 16 shows the dependence of the maximum geo-

metric deviation (in the model’s units of measure-

ment). As expected, upon reaching a certain value of

λ, the distance between the initial triangulation and

the smoothed surface ceases to change (the skinning

directrices acquire the minimum possible bending

energy).

The measurements were carried out at the points

on the resulting surface s(u, ) with a step of 0.01 in the

parametric direction u and with a step of 0.005 in the

parametric direction (see Fig. 17).

∂∂∂

=++ ν

∂∂ν

∂∂ν

222

222

22

2

sss

Edud

u

u

v

=λ +−

22

0

{[''] [ ]}

c

Ecccdu

v

v

Fig. 17. Deviation map for the smoothed blade with

respect to the initial triangulation at λ = 0.001.

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

TO THE DEVELOPMENT OF OPEN SOURCE SOFTWARE 211

6. CONCLUSIONS

We believe that the further development of the pro-

posed system will result in the creation of a full-

fledged open source CAD platform for reverse engi-

neering. As of now, this system was used to implement

a number of algorithms integrated into commercial

software.

For real-time evaluation of geometric accuracy,

approaches that employ GPU-accelerated computing

are of interest [52]. Another gap in the current system

is the small set of surface fitting operators. From a

practical perspective, the strategy described in [53]

and the approach [54] that supplements it seem prom-

ising.

The source code of the system and its extended

documentation are available at www.analysissitus.org.

REFERENCES

1. Geng, Z. and Bidanda, B., Review of reverse engineer-

ing systems: Current state of the art, Virtual Phys. Pro-

totyping, 2017, vol. 12, no. 2, pp. 161–172.

2. Requicha, A.G., Representations for rigid solids: The-

ory, methods, and systems, ACM Comput. Surv., 1980,

vol. 12, no. 4, pp. 437–464.

3. Sederberg, T.W. and Parry, S.R., Free-form deforma-

tion of solid geometric models, Proc. 13th Annu. Conf.

Computer Graphics and Interactive Techniques (SIG-

GRAPH), ACM Press, 1986, pp. 151–160.

4. Bradley, C. and Currie, B., Advances in the field of

reverse engineering, Comput.-Aided Des. Appl., 2005,

vol. 2, no. 5, pp. 697–706.

5. Gulanova, J., Gulan, L., Forrai, M., and Hirz, M.,

Generative engineering design methodology used for

the development of surface-based components, Com-

put.-Aided Des. Appl., 2017, vol. 14, no. 5, pp. 642–649.

6. Hafer, L. and Kirkpatrick, A.E., Assessing open source

software as a scholarly contribution, Commun. ACM,

2009, vol. 52, no. 12, pp. 126–129.

7. Brown, C.M., PADL-2: A technical summary, IEEE

Comput. Graphics Appl., 1982, pp. 69–84.

8. Buonamici, F., Carfagni, M., Furferi, R., Governi, L.,

Lapini, A., and Volpe, Y., Reverse engineering model-

ing methods and tools: A survey, Comput.-Aided Des.

Appl., 2018, vol. 15, no. 3, pp. 443–464.

9. Ibanez, L., Schroeder, W., and Hanwell, M.D., Practicing

Open Science/Implementing Reproducible Research,

Chapman and Hall/CRC, 2014.

https://www.osf.io/s9tya.

10. Varady, T., Automatic procedures to create CAD mod-

els from measured data, Comput.-Aided Des. Appl.,

2008, vol. 5, no. 5, pp. 577–588.

11. Mohaghegh, K., Sadeghi, M.H., and Abdullah, A.,

Reverse engineering of turbine blades based on design

intent, Int. J. Adv. Manuf. Technol., 2007, vol. 32,

nos. 9–10, pp. 1009–1020.

12. Slyadnev, S.E., Turlapov, V.E., Reconstructing the

parametric model of a turbine blade from a set of aero-

dynamic sections with the smoothing technique, Proc.

GraphiCon, 2018, pp. 495–499.

13. Du, T., Inala, J.P., Pu, Y., et al., InverseCSG, SIG-

GRAPH Asia technical papers, ACM Press, 2018,

pp. 1–16.

14. Slyadnev, S. and Turlapov, V., Method for decomposi-

tion of engineering solid models into volume elements,

Proc. GraphiCon, 2016, pp. 58–63.

15. Ye, X., Liu, H., Chen, L., Chen, Z., Pan, X., and

Zhang, S., Reverse innovative design: An integrated

product design methodology, Comput.-Aided Des.,

2008, vol. 40, no. 7, pp. 812–827.

16. Harries, S., Abt, C., and Brenner, M., Upfront CAD:

Parametric modeling techniques for shape optimization,

Advances in Evolutionary and Deterministic Methods for

Design, Optimization, and Control in Engineering and Sci-

ences, Minisci, E., Vasile, M., Periaux, J., Gauger, N.R.,

Giannakoglou, K.C., and Quagliarella, D., Eds.,

Springer International Publishing, 2019, pp. 191–211.

17. Catmull, E. and Clark, J., Recursively generated

B-spline surfaces on arbitrary topological meshes,

Comput.-Aided Des., 1978, vol. 10, no. 6, pp. 350–355.

18. Antonelli, M., Beccari, C.V., Casciola, G., Ciarloni, R.,

and Morigi, S., Subdivision surfaces integrated in a

CAD system, Comput.-Aided Des., 2013, vol. 45, no. 11,

pp. 1294–1305.

19. Sederberg, T.W., Zheng, J., Bakenov, A., and Nasri, A.,

T-sp lines a n d T-NUR CCs, Proc. ACM SIGGRAPH,

ACM, 2003.

20. Eck, M. and Hoppe, H., Automatic reconstruction of

B-spline surfaces of arbitrary topological type, Proc.

23rd Annu. Conf. Computer Graphics and Interactive

Techniques (SIGGRAPH), ACM, 1996, pp. 325–334.

21. Albat, F. and Müller, R., Free-form surface construc-

tion in a commercial CAD/CAM system, Mathematics

of Surfaces XI, Lecture Notes in Computer Science, Mar-

tin, R., Bez, H., and Sabin, M., Eds., Springer Berlin

Heidelberg, 2005, vol. 3604, pp. 1–13.

22. Andrews, J., Jin, H., and Séquin, C., Interactive inverse

3D modeling, Comput.-Aided Des. Appl., 2012, vol. 9,

no. 6, pp. 881–900.

23. Brooks, F.P., The computer scientist as toolsmith II,

Commun. ACM, 1996, vol. 39, no. 3, pp. 61–68.

24. Mobius, J. and Kobbelt, L., OpenFlipper: An open

source geometry processing and rendering framework,

Lecture Notes in Computer Science (including subseries

Lecture Notes in Artificial Intelligence and Lecture

Notes in Bioinformatics), 2012, pp. 488–500.

25. Cignoni, P., Callieri, M., Corsini, M., Dellepiane, M.,

Ganovelli, F., and Ranzuglia, G., MeshLab: An open-

source mesh processing tool, Proc. 6th Eurographics

Italian Chapter Conf., 2008, pp. 129–136.

26. Wang, J., Gu, D., Gao, Z., Yu, Z., Tan, C., and Zhou, L.,

Feature-based solid model reconstruction, J. Comput.

Inf. Sci. Eng., 2013, vol. 13 , no. 1, p. 0110 0 4.

27. Hirz, M., Rossbacher, P., and Gulanová, J., Future

trends in CAD: From the perspective of automotive

industr y, CAD Solutions LLC, 2016, pp. 734–741.

28. Schroeder, W., Martin, K., and Lorensen, B., Visual-

ization toolkit: An object-oriented approach to 3D

graphics, Kitware, Colombia, 2006.

29. Meyer, M., Desbrun, M., Schröder, P., and Barr, A.H.,

Discrete differential-geometry operators for triangu-

212

PROGRAMMING AND COMPUTER SOFTWARE Vol. 45 No. 4 2019

SLYADNEV, TURLAPOV

lated 2-manifolds, Comput.-Aided Geom. Des., 2003,

pp. 35–57.

30. Anwer, N. and Mathieu, L., From reverse engineering

to shape engineering in mechanical design, CIRP Ann.,

2016, vol. 65, no. 1, pp. 165–168.

31. Venkataraman, S., Sohoni, M., and Kulkarni, V., A

graph-based framework for feature recognition, Proc.

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

ACM, 2001, pp. 194–205.

32. Várady, T., Martin, R.R., and Cox, J., Reverse engi-

neering of geometric models-an introduction, Com-

put.-Aided Des., 1997, vol. 29, no. 4, pp. 255–268.

33. Lin, F. and Hewitt, W.T., Expressing Coons-Gordon

surfaces as nurbs, Comput.-Aided Des., 1994, vol. 26,

no. 2, pp. 145–155.

34. Corney, J.R. and Lim, T., 3D Modelling with ACIS,

Saxe-Coburg, 2001, 2nd ed.

35. Beccari, C.V., Farella, E., Liverani, A., Morigi, S., and

Rucci, M., A fast interactive reverse-engineering system,

Comput.-Aided Des., 2010, vol. 42, no. 10, pp. 860–873.

36. Piegl, L. and Tiller, W., The NURBS Book, New York:

Springer, 1997.

37. Kallay, M., Constrained optimization in surface design,

Modeling in Computer Graphics, Berlin: Springer, 1993,

pp. 85–93.

38. Bartels, R.H. and Beatty, J.C., A technique for the

direct manipulation of spline curves, Proc. Graphics

Interface, 1989, pp. 33–39.

39. Moreira, A. and Santos, M.Y., Concave hull: A k-near-

est neighbours approach for the computation of the

region occupied by a set of points, Proc. 2nd Int. Conf.

Computer Graphics Theory and Applications, 2007,

pp. 61–68.

40. Slyadnev, S., Active Data: SDK for organizing data of

CAD/CAM/CAE software (powered by Open CAS-

CADE Technology), Technical report, 2015.

https://www.researchgate.net/publica-

tion/282149692_Active_Data_SDK_for_organizing_d

ata_of_CADCAMCAE_software_pow-

ered_by_Open_CASCADE_Technology.

41. Jackson, D.J., Boundary representation modeling with

local tolerances, Proc. 3rd Symp. Solid Modeling and

Applications (SMA), 1995, pp. 247–254.

42. Frischmann, F., Topological and geometric healing on

solid models, Master’s thesis, 2011.

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

model inspection utility and prototyping framework

based on OpenCascade, Proc. GraphiCon, 2017,

pp. 323–327.

44. Slyadnev, S., Open CASCADE technology overview,

2014.

http://isicad.net/articles.php?article_num=17368.

45. Colombo, G., Facoetti, G., Rizzi, C., and Vitali, A.,

Simplynurbs: A software library to model nurbs for

medical applications, Comput.-Aided Des. Appl., 2015,

vol. 12, no. 6, pp. 794–802.

46. Piegl, L. and Tiller, W., Surface skinning revisited,

Visual Comput., 2002, vol. 18, no. 4, pp. 273–283.

47. Pérez-Arribas, F. and Pérez-Fernández, R., A B-spline

design model for propeller blades, Advances Eng. Soft-

ware, 2018, vol. 118, pp. 35–44.

48. Lee, E.T.Y., Choosing nodes in parametric curve inter-

polation, Comput.-Aided Des., 1989, vol. 21, no. 6,

pp. 363–370.

49. Ke, Y., Fan, S., Zhu, W., Li, A., Liu, F., and Shi, X.,

Feature-based reverse modeling strategies, Comput.-

Aided Des., 2006, vol. 38, no. 5, pp. 485–506.

50. Juhász, I. and Róth, Á., Adjusting the energies of curves

defined by control points, Comput.-Aided Des., 2019,

vol. 107, pp. 77–88.

51. Pagani, L. and Scott, P.J., Curvature based sampling of

curves and surfaces, Comput.-Aided Geom. Des., 2018,

vol. 59, pp. 32–48.

52. Kurella, V., Stone, B., and Spence, A., GPU acceler-

ated CAD to inspection data deviation colormap gener-

ation, Comput.-Aided Des. Appl., 2017, vol. 14, no. 2,

pp. 234–241.

53. Weiss, V., Andor, L., Renner, G., and Varady, T.,

Advanced surface fitting techniques, Comput.-Aided

Geom. Des., 2002, vol. 19, pp. 19–42.

54. Vaitkus, M. and Várady, T., Parameterizing and

extending trimmed regions for tensor-product surface

fitting, Comput.-Aided Des., 2017.

https://doi.org/10.1016/j.cad.2017.11.008

Translated by Yu. Kornienko