File: ReadMe.md

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (54 lines) | stat: -rw-r--r-- 1,912 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
OCCT AndroidQt sample for Android {#samples_qml_android_occt}
================== 

This sample demonstrates a simple way of using OCCT libraries in Android application written using Qt/Qml.

The connection between Qt/Qml and OCCT (C++) level is provided by proxy library, libAndroidQt.so, written in C++.
The proxy library contains single C++ class AndroidQt encapsulating OCCT viewer and providing functionality to manipulate this viewer
and to import OCCT shapes from supported format of CAD file (BREP).

Requirements for building sample:
* Java Development Kit 1.7 or higher
* Qt 5.3 or higher
* Android SDK  from 2014.07.02 or newer
* Android NDK r9d or newer
* Apache Ant 1.9.4 or higher
 
Configure project for building sample:

In QtCreator, open AndroidQt.pro project-file:
~~~~
  File -> Open file or Project... 
~~~~

Specify Android configurations:
~~~~
Tools->Options->Android
~~~~ 
* In JDK location specify path to Java Development Kit
* In Android SDK location specify path to Android SDK
* In Android NDK location specify path to Android NDK
* In Ant executable specify path to ant.bat file located in Apache Ant bin directory

Make sure that "Android for armeabi-v7a" kit has been detected
~~~~
Tools->Options->Build & Run
~~~~ 

The paths to OCCT and 3rdparty libraries are specified in "OCCT.pri" file:

the paths to the headers:
~~~~
INCLUDEPATH += /occt/inc /3rdparty/include
DEPENDPATH  += /occt/inc /3rdparty/include
~~~~

the libraries location:
~~~~
LIBS += -L/occt/libs/armeabi-v7a
~~~~

OCCT resources (Shaders, SHMessage, StdResource, TObj, UnitsAPI and XSMessage folder) should be copied to androidqt_dir/android/assets/opencascade/shared/ directory. Current sample requires at least Shaders folder.

Select build configuration: Debug or Release and click Build->Build Project "AndroidQt" or (Ctrl + B).
After successful build the application can be deployed to device or emulator.