1. Introduction
1.1 Knowledges about architecture: Roy T. Fielding
A software architecture is an abstraction of the run-time elements of a software system during some phase of its operation. A system may be composed of many levels of abstraction and many phases of operation, each with its own software architecture.
Software architecture research investigates methods for determining how best to partition a system, how components identify and communicate with each other, how information is communicated, how elements of a system can evolve independently, and how all of the above can be described using formal and informal notations.
1.2 Knowledges about object-oriented design: GoF
Object-oriented design ecourages the distribution of behavior among objects. Such distribution can result in a object structure with many connections between objects. [Mediator]
Structuring a system into subsystems helps reduce complexity. A common design goal is to minimize the communication and dependencies between subsystems. [Facade]
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 maitain relationship beween objects. [Factory Method]
1.3 Design overview
Acise is A CAx Industrial Software Ecology, designed with the Layered Micro Kernel 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. These UI 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 interface from the underlying application data. Thus, classes defining application data and presentations can be reused independently.
Several key abstract classes are used to define and maintain relationships between objects. The 'Application' class manages several documents and the global settings. The 'Document' class organizes the application-specific raw data into data objects. The 'View' class performs interaction with the user and rendering the data objects while the 'Presneter' holds mostly presentation logic.
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.
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.

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
3.1 Microsoft C++ compiler (MSVC) on Windows
3.1.1 Check out the source codes
git clone --recurse-submodules XXX/Acise.git
3.1.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_DOCUMENTATION | 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 | 3 |
3.2 GCC and MinGW-w64 on Windows
3.2.1 Check out the source codes
3.2.2 Install the MinGW-w64 toolchain
Get the latest version of MinGW-w64 via MSYS2, which provides up-to-date native builds of GCC, MinGW-w64, and other helpful C++ tools and libraries.
In this terminal, install the MinGW-w64 toolchain by running the following command,
pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cppcheck \
mingw-w64-x86_64-boost mingw-w64-x86_64-qt6 mingw-w64-x86_64-vtk \
mingw-w64-x86_64-opencascade
and install the possible missed third packages,
pacman -S mingw-w64-x86_64-cli11 mingw-w64-x86_64-pdal mingw-w64-x86_64-openvdb \
mingw-w64-x86_64-liblas mingw-w64-x86_64-adios2 mingw-w64-x86_64-gl2ps \
mingw-w64-x86_64-fast_float mingw-w64-x86_64-eigen3 mingw-w64-x86_64-cgns \
mingw-w64-x86_64-openslide mingw-w64-x86_64-utf8cpp
3.2.3 CMake Configurations
Take the 'CMakeUserPresets.cmake' provided as the main CMake configurations, and customize the following CMake cached varaibles,
Variable | Value | Description |
---|---|---|
YQ_DESIRED_QT_VERSION | Qt6 | |
YQ_BUILD_DOCUMENTATION | ON | |
YQ_BUILD_PYTHON_BINDINGS | ON | |
YQ_BUILD_PACKAGE | ON |
3.3 Build on Ubuntu
3.3.1 Install Prerequisites for Compilation
Firstly, retrieve new lists of packages
apt-get update
and then install the dependencies
apt-get install vim openssh-server openssh-client ssh build-essential cmake git doxygen cppcheck \
libboost-all-dev qt6-base-dev qt6-webengine-dev libocct-data-exchange-dev libocct-draw-dev \
libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev \
libocct-visualization-dev occt-draw libvtk9-dev
3.3.2 Check out the source codes
3.3.3 CMake Configurations
Use the 'linux-gcc' Preset in the provided 'CMakeUserPresets.cmake', and customize the following CMake cached varaibles,
Variable | Value | Description |
---|---|---|
YQ_DESIRED_QT_VERSION | Qt6 | |
YQ_BUILD_DOCUMENTATION | ON | |
YQ_BUILD_PYTHON_BINDINGS | ON | |
YQ_BUILD_PACKAGE | ON |
3.4 Build on Macintosh
4. Major functional parts
FAQs
Q: How to test the built python module?
A: Enter the python module directory
pythond_d
import sys
import example
References
- Erich Gamma. Design Patterns:elements of reusable object-oriented software.Addison Wesley, 1994.
- Joseph Ingeno. Software Architect's Handbook. Packt Publishing, 2018.
- Roy T. Fielding. Architectural Styles and the Design of Network-based Software Architectures. 2000.