Merge branch 'master' into feature/tool-bit-poc
This commit is contained in:
39
.travis.yml
39
.travis.yml
@@ -47,9 +47,37 @@ matrix:
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: clang
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
packages:
|
||||
- clang-9
|
||||
env:
|
||||
- CC=clang-9
|
||||
- CXX=clang++-9
|
||||
- CMAKE_OPTS="-DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON -DBUILD_QT5=ON"
|
||||
- PYTHON_MAJOR_VERSION=3
|
||||
- CACHE_NAME=JOB1
|
||||
|
||||
# - os: linux
|
||||
# dist: bionic
|
||||
# compiler: gcc
|
||||
# addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
# packages:
|
||||
# - gcc-9
|
||||
# - g++-9
|
||||
# env:
|
||||
# - CC=gcc-9
|
||||
# - CXX=g++-9
|
||||
# - CMAKE_OPTS="-DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON -DBUILD_QT5=ON"
|
||||
# - PYTHON_MAJOR_VERSION=3
|
||||
# - CACHE_NAME=JOB2
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
@@ -57,12 +85,14 @@ matrix:
|
||||
env:
|
||||
- CMAKE_OPTS="-DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON -DBUILD_QT5=ON"
|
||||
- PYTHON_MAJOR_VERSION=3
|
||||
- CACHE_NAME=JOB3
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: gcc
|
||||
env:
|
||||
- PYTHON_MAJOR_VERSION=2
|
||||
- CACHE_NAME=JOB4
|
||||
|
||||
- os: windows
|
||||
language: cpp
|
||||
@@ -78,6 +108,7 @@ matrix:
|
||||
- CCACHE_TEMPDIR=/tmp/.ccache-temp
|
||||
- CCACHE_COMPRESS=1
|
||||
- CCACHE_DIR=$HOME/.ccache
|
||||
- CACHE_NAME=JOB5
|
||||
# enable this if clcache extended log is needed
|
||||
#- CLCACHE_LOG=1
|
||||
cache:
|
||||
@@ -272,11 +303,11 @@ script:
|
||||
winpty.exe -Xallow-non-tty -Xplain /C/Users/travis/build/FreeCAD/FreeCAD/build/bin/FreeCADCmd.exe --run-test 0 | tee runlog.txt
|
||||
grep -q FAILED runlog.txt ; [ $? == 1 ] && echo "Build succeeded and tests passed!" || ( echo "Tests failed!" && false )
|
||||
else
|
||||
# Stop compiling (GCC) after 2 hrs 15 min (2 hrs 30 min limit). Extended to 180 min.
|
||||
# Stop compiling (GCC) after 2 hrs 50 min (3 hrs limit).
|
||||
# Preserves created ccache for the next build job.
|
||||
# if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 140m 135m make -j2 install || true; fi
|
||||
# if [ "${TRAVIS_OS_NAME}" == "osx" ]; then sudo make -j2 install; fi
|
||||
sudo make -j2 install
|
||||
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi
|
||||
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then sudo make -j2 install; fi
|
||||
# sudo make -j2 install
|
||||
${INSTALLED_APP_PATH} --console --run-test 0 || travis_terminate 1
|
||||
${INSTALLED_APP_PATH} --log-file /tmp/FreeCAD_installed.log &
|
||||
sleep 10 && pkill FreeCAD
|
||||
|
||||
@@ -59,6 +59,8 @@ macro(InitializeFreeCADBuildOptions)
|
||||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/DLLs)
|
||||
set(COPY_LIBPACK_BIN_TO_BUILD ON )
|
||||
option(FREECAD_COPY_LIBPACK_BIN_TO_BUILD "Copy larger libpack dependency 'bin' folder to the build directory." OFF)
|
||||
# Copy only the minimum number of files to get a working application
|
||||
option(FREECAD_COPY_PLUGINS_BIN_TO_BUILD "Copy plugins to the build directory." OFF)
|
||||
endif()
|
||||
else()
|
||||
message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
|
||||
@@ -156,6 +158,7 @@ macro(InitializeFreeCADBuildOptions)
|
||||
|
||||
if(MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" ON)
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
elseif(APPLE)
|
||||
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)
|
||||
|
||||
@@ -234,6 +234,18 @@ macro(PrintFinalReport)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_BINARY_DIR})
|
||||
message("... done copying libpack 'bin' directory.\n=======================================\n")
|
||||
endif()
|
||||
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying plugins to build directory.")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_INSTALL_DEPEND_DIRS)
|
||||
|
||||
@@ -67,65 +67,3 @@ if(FREECAD_USE_FREETYPE)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
|
||||
link_directories(${FREECAD_LIBPACK_DIR}/lib)
|
||||
find_package(PCL QUIET)
|
||||
if(NOT EXISTS ${PCL_INCLUDE_DIRS})
|
||||
set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.7)
|
||||
set(PCL_LIBRARY_DIRS ${FREECAD_LIBPACK_DIR}/lib)
|
||||
|
||||
set(PCL_COMMON_LIBRARIES optimized pcl_common_release debug pcl_common_debug)
|
||||
set(PCL_FEATURES_LIBRARIES optimized pcl_features_release debug pcl_features_debug)
|
||||
set(PCL_FILTERS_LIBRARIES optimized pcl_filters_release debug pcl_filters_debug)
|
||||
set(PCL_IO_LIBRARIES optimized pcl_io_release debug pcl_io_debug)
|
||||
set(PCL_IO_PLY_LIBRARIES optimized pcl_io_ply_release debug pcl_io_ply_debug)
|
||||
set(PCL_KDTREE_LIBRARIES optimized pcl_kdtree_release debug pcl_kdtree_debug)
|
||||
set(PCL_KEYPOINTS_LIBRARIES optimized pcl_keypoints_release debug pcl_keypoints_debug)
|
||||
set(PCL_ML_LIBRARIES optimized pcl_ml_release debug pcl_ml_debug)
|
||||
set(PCL_OCTREE_LIBRARIES optimized pcl_octree_release debug pcl_octree_debug)
|
||||
set(PCL_RECOGNITION_LIBRARIES optimized pcl_recognition_release debug pcl_recognition_debug)
|
||||
set(PCL_REGISTRATION_LIBRARIES optimized pcl_registration_release debug pcl_registration_debug)
|
||||
set(PCL_SAMPLE_CONSENSUS_LIBRARIES optimized pcl_sample_consensus_release debug pcl_sample_consensus_debug)
|
||||
set(PCL_SEARCH_LIBRARIES optimized pcl_search_release debug pcl_search_debug)
|
||||
set(PCL_SEGMENTATION_LIBRARIES optimized pcl_segmentation_release debug pcl_segmentation_debug)
|
||||
set(PCL_STEREO_LIBRARIES optimized pcl_stereo_release debug pcl_stereo_debug)
|
||||
set(PCL_SURFACE_LIBRARIES optimized pcl_surface_release debug pcl_surface_debug)
|
||||
set(PCL_TRACKING_LIBRARIES optimized pcl_tracking_release debug pcl_tracking_debug)
|
||||
|
||||
set(PCL_LIBRARIES
|
||||
${PCL_COMMON_LIBRARIES}
|
||||
${PCL_FEATURES_LIBRARIES}
|
||||
${PCL_FILTERS_LIBRARIES}
|
||||
${PCL_IO_LIBRARIES}
|
||||
${PCL_IO_PLY_LIBRARIES}
|
||||
${PCL_KDTREE_LIBRARIES}
|
||||
${PCL_KEYPOINTS_LIBRARIES}
|
||||
${PCL_ML_LIBRARIES}
|
||||
${PCL_OCTREE_LIBRARIES}
|
||||
${PCL_RECOGNITION_LIBRARIES}
|
||||
${PCL_REGISTRATION_LIBRARIES}
|
||||
${PCL_SAMPLE_CONSENSUS_LIBRARIES}
|
||||
${PCL_SEARCH_LIBRARIES}
|
||||
${PCL_SEGMENTATION_LIBRARIES}
|
||||
${PCL_STEREO_LIBRARIES}
|
||||
${PCL_SURFACE_LIBRARIES}
|
||||
${PCL_TRACKING_LIBRARIES}
|
||||
)
|
||||
set(PCL_FOUND TRUE)
|
||||
set(PCL_COMMON_FOUND TRUE)
|
||||
set(PCL_FEATURES_FOUND TRUE)
|
||||
set(PCL_FILTERS_FOUND TRUE)
|
||||
set(PCL_IO_FOUND TRUE)
|
||||
set(PCL_IO_PLY_FOUND TRUE)
|
||||
set(PCL_KDTREE_FOUND TRUE)
|
||||
set(PCL_KEYPOINTS_FOUND TRUE)
|
||||
set(PCL_ML_FOUND TRUE)
|
||||
set(PCL_OCTREE_FOUND TRUE)
|
||||
set(PCL_RECOGNITION_FOUND TRUE)
|
||||
set(PCL_REGISTRATION_FOUND TRUE)
|
||||
set(PCL_SAMPLE_CONSENSUS_FOUND TRUE)
|
||||
set(PCL_SEARCH_FOUND TRUE)
|
||||
set(PCL_SEGMENTATION_FOUND TRUE)
|
||||
set(PCL_STEREO_FOUND TRUE)
|
||||
set(PCL_SURFACE_FOUND TRUE)
|
||||
set(PCL_TRACKING_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -326,10 +326,10 @@ void DlgMacroExecuteImp::on_editButton_clicked()
|
||||
PythonEditor* editor = new PythonEditor();
|
||||
editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python"));
|
||||
PythonEditorView* edit = new PythonEditorView(editor, getMainWindow());
|
||||
edit->setDisplayName(PythonEditorView::FileName);
|
||||
edit->open(file);
|
||||
edit->resize(400, 300);
|
||||
getMainWindow()->addWindow(edit);
|
||||
edit->setWindowTitle(item->text(0));
|
||||
|
||||
if (mitem->systemWide) {
|
||||
editor->setReadOnly(true);
|
||||
|
||||
@@ -58,20 +58,20 @@ UndoDialog::~UndoDialog()
|
||||
void UndoDialog::onFetchInfo()
|
||||
{
|
||||
clear(); // Remove first all items
|
||||
Gui::Document* pcDoc = Application::Instance->activeDocument();
|
||||
if (pcDoc)
|
||||
{
|
||||
std::vector<std::string> vecUndos = pcDoc->getUndoVector();
|
||||
for (std::vector<std::string>::iterator i=vecUndos.begin(); i!=vecUndos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
|
||||
MDIView* mdi = getMainWindow()->activeWindow();
|
||||
EditorView* view = qobject_cast<EditorView*>(mdi);
|
||||
if (view) {
|
||||
QStringList vecUndos = view->undoActions();
|
||||
for (QStringList::Iterator i = vecUndos.begin(); i != vecUndos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorView* view = qobject_cast<EditorView*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
QStringList vecUndos = view->undoActions();
|
||||
for (QStringList::Iterator i=vecUndos.begin(); i!=vecUndos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
else if (mdi) {
|
||||
Gui::Document* pcDoc = mdi->getGuiDocument();
|
||||
if (pcDoc) {
|
||||
std::vector<std::string> vecUndos = pcDoc->getUndoVector();
|
||||
for (std::vector<std::string>::iterator i = vecUndos.begin(); i != vecUndos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,20 +115,20 @@ RedoDialog::~RedoDialog()
|
||||
void RedoDialog::onFetchInfo()
|
||||
{
|
||||
clear(); // Remove first all items
|
||||
Gui::Document* pcDoc = Application::Instance->activeDocument();
|
||||
if (pcDoc)
|
||||
{
|
||||
std::vector<std::string> vecRedos = pcDoc->getRedoVector();
|
||||
for (std::vector<std::string>::iterator i=vecRedos.begin(); i!=vecRedos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
|
||||
MDIView* mdi = getMainWindow()->activeWindow();
|
||||
EditorView* view = qobject_cast<EditorView*>(mdi);
|
||||
if (view) {
|
||||
QStringList vecRedos = view->redoActions();
|
||||
for (QStringList::Iterator i = vecRedos.begin(); i != vecRedos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorView* view = qobject_cast<EditorView*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
QStringList vecRedos = view->redoActions();
|
||||
for (QStringList::Iterator i=vecRedos.begin(); i!=vecRedos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
else if (mdi) {
|
||||
Gui::Document* pcDoc = mdi->getGuiDocument();
|
||||
if (pcDoc) {
|
||||
std::vector<std::string> vecRedos = pcDoc->getRedoVector();
|
||||
for (std::vector<std::string>::iterator i = vecRedos.begin(); i != vecRedos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ struct DocumentP
|
||||
std::map<const App::DocumentObject*,ViewProviderDocumentObject*> _ViewProviderMap;
|
||||
std::map<SoSeparator *,ViewProviderDocumentObject*> _CoinMap;
|
||||
std::map<std::string,ViewProvider*> _ViewProviderMapAnnotation;
|
||||
std::list<ViewProviderDocumentObject*> _redoViewProviders;
|
||||
|
||||
typedef boost::signals2::connection Connection;
|
||||
Connection connectNewObject;
|
||||
@@ -690,6 +691,9 @@ void Document::slotNewObject(const App::DocumentObject& Obj)
|
||||
|
||||
// it is possible that a new viewprovider already claims children
|
||||
handleChildren3D(pcProvider);
|
||||
if (d->_isTransacting) {
|
||||
d->_redoViewProviders.push_back(pcProvider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2152,6 +2156,10 @@ void Document::redo(int iSteps)
|
||||
getDocument()->redo();
|
||||
}
|
||||
App::GetApplication().signalRedo();
|
||||
|
||||
for (auto it : d->_redoViewProviders)
|
||||
handleChildren3D(it);
|
||||
d->_redoViewProviders.clear();
|
||||
}
|
||||
|
||||
PyObject* Document::getPyObject(void)
|
||||
|
||||
@@ -356,7 +356,7 @@ def getsize(length, mode='discard', base=1):
|
||||
tomm = {
|
||||
'': 25.4/90, # default
|
||||
'px': 25.4/90,
|
||||
'pt': 1.25 * 25.4/90,
|
||||
'pt': 4.0/3 * 25.4/90,
|
||||
'pc': 15 * 25.4/90,
|
||||
'mm': 1.0,
|
||||
'cm': 10.0,
|
||||
@@ -369,7 +369,7 @@ def getsize(length, mode='discard', base=1):
|
||||
tomm = {
|
||||
'': 25.4/96, # default
|
||||
'px': 25.4/96,
|
||||
'pt': 1.25 * 25.4/96,
|
||||
'pt': 4.0/3 * 25.4/96,
|
||||
'pc': 15 * 25.4/96,
|
||||
'mm': 1.0,
|
||||
'cm': 10.0,
|
||||
@@ -382,7 +382,7 @@ def getsize(length, mode='discard', base=1):
|
||||
topx = {
|
||||
'': 1.0, # default
|
||||
'px': 1.0,
|
||||
'pt': 1.25,
|
||||
'pt': 4.0/3,
|
||||
'pc': 15,
|
||||
'mm': 90.0/25.4,
|
||||
'cm': 90.0/254.0,
|
||||
@@ -395,7 +395,7 @@ def getsize(length, mode='discard', base=1):
|
||||
topx = {
|
||||
'': 1.0, # default
|
||||
'px': 1.0,
|
||||
'pt': 1.25,
|
||||
'pt': 4.0/3,
|
||||
'pc': 15,
|
||||
'mm': 96.0/25.4,
|
||||
'cm': 96.0/254.0,
|
||||
|
||||
@@ -832,7 +832,7 @@ void TopoShape::write(const char *FileName) const
|
||||
}
|
||||
else if (File.hasExtension("stl")) {
|
||||
// read brep-file
|
||||
exportStl(File.filePath().c_str(),0);
|
||||
exportStl(File.filePath().c_str(), 0.01);
|
||||
}
|
||||
else{
|
||||
throw Base::FileException("Unknown extension");
|
||||
|
||||
@@ -580,7 +580,7 @@ PyObject* TopoShapePy::__setstate__(PyObject *args) {
|
||||
|
||||
PyObject* TopoShapePy::exportStl(PyObject *args)
|
||||
{
|
||||
double deflection = 0;
|
||||
double deflection = 0.01;
|
||||
char* Name;
|
||||
if (!PyArg_ParseTuple(args, "et|d","utf-8",&Name,&deflection))
|
||||
return NULL;
|
||||
|
||||
Binary file not shown.
@@ -406,7 +406,7 @@
|
||||
<message>
|
||||
<location filename="../../CommandCreateDims.cpp" line="715"/>
|
||||
<source>Insert a new vertical distance dimension</source>
|
||||
<translation>Eine vertikale Abstans-Bemaßung einfügen</translation>
|
||||
<translation>Eine vertikale Abstands-Bemaßung einfügen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user