mirror of https://github.com/CGAL/cgal
Added item in dropdown for selected edges +
Fixed logic tautology when selecting edges before mesh
This commit is contained in:
parent
8a4b492f1c
commit
f324943fba
|
|
@ -368,9 +368,9 @@ std::optional<QString> Mesh_3_plugin::get_items_or_return_error_string() const
|
||||||
{
|
{
|
||||||
auto poly_items_ptr = std::get_if<Polyhedral_mesh_items>(&items.value());
|
auto poly_items_ptr = std::get_if<Polyhedral_mesh_items>(&items.value());
|
||||||
auto image_items_ptr = std::get_if<Image_mesh_items>(&items.value());
|
auto image_items_ptr = std::get_if<Image_mesh_items>(&items.value());
|
||||||
if(poly_items_ptr && poly_items_ptr == nullptr)
|
if(poly_items_ptr != nullptr)
|
||||||
poly_items_ptr->polylines_item = polylines_item;
|
poly_items_ptr->polylines_item = polylines_item;
|
||||||
else if(image_items_ptr && image_items_ptr == nullptr)
|
else if(image_items_ptr != nullptr )
|
||||||
image_items_ptr->polylines_item = polylines_item;
|
image_items_ptr->polylines_item = polylines_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -663,6 +663,8 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
ui.protectEdges->addItem(boundary_only.first, v(boundary_only.second));
|
ui.protectEdges->addItem(boundary_only.first, v(boundary_only.second));
|
||||||
} else
|
} else
|
||||||
ui.protectEdges->addItem(sharp_edges.first, v(sharp_edges.second));
|
ui.protectEdges->addItem(sharp_edges.first, v(sharp_edges.second));
|
||||||
|
if (polylines_item != nullptr)
|
||||||
|
ui.protectEdges->addItem(input_polylines.first, v(input_polylines.second));
|
||||||
} else if (items->index() == IMAGE_MESH_ITEMS) {
|
} else if (items->index() == IMAGE_MESH_ITEMS) {
|
||||||
if (polylines_item != nullptr) {
|
if (polylines_item != nullptr) {
|
||||||
ui.protectEdges->addItem(input_polylines.first, QVariant::fromValue(input_polylines.second));
|
ui.protectEdges->addItem(input_polylines.first, QVariant::fromValue(input_polylines.second));
|
||||||
|
|
@ -729,6 +731,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
const auto pe_flags = ui.protectEdges->currentData().value<Protection_flags>();
|
const auto pe_flags = ui.protectEdges->currentData().value<Protection_flags>();
|
||||||
protect_borders = ui.protect->isChecked() && pe_flags.testFlag(BORDERS);
|
protect_borders = ui.protect->isChecked() && pe_flags.testFlag(BORDERS);
|
||||||
protect_features = ui.protect->isChecked() && pe_flags.testFlag(FEATURES);
|
protect_features = ui.protect->isChecked() && pe_flags.testFlag(FEATURES);
|
||||||
|
const bool protect_polylines = ui.protect->isChecked() && polylines_item != nullptr;
|
||||||
|
|
||||||
const bool detect_connected_components = ui.detectComponents->isChecked();
|
const bool detect_connected_components = ui.detectComponents->isChecked();
|
||||||
const int manifold = (ui.manifoldCheckBox->isChecked() ? 1 : 0) +
|
const int manifold = (ui.manifoldCheckBox->isChecked() ? 1 : 0) +
|
||||||
|
|
@ -811,7 +814,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
{
|
{
|
||||||
thread = cgal_code_mesh_3(
|
thread = cgal_code_mesh_3(
|
||||||
polyhedrons,
|
polyhedrons,
|
||||||
(polylines_item == nullptr) ? plc : polylines_item->polylines,
|
protect_polylines ? polylines_item->polylines : plc,
|
||||||
bounding_polyhedron,
|
bounding_polyhedron,
|
||||||
item_name,
|
item_name,
|
||||||
angle,
|
angle,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue