Commit 95cf4074 authored by Sylvain Thery's avatar Sylvain Thery

Merge branch 'master' of cgogn:~cgogn/CGoGN

parents 734ba6e6 b8c1a242
......@@ -14,43 +14,48 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<item row="13" column="1" colspan="2">
<widget class="QPushButton" name="button_accept">
<property name="text">
<string>Position :</string>
<string>Accept</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="3">
<widget class="QComboBox" name="combo_edgeOperation">
<item>
<property name="text">
<string>- select operation -</string>
</property>
</item>
<item>
<property name="text">
<string>Cut edge</string>
</property>
</item>
<item>
<property name="text">
<string>Uncut edge</string>
</property>
</item>
<item>
<property name="text">
<string>Collapse edge</string>
</property>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Operations :</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="3">
<widget class="QComboBox" name="combo_vertexSelector">
<item>
<property name="text">
<string>Flip edge</string>
<string>- select selector -</string>
</property>
</item>
</widget>
</item>
<item row="7" column="3">
<widget class="QPushButton" name="button_applyVertexOperation">
<property name="text">
<string>Apply vertex operation</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="4">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QComboBox" name="combo_edgeSelector">
<item>
<property name="text">
<string>Flip back edge</string>
<string>- select selector -</string>
</property>
</item>
</widget>
......@@ -77,21 +82,6 @@
<string>Add cube</string>
</property>
</item>
<item>
<property name="text">
<string>Fill hole</string>
</property>
</item>
<item>
<property name="text">
<string>Delete connected component</string>
</property>
</item>
<item>
<property name="text">
<string>Revolution</string>
</property>
</item>
<item>
<property name="text">
<string>Merge volumes</string>
......@@ -109,13 +99,6 @@
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Operations :</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
......@@ -123,43 +106,51 @@
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QPushButton" name="button_applyVertexOperation">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Apply vertex operation</string>
<string>Position :</string>
</property>
</widget>
</item>
<item row="10" column="0" colspan="4">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Face selector :</string>
</property>
</widget>
</item>
<item row="12" column="3">
<widget class="QPushButton" name="button_cancel">
<property name="text">
<string>Cancel</string>
<item row="4" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="8" column="3">
<widget class="QPushButton" name="button_applyEdgeOperation">
<property name="text">
<string>Apply edge operation</string>
<item row="0" column="1" colspan="3">
<widget class="QComboBox" name="combo_positionAttribute">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>- select attribute -</string>
</property>
</item>
</widget>
</item>
<item row="12" column="0">
<widget class="QPushButton" name="button_start">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Start</string>
<string>Clicks :</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="QComboBox" name="combo_vertexOperation">
<item row="8" column="0" colspan="3">
<widget class="QComboBox" name="combo_edgeOperation">
<item>
<property name="text">
<string>- select operation -</string>
......@@ -167,66 +158,55 @@
</item>
<item>
<property name="text">
<string>Split vertex</string>
<string>Cut edge</string>
</property>
</item>
<item>
<property name="text">
<string>Delete vertex</string>
<string>Uncut edge</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Edge selector :</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="3">
<widget class="QComboBox" name="combo_vertexSelector">
<item>
<property name="text">
<string>- select selector -</string>
<string>Collapse edge</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QComboBox" name="combo_edgeSelector">
<item>
<property name="text">
<string>- select selector -</string>
<string>Flip edge</string>
</property>
</item>
<item>
<property name="text">
<string>Flip back edge</string>
</property>
</item>
</widget>
</item>
<item row="13" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_6">
<item row="6" column="3">
<widget class="QPushButton" name="button_applyGeneralOperation">
<property name="text">
<string>Clicks :</string>
<string>Apply general operation</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<item row="7" column="0" colspan="3">
<widget class="QComboBox" name="combo_vertexOperation">
<item>
<property name="text">
<string>- select operation -</string>
</property>
</item>
<item>
<property name="text">
<string>Split vertex</string>
</property>
</item>
<item>
<property name="text">
<string>Delete vertex</string>
</property>
</item>
</widget>
</item>
<item row="9" column="3">
......@@ -236,33 +216,25 @@
</property>
</widget>
</item>
<item row="12" column="1" colspan="2">
<widget class="QPushButton" name="button_accept">
<item row="13" column="3">
<widget class="QPushButton" name="button_cancel">
<property name="text">
<string>Accept</string>
<string>Cancel</string>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QPushButton" name="button_applyGeneralOperation">
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Apply general operation</string>
<string>Edge selector :</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="3">
<widget class="QComboBox" name="combo_positionAttribute">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="13" column="0">
<widget class="QPushButton" name="button_start">
<property name="text">
<string>Start</string>
</property>
<item>
<property name="text">
<string>- select attribute -</string>
</property>
</item>
</widget>
</item>
<item row="9" column="0" colspan="3">
......@@ -309,6 +281,13 @@
</item>
</widget>
</item>
<item row="8" column="3">
<widget class="QPushButton" name="button_applyEdgeOperation">
<property name="text">
<string>Apply edge operation</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="3">
<widget class="QComboBox" name="combo_faceSelector">
<item>
......@@ -318,12 +297,18 @@
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Face selector :</string>
<item row="14" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
......
......@@ -83,9 +83,6 @@ protected:
void createEmptyMap();
void createNewFace(MapHandlerGen* mhg);
void addCube(MapHandlerGen* mhg);
void fillHole(MapHandlerGen* mhg);
void deleteCC(MapHandlerGen* mhg);
void revolution(MapHandlerGen* mhg);
void mergeVolumes(MapHandlerGen* mhg);
void splitSurface(MapHandlerGen* mhg);
void extrudeRegion(MapHandlerGen* mhg);
......@@ -112,9 +109,10 @@ protected:
Surface_Modelisation_DockTab* m_dockTab;
QHash<MapHandlerGen*, MapParameters> h_parameterSet;
Utils::Drawer* m_drawer;
bool collect;
std::vector<PFP2::VEC3> collectedVertices;
std::vector<PFP2::VEC3> collectedVertices;
bool collect;
int mapNumber;
};
} // namespace SCHNApps
......
......@@ -4,10 +4,6 @@
#include "ui_surface_modelisation.h"
#include "QString"
//#include "mapHandler.h"
//#include "Utils/drawer.h"
//#include "Topology/map/map2.h"
namespace CGoGN
{
......@@ -44,8 +40,6 @@ private slots:
void edgeSelectorChanged(int index);
void faceSelectorChanged(int index);
//void operationChanged(const QString &text);
void applyGeneralOperationButtonClicked();
void applyVertexOperationButtonClicked();
void applyEdgeOperationButtonClicked();
......
......@@ -16,8 +16,7 @@ Surface_Modelisation_DockTab::Surface_Modelisation_DockTab(SCHNApps* s, Surface_
{
setupUi(this);
generalOperations << "Create empty map" << "Create new face" << "Add cube" << "Fill hole" << "Delete connected component"
<< "Revolution" << "Merge volumes" << "Split surface" << "Extrude region";
generalOperations << "Create empty map" << "Create new face" << "Add cube" << "Merge volumes" << "Split surface" << "Extrude region";
vertexOperations << "Split vertex" << "Delete vertex";
edgeOperations << "Cut edge" << "Uncut edge" << "Collapse edge" << "Flip edge" << "Flip back edge";
faceOperations << "Split face" << "Merge faces" << "Delete face" << "Sew faces" << "Unsew faces" << "Extrude face" << "Extrude face following a path";
......@@ -26,7 +25,6 @@ Surface_Modelisation_DockTab::Surface_Modelisation_DockTab(SCHNApps* s, Surface_
connect(combo_vertexSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(vertexSelectorChanged(int)));
connect(combo_edgeSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(edgeSelectorChanged(int)));
connect(combo_faceSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(faceSelectorChanged(int)));
//connect(combo_operation, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(operationChanged(const QString&)));
connect(button_applyGeneralOperation, SIGNAL(clicked()), this, SLOT(applyGeneralOperationButtonClicked()));
connect(button_applyVertexOperation, SIGNAL(clicked()), this, SLOT(applyVertexOperationButtonClicked()));
connect(button_applyEdgeOperation, SIGNAL(clicked()), this, SLOT(applyEdgeOperationButtonClicked()));
......@@ -162,22 +160,13 @@ void Surface_Modelisation_DockTab::applyGeneralOperationButtonClicked()
case 2: // Add cube
m_plugin->addCube(map);
break;
case 3: // Fill hole
m_plugin->fillHole(map);
break;
case 4: // Delete connected component
m_plugin->deleteCC(map);
break;
case 5: // Revolution
m_plugin->revolution(map);
break;
case 6: // Merge volumes
case 3: // Merge volumes
m_plugin->mergeVolumes(map);
break;
case 7: // Split surface
case 4: // Split surface
m_plugin->splitSurface(map);
break;
case 8 : // Extrude region
case 5: // Extrude region
m_plugin->extrudeRegion(map);
break;
}
......@@ -269,24 +258,6 @@ void Surface_Modelisation_DockTab::applyFaceOperationButtonClicked()
}
}
}
/*
void Surface_Modelisation_DockTab::operationChanged(const QString& text)
{
if(!b_updatingUI)
{
switch(operations.indexOf(text))
{
case 0: // Create empty map
break;
case 1: // Add cube
break;
}
}
}
*/
/* -------------------------------- Clicks -----------------------------------------*/
void Surface_Modelisation_DockTab::startButtonClicked()
......@@ -304,7 +275,6 @@ void Surface_Modelisation_DockTab::cancelButtonClicked()
m_plugin->collect = false;
m_plugin->collectedVertices.clear();
}
/* -------------------------------- Updates -----------------------------------------*/
void Surface_Modelisation_DockTab::updateMapParameters()
......
......@@ -432,7 +432,8 @@ inline void GenericMap::initCell(unsigned int i)
template <unsigned int ORBIT>
void GenericMap::initAllOrbitsEmbedding(bool realloc)
{
assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded") ;
if(!isOrbitEmbedded<ORBIT>())
addEmbedding<ORBIT>() ;
DartMarker mark(*this) ;
for(Dart d = begin(); d != end(); next(d))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment