|
Articles
25 Nov 2014
Open CASCADE Technology OverviewSergey Slyadnev
Sergey Slyadnev graduated from the Faculty of Computational Mathematics and Cybernetics of Nizhny Novgorod State University named after Lobachevsky, specialty — Applied Mathematics and Computer Science. By a happy coincidence he joined OPEN CASCADE company in 2008 and has been working there ever since. His professional interests lie in the domain of numerical methods and geometric modeling. Married, has two children.
Introduction
Today the market of science-intensive software proposes a big number of
open source products possessing a proven high quality and widely
recognized for showing good results. In this article we make a brief
overview of Open CASCADE Technology (OCCT) capacities not going deeply
into details and focusing only on the basic platform components.
This overview will give you an initial understanding of the
platform and its possible application domains.
OCCT provides a wide range of functionalities for the development of
engineering software. Moreover, this library is accessible under LGPL
license which means that there are practically no restrictions
against its commercial use.
What is OCCT?
First and foremost Open CASCADE Technology SDK is a geometric modeling
library or, more simply, it is a geometrical kernel. OCCT uses a BRep
(Boundary Representation) approach to represent 3D models. This ranks
the library together with such products as ACIS, Parasolid, CGM, C3D and
RGK. The main difference is that the OCCT source code is completely
at the developer's disposal, which makes him considerably independent
from the supplier company (which is a service company ready to help
its clients to resolving different kinds of engineering problems).
Structurally the library consists of several inter-connected modules
responsible for various functions (Figure 1). The main library components
are listed below:
- Foundation Classes: the fundamental OCCT toolkit, including "smart
pointers", collections and other tools providing the library
infrastructure.
- Modeling: the modeling itself.
- Mesh: built-in tools for triangulation of CAD-models. As a rule,
this functionality is used for 3D visualization.
- Data Exchange: components for data interoperability between different
CAD software.
- Visualization: an integrated visualization subsystem for CAD models,
grids and arbitrary application data.
- Application Framework (OCAF): components for rapid application
development using OCCT.
Figure 1. Components of Open CASCADE Technology.
Historical Background
The kernel is supported and developed by a company bearing the same name:
OPEN CASCADE S.A.S. Its front-office is located in France. In Russia
the company is represented with a big competence center located
in the city of Nizhny Novgorod.
Historically OCCT inherits its mathematical kernel from EUCLID CAD system,
developed by Matra Datavision Company since the beginning of 1980-s. A
platform called CAS.CADE (Computer Aided Software for Computer Aided
Design and Engineering) was released in 1993. It served as a basis for
the development of a new generation of EUCLID called the EUCLID QUANTUM
system, which was officially released in 1996. However a few years later
(in 1998) Matra Datavision Company changed its business model and focused
on providing software services.
In 1999 the management of Matra Datavision made a historical decision to
open the source code of CAS.CADE library, which was then called Open
CASCADE. At the end of year 2000 Matra Datavision created an affiliated
company called OPEN CASCADE S.A.S. to provide support and services based
on the new geometrical kernel. In 2003 Matra Datavision was purchased by
IBM Corporation, while OPEN CASCADE S.A.S. was acquired by another French
company: Principia. You can read more about the company history on the
official company
web-site.
Present Day
OPEN CASCADE S.A.S. Company has been making great efforts to promote
its OCCT kernel over the last years. This open-source product was
released a long time ago, so naturally it has a community of users.
Now any interested person can participate in its development after
filling out a registration form on the developers' portal where OCCT
official bug-tracker and GIT-repository are located.
Modeling
As we have mentioned above, OCCT platform implements a boundary
representation (BRep) of objects in 3D. The notions of geometry and
topology are fundamental for such representation. Thus the geometry is
usually understood as a mathematical description of a shape, e.g. in
terms of Bezier curves and surfaces, NURBS representation, etc. In its
turn, the topology is a data structure binding geometrical objects
together. Speaking abstractly, we could draw an analogy between BRep
topology and classic topology in the mathematical sense. As it is known,
mathematical topology studies homeomorphisms, i.e. transformations without
cutting and gluing. From this point of view, a torus (Figure 2 to the
left) is identical to a coffee cup (the reader with a good imagination
can recognize it in Figure 2 to the right). The same is true for a BRep
topology: data structures that describe a torus and a cup can be totally
identical. The whole difference consists in the geometry.
Figure 2. Torus modification without changing its topological
structures. The same topological structure can fit equally well
to visually different models.
From the programmer's viewpoint topology is a graph of objects
representing adjacent vertices and edges for neighbor faces.
Figure. 3. Possible topological structure of a "patchwork" torus
from Figure 2.
The structure of OCCT geometrical and topological primitives generally
corresponds to ISO-10303 (STEP) standard. It is mostly useful to check
part 42 — "Integrated generic resource: Geometric and topological
representation". Anyway, grasping the idea that a CAD-model is rather
a "patchwork" than a simple object is absolutely necessary to work with
a BRep representation. BRep principles are rather standard and are not
peculiar exclusively to OCCT. Only the set of used topological primitives
changes from one kernel to another, while such objects as faces, edges
and vertices are always present (exactly these objects get connected with
geometric primitives, while all others play a purely structural role).
It needs to be noted that, apart from BRep, other representation techniques for
CAD modeling are known and actually used: faceted shells, voxels, cellular structures,
CSG (Constructive Solid Geometry) etc. However, all of them are very
application-specific and are used only within a limited range of tasks
(for example, voxels are successfully used in parallel processing).
A precise BRep-model is "better" than a discrete one to the effect that
it can always be converted into both, voxels and 3D meshes of required
quality. The reverse task (obtaining a precise model from a discrete one)
is not trivial as a rule and poses many difficulties. The main one is
the fact that geometry and topology can be reconstructed in
infinite number of ways. That is why 3D modeling tasks require a somewhat "ideal"
object representation corresponding to its actual or designed form.
As for a discrete model, its nature is usually determined by a specific
task. For example, in CAE field engineers often need to observe some
limitations on the shape of finite elements (FEA) and those limitations
may vary depending on the solver (for example, hydrodynamic solvers can
be sensitive to the features of a discrete model that are not taken into
account when structural analysis is performed and vice versa).
OCCT geometry is defined in a standard parametric form. It is commonly
known that NURBS is the most common approach to the description of a
geometric form. Alongside with it, OCCT platform implements surfaces of
revolution, ruled surfaces, curves, ñonics and quadrics, etc. Currently
OCCT supports the entire usual set of geometries, except for such
technologies as T-splines and subdivision surfaces.
Figure 4. B-spline surface in OCCT.
Geometry is trimmed and structured using topological limitations. It can
be seen how the parametric domain of each face changes in the process.
The "parametric domain" means a (U, V) space, where the face of interest,
complemented with parametric 2D curves (p-curves) is defined. The
configuration and orientation of these curves indicates how the edges
are defined on the face and where the holes are located.
Figure 5. Parametric domain of a face with internal holes.
After this brief overview of the basic BRep principles, we will examine
the fundamental OCCT capacities related to CAD engineering field. For more
details of available functions please consult the
official documentation
or check the sample applications supplied with OCCT.
Reconstruction of a surface from points
OCCT supports a toolset to reconstruct the surface geometry from an
ordered set of points. This procedure can involve the global
interpolation methods (if the resulting precision should be equal
to zero) or the approximation methods with a given precision.
Figure 6. NURBS-surface, reconstructed from a cloud of points.
Shell (Solid) Skinning
Reconstructing a shape from a given set of sections is a standard
geometric modeling task. OCCT provides means for both, surface
skinning and for solid reconstruction with automatic recovery of
end faces.
Figure 7. Model constructed by sections.
Cinematic modeling
Sweeping a profile along a given trajectory (spine) allows building
tubes of arbitrary shape and section. The profile orientation along the
spine is defined by the user.
Figure 8. Tube constructed by sweeping of a round profile.
Boolean operations
Cut, fuse, common, intersection of shapes and surfaces — all these
fundamental algorithms are implemented in OCCT and have been successfully
tested on many real industrial models.
Figure 9. Cutting a prism from a revolution.
Figure 10. Fusing.
Figure 11. Common.
Figure 12. Intersection of shells.
Chamfers and Fillets
Chamfers and fillets are also available in OCCT. Fillets with a variable
radius are supported as well.
Figure 13. Fillets on edges.
Figure 14. Fillets with a variable radius.
Anything else?
The most exhaustive description of OCCT modeling capabilities is provided
by its open documentation.
We can only remark that the existing functions provide solutions to a
widest range of CAD tasks.
Data Exchange
Open CASCADE Technology provides advanced tools for CAD data exchange. It
supports such common formats as STEP, IGES, STL and VRML. The correctness
of data transfer using STEP format is ensured not only by a profound
experience of using that translator in industrial projects, but also by
the fact that the development team took part in a ProSTEP "test-rally"
(in 1998-1999, TR 8-10), and later in CAX-IF
(in 2000-2002, TRJ 3-10).
The quality of translation is amplified by Shape Healing component, which
serves for post-processing of a reconstructed CAD model and allows
solving geometric and topological problems (for example, related with
self-intersection of edges, absence of parametric curves, insufficiency
of topological information, etc.)
Data translators allow working not only with geometric information, but
also with some associated attributes. For example, Open CASCADE Technology
is able to read component colors and names, their nesting in assemblies,
layers and some other properties from STEP format.
Figure 15. A STEP file with colors read by Open CASCADE Technology.
Visualization
Open CASCADE Technology platform is supplied with its custom visualization
subsystem based on OpenGL. The subsystem not only allows working
efficiently with geometric resources of the library, but it also
supports implementation of interactive 3D scenes in real CAD
applications.
Figure 16. Dynamic section by means of OpenGL.
Figure 17. Visualization by ray tracing method (real-time FPS).
Figure 18. Visualization of a pump model by ray tracing combining
shading and wireframe.
At our disposal we have either low-level tools working with basic
geometry and topology (NURBS visualization with control points and knots,
rendering of isolines to estimate the speed and quality of
parameterization, rendering of a parametric domain of faces) or
high-level tools for real time quality rendering of models using ray
tracing (including shades, reflections, transparency, antialiasing, etc.).
It seems that currently this part of the library develops most rapidly.
About trends
It is well understood that the functions related to geometric modeling
should be as reliable as possible. Of course, no software is flawless,
so testing is really important. Despite about 16000 test scenarios, bugs
are regularly found in Open CASCADE Technology (which is inevitable).
It should be noted that OCCT is a "live" product developed through
coordinated efforts of several internal expert groups, modeling being
the most important one.
Figure 19 shows the chart of improvements implemented in the latest
versions of OCCT platform grouped by their functional domain. It can be
clearly seen that most corrections and improvements belong to geometrical
modeling, which is the most technically complex and knowledge-intensive
part of the library. This means that even after the extinction of EUCLID,
OCCT platform steadily develops and expands its geometrical
functionalities and their reliability.
Figure 19. Corrections and improvements in OCCT for the last three
years (versions 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.6.0, 6.7.0 and
6.7.1).
Conclusion
Open CASCADE Technology is an absolutely open product that can
greatly contribute to your capacities to develop high-tech software. It
is remarkable that this library can be applied even in domains outside of
CAD/CAM/CAE fields. A sophisticated mathematical kernel, a visualization subsystem
and components for fast prototyping of applications (OCAF) can be useful not only
for the developers of industrial level software, but also for the teaching
and research staff as a mathematical "ecosystem" for scientific projects.
It is impossible to describe all available OCCT functionalities in one
short introductory article, so we invite our readers to proceed to
the official developers' site.
Take part in OCCT development with us and your creative input will become
available to the engineering community of the entire world!
© OPEN CASCADE S.A.S., 2014
The text of the article belongs to OPEN CASCADE S.A.S. and cannot be cited, modified, reprinted or copied in whole or in part without written consent of OPEN CASCADE SAS.
See also:
Permanent link :: http://isicad.net/articles.php?article_num=17368
|
|