Acise: A CAx Industrial Software Ecology

1. Introduction

1.1 Knowledges about object-oriented design

Object-oriented design ecourages the distribution of behavior among objects. Such distribution can result in an object structure with many connections between objects. [Mediator]

A common side-effect of partitioning a system into a collection of cooperation classes is the need to maintain consistency between related objects. [Observer]

Framework use abstract classes to define and maintain relationship below objects. [Factory Method]

1.2 Design overview

Acise isACAxIndustrialSoftwareEcology, designed with the Layered Architecture.

As for a general CAx application software, it’s usually a touch requirement to manage the application-specific data and its related business logic. Following the object-oriented design, data should be modeled as objects which can have a few of properties. Usually, these data objects can be grouped into a hierarchy of objects. The method to organize these objects is called ‘data object model‘. In addition, users are willing to interact with these data objects through UI elements. elements present these data objects, fetch user events from users and make appropriate reactions.

MVP (Model-View-Presenter) is taken to seperate the presentational aspects of the user interfaces from the underlying application-specific data and its related business logic. Several key abstract classes are used to define and maintain relationships between objects. The ‘Application’ class manages several documents and the global settings. The ‘Model’, also known as ‘Document ‘, class organizes the application-specific raw data into data objects. The ‘View’ class performs interaction with the user and rendering the data objects. The ‘Presneter’ holds mostly presentation logic. To suit application-specific needs, these key classes should be subclassed.

One ‘Application’ usually contains a group of modules, which are writen in the C/C++ system language. These loosely-coupled modules are glued together with SWIG. With SWIG, different C/C++ programs can be turned into scripting language extension modules. These modules can then be combined together to create new and interesting applications.

Modules are a way to group things together into separate entities. Modules are typically compiled in the form of a DLL that can be dynamically loaded into Java, Python, or whatever language you are using. Essentially, a module comprises target language wrappers for a chosen collection of global variables/functions, structs/classes and other C/C++ types.

2. Dependencies

2.1 Boost

If Boost was built using the boost-cmake project or from Boost 1.70.0 on it provides a package configuration file for use with find_package’s config mode. This module looks for the package configuration file called BoostConfig.cmake or boost-config.cmake and stores the result in CACHE entry Boost_DIR. If found, the package configuration file is loaded and this module returns with no further action. See documentation of the Boost CMake package configuration for details on what it provides.

Set Boost_NO_BOOST_CMAKE to ON, to disable the search for boost-cmake.

If your application consists of more than one module (e.g. an exe and one or several dll’s) that use Boost.Log, the library must be built as a shared object. If you have a single executable or a single module that works with Boost. Log, you may build the library as a static library.

2.2 Open CASCADE

Open Cascade Platform is an integrated state of the art 3D technology, which is used both in Open Cascade end-user software products and for building efficient added value solutions tailored to each client’s needs.

2.3 VTK

The Visualization Toolkit (VTK) is open source software for manipulating and displaying scientific data. It comes with state-of-the-art tools for 3D rendering, a suite of widgets for 3D interaction, and extensive 2D plotting capability.

VTK Architecture and Components

2.4 Qt

Qt is a full development framework with tools designed to streamline the creation of applications and user interfaces for desktop, embedded, and mobile platforms.

2.5 SWIG

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of target languages including common scripting languages such as Javascript, Perl, PHP, Python, Tcl and Ruby. The list of supported languages also includes non-scripting languages such as C#, D, Go language, Java including Android, Lua, OCaml, Octave, Scilab and R. Also several interpreted and compiled Scheme implementations (Guile, MzScheme/Racket ) are supported. SWIG is most commonly used to create high-level interpreted or compiled programming environments, user interfaces, and as a tool for testing and prototyping C/C++ software. SWIG is typically used to parse C/C++ interfaces and generate the ‘glue code’ required for the above target languages to call into the C/C++ code. SWIG can also export its parse tree in the form of XML. SWIG is free software and the code that SWIG generates is compatible with both commercial and non-commercial projects.

2.6 Python

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

3. Build on Windows

3.1 Check out the source codes

git clone –recurse-submodules XXX/Acise.git

3.2 CMake configurations

Variable Value Description
Where is the Source code D:/YouQuan/CaeFrameworks/Acise/Acise
Where to build the binaries D:/YouQuan/CaeFrameworks/Acise/BUILD
CMAKE_INSTALL_PREFIX D:/YouQuan/CaeFrameworks /Acise/INSTALL
YQ_BUILD_DOCUMENTION TRUE
YQ_BUILD_PACKAGE TRUE
YQ_USE_SWIG TRUE
Boost_DIR D:/YouQuan/CaeFrameworks/Boost/boost_1_80_0/lib64-msvc-14.2/cmake/Boost-1.80.0
QT_DIR C:/Qt/Qt5.14.0/5.14.0/msvc2017_64/lib/cmake/Qt5
SWIG_EXECUTABLE C:/Program Files/SWIG/swigwin-4.1.1/swig.exe
OpenCASCADE_DIR D:/YouQuan/CaeFrameworks/OpenCASCADE/INSTALL/OpenCASCADE-7.6.0/cmake
VTK_DIR D:/YouQuan/CaeFrameworks/VTK/INSTALL/lib/cmake/vtk-9.0

4. Build on Ubuntu

5. Build on Macintosh

6. FAQ

Q: How to test the built python module?
A: Enter the python module directory

pythond_d
importsys
import example

References

  • ?Compile and install Acise under Windows
  • Compile and install OpenCASCADE under Windows
  • Compile and install VTK under Windows
  • Key components in large-scale CAx (CAD/CAE/CAM) industrial software development
  • Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. Design Patterns: elements of reusable object-oriented software. Addison Wesley, 1994.
  • Joseph Ingeno. Handbook of Software Architecture.
  • GUI Architectures
  • SWIG-4.1 Documentation
  • John K. Ousterhout. Scripting: Higher Level Programming for the 21st Century. IEEE Computer magazine, March 1998.