Ceetron Desktop Components (CDC) and Ceetron Export are written in C++. The Python versions ares provided as a wrapper layer ontop of this. Because of this, all documentation and tutorial snippets are provided in C++ only. However, we believe that reading class/function descriptions and code examples in the C++ generated documentation will be straightforward for a Python programmer.
The Python wrapping targets Python 3.6.
You may wish to consider using Anaconda 4.3.1 (Python 3.6 version), which is a friendly Python distribution including a large variety of packages used in the engineering community. Among other things, it provides the appropriate version of PyQt, the Python version of the Qt GUI toolkit.
Ceetron Desktop Components for Python is provided as a Python module named cee, which contains one submodule per C++ namespace.
Python module | Ceetron Desktop Components | C++ namespace |
cee.core | CeeCore | cee |
cee.vtfx | CeeVTFx | cee::vtfx |
Due to limitations in the Python wrapper layer, there is a special handling of inheritance in the Python version of Ceetron Desktop Components. The problem is downcasting objects that are fetched from within Ceetron Desktop Components.
For instance:
In this scenario, in order to obtain an instance of GeometryModel when getting a Model from the view, we have provided casting methods for all such classes. Using the static castFromBaseClass will always give you a correct cast. For an invalid cast, the returned value will be null.
When setting values for properties in cee::PropertySet, you need to specifically call the data type appropriate function. So cee::PropertySet::setValue() is not available for Pyhton, use setValueInt(), setValueUInt(), setValueDouble(), setValueFloat(), setValueBool(), setValueStr(), setValueColor3f() setValueVec3d() and setValueVariantArr() instead.
Due to the wrapping mechanism of underlying C++ objects, the Python "is" operator does not provide the expected behavior when objects are passed on to C++, for example to be stored in C++ pointer collections. In these cases, if identity needs to be tested, a specific operator named |swigis| has been implemented in the cee.core module.
For Ceetron Desktop Components, the development language is C++, which means that any product developed using one of our toolkits must distrute Visual C++ redistributables. To deploy redistributable Visual C++ files, you can use the Visual C++ Redistributable Packages (VCRedist_x86.exe, VCRedist_x64.exe, or VCRedist_arm.exe) that are included in Visual Studio or use redistributable merge modules, or you can directly install redistributable Visual C++ DLLs in the application local folder, which is the folder that contains the executable application file.
The latest Visual C++ Redistributable Packages for all Visual Studio versions can be downloaded from: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
If you just deploy with the redistributable DLLs in the application folder, you will need "C Runtime Library (CRT) for native code" and "Standard C++ Library for native code".