Commit 27a9e6fc authored by Mike Kremer's avatar Mike Kremer

Added functions to convert edge selections to features.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12726 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3b103dfe
......@@ -126,9 +126,9 @@ void MeshObjectSelectionPlugin::initializePlugin() {
connect(conversionDialog_->convertButton, SIGNAL(clicked()), this, SLOT(conversionRequested()));
// Fill in combo boxes
conversionDialog_->convertFromBox->addItems(
QString("Vertex Selection;Edge Selection;Halfedge Selection;Face Selection;Handle Region;Modeling Region").split(";"));
QString("Vertex Selection;Edge Selection;Halfedge Selection;Face Selection;Feature Selection;Handle Region;Modeling Region").split(";"));
conversionDialog_->convertToBox->addItems(
QString("Vertex Selection;Edge Selection;Halfedge Selection;Face Selection;Handle Region;Modeling Region").split(";"));
QString("Vertex Selection;Edge Selection;Halfedge Selection;Face Selection;Feature Selection;Handle Region;Modeling Region").split(";"));
}
}
......@@ -675,6 +675,11 @@ void MeshObjectSelectionPlugin::conversionRequested() {
MeshSelection::convertEdgeToFaceSelection(PluginFunctions::triMesh(o_it));
else if(o_it->dataType() == DATA_POLY_MESH)
MeshSelection::convertEdgeToFaceSelection(PluginFunctions::polyMesh(o_it));
} else if (to == "Feature Selection") {
if(o_it->dataType() == DATA_TRIANGLE_MESH)
MeshSelection::convertEdgeToFeatureSelection(PluginFunctions::triMesh(o_it));
else if(o_it->dataType() == DATA_POLY_MESH)
MeshSelection::convertEdgeToFeatureSelection(PluginFunctions::polyMesh(o_it));
} else if (to == "Handle Region") {
if(o_it->dataType() == DATA_TRIANGLE_MESH) {
TriMesh* mesh = PluginFunctions::triMesh(o_it);
......@@ -858,6 +863,21 @@ void MeshObjectSelectionPlugin::conversionRequested() {
if(deselect) {
clearFaceSelection(o_it->id());
}
} else if (from == "Feature Selection") {
if (to == "Edge Selection") {
if(o_it->dataType() == DATA_TRIANGLE_MESH) {
MeshSelection::convertFeatureToEdgeSelection(PluginFunctions::triMesh(o_it));
if (deselect) {
MeshSelection::clearFeatureSelection(PluginFunctions::triMesh(o_it));
}
} else if(o_it->dataType() == DATA_POLY_MESH) {
MeshSelection::convertFeatureToEdgeSelection(PluginFunctions::polyMesh(o_it));
if (deselect) {
MeshSelection::clearFeatureSelection(PluginFunctions::polyMesh(o_it));
}
}
}
} else if (from == "Handle Region") {
std::vector<int> ids = getHandleVertices(o_it->id());
if(to == "Vertex Selection") {
......
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