de-activated insert-points for now
[engrid.git] / src / deletepickedpoint.cpp
blobfc90f19bb59652b95bdcaa7a5bd973a92aae8672
1 //
2 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + +
4 // + This file is part of enGrid. +
5 // + +
6 // + Copyright 2008,2009 Oliver Gloth +
7 // + +
8 // + enGrid is free software: you can redistribute it and/or modify +
9 // + it under the terms of the GNU General Public License as published by +
10 // + the Free Software Foundation, either version 3 of the License, or +
11 // + (at your option) any later version. +
12 // + +
13 // + enGrid is distributed in the hope that it will be useful, +
14 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 // + GNU General Public License for more details. +
17 // + +
18 // + You should have received a copy of the GNU General Public License +
19 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 // + +
21 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24 #include "deletepickedpoint.h"
26 #include <QObject>
27 #include <QVector>
29 #include "guimainwindow.h"
30 #include "egvtkobject.h"
31 #include "geometrytools.h"
32 using namespace GeometryTools;
34 DeletePickedPoint::DeletePickedPoint() : SurfaceOperation()
36 EG_TYPENAME;
37 //Activate undo/redo
38 setQuickSave(true);
41 void DeletePickedPoint::operate()
43 vtkIdType nodeId = GuiMainWindow::pointer()->getPickedPoint();
44 cout<<"You picked "<<nodeId<<endl;
46 int N_newpoints;
47 int N_newcells;
49 vtkIdType id_node;
50 char type;
51 QVector <vtkIdType> PSP;
53 UpdatePotentialSnapPoints(true);
55 QMessageBox msgBox;
56 msgBox.setText("Delete point?");
57 msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
58 switch (msgBox.exec()) {
59 case QMessageBox::Yes:
60 cout<<"yes was clicked"<<endl;
61 // DeletePoint(nodeId,N_newpoints,N_newcells);
62 break;
63 case QMessageBox::No:
64 cout<<"no was clicked"<<endl;
65 id_node=nodeId;
66 cout<<"=== Topological neighbours ==="<<endl;
67 PSP = getPotentialSnapPoints(id_node);
68 cout<<"id_node="<<id_node<<" PSP="<<PSP<<endl;
70 cout<<"=== NODE TYPE ==="<<endl;
71 type = getNodeType(id_node);
72 cout<<"id_node="<<id_node<<" is of type="<<(int)type<<"="<<VertexType2Str(type)<<endl;
74 break;
75 default:
76 // should never be reached
77 break;