diff --git a/build/.gitignore b/build/.gitignore deleted file mode 100644 index 86d0cb2..0000000 --- a/build/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file diff --git a/etc/.gitignore b/etc/.gitignore deleted file mode 100644 index 86d0cb2..0000000 --- a/etc/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file diff --git a/etc/runWin64.bat b/etc/runWin64.bat index 6d74d6d..11719d9 100644 --- a/etc/runWin64.bat +++ b/etc/runWin64.bat @@ -3,4 +3,5 @@ call C:\software\libs\OpenCASCADE7.1.0-vc12-64\opencascade-7.1.0\env.bat vc12 wi echo Setting QT 5.7.0 set "PATH=C:\software\libs\QT\QT570\5.7\msvc2013_64\bin;%PATH%" echo Starting STACCATO ... -"..\bin64\Debug\STACCATO.exe" +call ping -n 3 127.0.0.1 > NUL +"..\bin64\Release\STACCATO.exe" diff --git a/src/Qt/OccViewer.cpp b/src/Qt/OccViewer.cpp index 63a72db..b46dbae 100644 --- a/src/Qt/OccViewer.cpp +++ b/src/Qt/OccViewer.cpp @@ -162,7 +162,7 @@ void OccViewer::initOccView(){ myView = myViewer->CreateView(); } Handle_Aspect_Window myWindow; -#if OCC_VERSION_HEX >= 0x070000 +#if OCC_VERSION_HEX >= 0x071000 myWindow = new OcctWindow( this ); #else #if defined _WIN32 || defined __WIN32__ diff --git a/src/Qt/StartWindow.cpp b/src/Qt/StartWindow.cpp index 26c4e6e..b175eb0 100644 --- a/src/Qt/StartWindow.cpp +++ b/src/Qt/StartWindow.cpp @@ -67,7 +67,7 @@ QMainWindow(parent), ui(new Ui::StartWindow) { ui->setupUi(this); - setWindowIcon(QIcon(":/Qt/resources/FitAll.png")); + setWindowIcon(QIcon(":/Qt/resources/STACCATO.png")); myOccViewer = new OccViewer(this); setCentralWidget(myOccViewer); createActions(); @@ -83,26 +83,46 @@ StartWindow::~StartWindow() void StartWindow::createActions(void) { + // File actions mExitAction = new QAction(tr("Exit"), this); mExitAction->setShortcut(tr("Ctrl+Q")); - mExitAction->setIcon(QIcon(":/Qt/resources/close.png")); + mExitAction->setIcon(QIcon(":/Qt/resources/closeDoc.png")); mExitAction->setStatusTip(tr("Exit the application")); connect(mExitAction, SIGNAL(triggered()), this, SLOT(close())); mReadSTLAction = new QAction(tr("Read STL file"), this); - mReadSTLAction->setShortcut(tr("Ctrl+R")); - mReadSTLAction->setIcon(QIcon(":/Qt/resources/close.png")); + mReadSTLAction->setIcon(QIcon(":/Qt/resources/openDoc.png")); mReadSTLAction->setStatusTip(tr("Read STL file")); connect(mReadSTLAction, SIGNAL(triggered()), this, SLOT(readSTL())); + // View actions + mPanAction = new QAction(tr("Pan"), this); + mPanAction->setIcon(QIcon(":/Qt/resources/pan.png")); + mPanAction->setStatusTip(tr("Panning the view")); + + mZoomAction = new QAction(tr("Zoom"), this); + mZoomAction->setIcon(QIcon(":/Qt/resources/zoom.png")); + mZoomAction->setStatusTip(tr("Zooming the view")); + + mFitAllAction = new QAction(tr("Zoom fit all"), this); + mFitAllAction->setIcon(QIcon(":/Qt/resources/fitAll.png")); + mFitAllAction->setStatusTip(tr("Fit the view to show all")); + + mRotateAction = new QAction(tr("Rotate"), this); + mRotateAction->setIcon(QIcon(":/Qt/resources/rotate.png")); + mRotateAction->setStatusTip(tr("Rotate the view")); + + + // Create actions mDrawCantileverAction = new QAction(tr("Draw Cantilever"), this); mDrawCantileverAction->setIcon(QIcon(":/Qt/resources/torus.png")); mDrawCantileverAction->setStatusTip(tr("Draw Cantilever")); connect(mDrawCantileverAction, SIGNAL(triggered()), this, SLOT(drawCantilever())); + //Help actions mAboutAction = new QAction(tr("About"), this); mAboutAction->setStatusTip(tr("About the application")); - mAboutAction->setIcon(QIcon(":/Qt/resources/lamp.png")); + mAboutAction->setIcon(QIcon(":/Qt/resources/about.png")); connect(mAboutAction, SIGNAL(triggered()), this, SLOT(about())); connect(myOccViewer, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged())); @@ -126,6 +146,11 @@ void StartWindow::createToolBars(void) { mFileToolBar = addToolBar(tr("&File")); mFileToolBar->addAction(mReadSTLAction); + mViewToolBar = addToolBar(tr("View")); + mViewToolBar->addAction(mPanAction); + mViewToolBar->addAction(mZoomAction); + mViewToolBar->addAction(mFitAllAction); + mViewToolBar->addAction(mRotateAction); mHelpToolBar = addToolBar(tr("Help")); mHelpToolBar->addAction(mAboutAction); } diff --git a/src/Qt/StartWindow.h b/src/Qt/StartWindow.h index 06115ef..5e15261 100644 --- a/src/Qt/StartWindow.h +++ b/src/Qt/StartWindow.h @@ -68,12 +68,19 @@ private slots: QAction* mReadSTLAction; QAction* mDrawCantileverAction; + //! View action + QAction* mPanAction; + QAction* mZoomAction; + QAction* mFitAllAction; + QAction* mRotateAction; + //! the menus of the application. QMenu* mFileMenu; QMenu* mCreateMenu; QMenu* mHelpMenu; QToolBar* mFileToolBar; + QToolBar* mViewToolBar; QToolBar* mHelpToolBar; // wrapped the widget for occ. diff --git a/src/Qt/resources/FitAll.png b/src/Qt/resources/FitAll.png index cbcae68..0178ff1 100644 Binary files a/src/Qt/resources/FitAll.png and b/src/Qt/resources/FitAll.png differ diff --git a/src/Qt/resources/Home.png b/src/Qt/resources/Home.png deleted file mode 100644 index 439e362..0000000 Binary files a/src/Qt/resources/Home.png and /dev/null differ diff --git a/src/Qt/resources/Pan.png b/src/Qt/resources/Pan.png index 3cc2269..b74d270 100644 Binary files a/src/Qt/resources/Pan.png and b/src/Qt/resources/Pan.png differ diff --git a/src/Qt/resources/Rotate.png b/src/Qt/resources/Rotate.png index 81e12c5..1911cdf 100644 Binary files a/src/Qt/resources/Rotate.png and b/src/Qt/resources/Rotate.png differ diff --git a/src/Qt/resources/STACCATO.png b/src/Qt/resources/STACCATO.png new file mode 100644 index 0000000..089bd4d Binary files /dev/null and b/src/Qt/resources/STACCATO.png differ diff --git a/src/Qt/resources/Zoom.png b/src/Qt/resources/Zoom.png index 9b4cdf1..5d67721 100644 Binary files a/src/Qt/resources/Zoom.png and b/src/Qt/resources/Zoom.png differ diff --git a/src/Qt/resources/about.png b/src/Qt/resources/about.png new file mode 100644 index 0000000..d948ee0 Binary files /dev/null and b/src/Qt/resources/about.png differ diff --git a/src/Qt/resources/box.png b/src/Qt/resources/box.png deleted file mode 100644 index ea6a2eb..0000000 Binary files a/src/Qt/resources/box.png and /dev/null differ diff --git a/src/Qt/resources/chamfer.png b/src/Qt/resources/chamfer.png deleted file mode 100644 index 8f53a7f..0000000 Binary files a/src/Qt/resources/chamfer.png and /dev/null differ diff --git a/src/Qt/resources/close.png b/src/Qt/resources/close.png deleted file mode 100644 index bc2d117..0000000 Binary files a/src/Qt/resources/close.png and /dev/null differ diff --git a/src/Qt/resources/closeDoc.png b/src/Qt/resources/closeDoc.png new file mode 100644 index 0000000..518cedc Binary files /dev/null and b/src/Qt/resources/closeDoc.png differ diff --git a/src/Qt/resources/common.png b/src/Qt/resources/common.png deleted file mode 100644 index 4661faa..0000000 Binary files a/src/Qt/resources/common.png and /dev/null differ diff --git a/src/Qt/resources/cone.png b/src/Qt/resources/cone.png deleted file mode 100644 index dfd3f5f..0000000 Binary files a/src/Qt/resources/cone.png and /dev/null differ diff --git a/src/Qt/resources/cut.png b/src/Qt/resources/cut.png deleted file mode 100644 index 0a6b2bb..0000000 Binary files a/src/Qt/resources/cut.png and /dev/null differ diff --git a/src/Qt/resources/cylinder.png b/src/Qt/resources/cylinder.png deleted file mode 100644 index 2754492..0000000 Binary files a/src/Qt/resources/cylinder.png and /dev/null differ diff --git a/src/Qt/resources/extrude.png b/src/Qt/resources/extrude.png deleted file mode 100644 index 8ecf830..0000000 Binary files a/src/Qt/resources/extrude.png and /dev/null differ diff --git a/src/Qt/resources/fillet.png b/src/Qt/resources/fillet.png deleted file mode 100644 index 3d1afa4..0000000 Binary files a/src/Qt/resources/fillet.png and /dev/null differ diff --git a/src/Qt/resources/fuse.png b/src/Qt/resources/fuse.png deleted file mode 100644 index ceca822..0000000 Binary files a/src/Qt/resources/fuse.png and /dev/null differ diff --git a/src/Qt/resources/helix.png b/src/Qt/resources/helix.png deleted file mode 100644 index 5c4a418..0000000 Binary files a/src/Qt/resources/helix.png and /dev/null differ diff --git a/src/Qt/resources/lamp.png b/src/Qt/resources/lamp.png deleted file mode 100644 index 4b86dbf..0000000 Binary files a/src/Qt/resources/lamp.png and /dev/null differ diff --git a/src/Qt/resources/loft.png b/src/Qt/resources/loft.png deleted file mode 100644 index d87ea1a..0000000 Binary files a/src/Qt/resources/loft.png and /dev/null differ diff --git a/src/Qt/resources/openDoc.png b/src/Qt/resources/openDoc.png new file mode 100644 index 0000000..3f8b0db Binary files /dev/null and b/src/Qt/resources/openDoc.png differ diff --git a/src/Qt/resources/revolve.png b/src/Qt/resources/revolve.png deleted file mode 100644 index 5f8f9b1..0000000 Binary files a/src/Qt/resources/revolve.png and /dev/null differ diff --git a/src/Qt/resources/sphere.png b/src/Qt/resources/sphere.png deleted file mode 100644 index 6b85a2b..0000000 Binary files a/src/Qt/resources/sphere.png and /dev/null differ diff --git a/src/Qt/resources/torus.png b/src/Qt/resources/torus.png deleted file mode 100644 index a038688..0000000 Binary files a/src/Qt/resources/torus.png and /dev/null differ diff --git a/src/Qt/resources/wedge.png b/src/Qt/resources/wedge.png deleted file mode 100644 index f0b705c..0000000 Binary files a/src/Qt/resources/wedge.png and /dev/null differ diff --git a/src/resources.qrc b/src/resources.qrc index b130e70..babb74d 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -1,25 +1,13 @@ - Qt/resources/FitAll.png - Qt/resources/Home.png - Qt/resources/Pan.png - Qt/resources/Rotate.png - Qt/resources/Zoom.png + Qt/resources/fitAll.png + Qt/resources/pan.png + Qt/resources/rotate.png + Qt/resources/zoom.png Qt/resources/cone.png - Qt/resources/cylinder.png - Qt/resources/sphere.png - Qt/resources/box.png - Qt/resources/torus.png - Qt/resources/chamfer.png - Qt/resources/fillet.png - Qt/resources/lamp.png - Qt/resources/common.png - Qt/resources/close.png - Qt/resources/cut.png - Qt/resources/fuse.png - Qt/resources/extrude.png - Qt/resources/loft.png - Qt/resources/revolve.png - Qt/resources/helix.png + Qt/resources/closeDoc.png + Qt/resources/openDoc.png + Qt/resources/STACCATO.png + Qt/resources/about.png diff --git a/src/tools/AuxiliaryParameters.h b/src/tools/AuxiliaryParameters.h index 038fbef..1a2db2b 100644 --- a/src/tools/AuxiliaryParameters.h +++ b/src/tools/AuxiliaryParameters.h @@ -1,52 +1,52 @@ -/* Copyright © 2016, Dr. Stefan Sicklinger, Munich \n - * - * All rights reserved. - * - * This file is part of STACCATO. - * - * STACCATO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * STACCATO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with STACCATO. If not, see http://www.gnu.org/licenses/. - */ -/***********************************************************************************************//** - * \file AuxiliaryParameters.h - * This file holds the class of AuxiliaryParameters. - * \date 4/2/2016 - **************************************************************************************************/ -#ifndef AUXILIARYPARAMETERS_H_ -#define AUXILIARYPARAMETERS_H_ -#include - -namespace STACCATO { -/********//** - * \brief Class AuxiliaryParameters provides a central place for STACCATO wide parameters - ***********/ -class AuxiliaryParameters { -public: - /// How many threads are used for MKL thread parallel routines - static const int mklSetNumThreads; - - /// How many threads are used for mortar mapper thread parallel routines - static const int mapperSetNumThreads; - - /// Machine epsilon (the difference between 1 and the least value greater than 1 that is representable). - static const double machineEpsilon; - - /// Git hash is determined during configure by cmake - static const std::string gitSHA1; - - /// Git tag is determined during configure by cmake - static const std::string gitTAG; -}; - -} /* namespace STACCATO */ -#endif /* AUXILIARYFUNCTIONS_H_ */ +/* Copyright © 2016, Dr. Stefan Sicklinger, Munich \n + * + * All rights reserved. + * + * This file is part of STACCATO. + * + * STACCATO is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * STACCATO is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with STACCATO. If not, see http://www.gnu.org/licenses/. + */ +/***********************************************************************************************//** + * \file AuxiliaryParameters.h + * This file holds the class of AuxiliaryParameters. + * \date 4/2/2016 + **************************************************************************************************/ +#ifndef AUXILIARYPARAMETERS_H_ +#define AUXILIARYPARAMETERS_H_ +#include + +namespace STACCATO { +/********//** + * \brief Class AuxiliaryParameters provides a central place for STACCATO wide parameters + ***********/ +class AuxiliaryParameters { +public: + /// How many threads are used for MKL thread parallel routines + static const int mklSetNumThreads; + + /// How many threads are used for mortar mapper thread parallel routines + static const int mapperSetNumThreads; + + /// Machine epsilon (the difference between 1 and the least value greater than 1 that is representable). + static const double machineEpsilon; + + /// Git hash is determined during configure by cmake + static const std::string gitSHA1; + + /// Git tag is determined during configure by cmake + static const std::string gitTAG; +}; + +} /* namespace STACCATO */ +#endif /* AUXILIARYFUNCTIONS_H_ */