mirror of https://github.com/CGAL/cgal
add edge_min_size in demo
This commit is contained in:
parent
818b08f331
commit
61b4201242
|
|
@ -70,6 +70,7 @@ class Mesh_3_plugin :
|
||||||
READ get_sharp_edges_angle_bound
|
READ get_sharp_edges_angle_bound
|
||||||
WRITE set_sharp_edges_angle_bound)
|
WRITE set_sharp_edges_angle_bound)
|
||||||
Q_PROPERTY(double edges_sizing READ get_edges_sizing WRITE set_edges_sizing)
|
Q_PROPERTY(double edges_sizing READ get_edges_sizing WRITE set_edges_sizing)
|
||||||
|
Q_PROPERTY(double edges_min_sizing READ get_edges_min_sizing WRITE set_edges_min_sizing)
|
||||||
Q_PROPERTY(double facets_sizing READ get_facets_sizing WRITE set_facets_sizing)
|
Q_PROPERTY(double facets_sizing READ get_facets_sizing WRITE set_facets_sizing)
|
||||||
Q_PROPERTY(double approx READ get_approx WRITE set_approx)
|
Q_PROPERTY(double approx READ get_approx WRITE set_approx)
|
||||||
Q_PROPERTY(double tets_sizing READ get_tets_sizing WRITE set_tets_sizing)
|
Q_PROPERTY(double tets_sizing READ get_tets_sizing WRITE set_tets_sizing)
|
||||||
|
|
@ -155,6 +156,7 @@ public Q_SLOTS:
|
||||||
sharp_edges_angle_bound = v;
|
sharp_edges_angle_bound = v;
|
||||||
}
|
}
|
||||||
void set_edges_sizing(const double v) { edges_sizing = v; };
|
void set_edges_sizing(const double v) { edges_sizing = v; };
|
||||||
|
void set_edges_min_sizing(const double v) { edges_min_sizing = v; };
|
||||||
void set_facets_sizing(const double v) { facets_sizing = v; };
|
void set_facets_sizing(const double v) { facets_sizing = v; };
|
||||||
void set_approx(const double v) { approx = v; };
|
void set_approx(const double v) { approx = v; };
|
||||||
void set_tets_sizing(const double v) { tets_sizing = v; };
|
void set_tets_sizing(const double v) { tets_sizing = v; };
|
||||||
|
|
@ -167,6 +169,7 @@ public Q_SLOTS:
|
||||||
double get_angle() { return angle; };
|
double get_angle() { return angle; };
|
||||||
double get_sharp_edges_angle_bound() { return sharp_edges_angle_bound; }
|
double get_sharp_edges_angle_bound() { return sharp_edges_angle_bound; }
|
||||||
double get_edges_sizing() { return edges_sizing; };
|
double get_edges_sizing() { return edges_sizing; };
|
||||||
|
double get_edges_min_sizing() { return edges_min_sizing; };
|
||||||
double get_facets_sizing() { return facets_sizing; };
|
double get_facets_sizing() { return facets_sizing; };
|
||||||
double get_approx() { return approx; };
|
double get_approx() { return approx; };
|
||||||
double get_tets_sizing() { return tets_sizing; };
|
double get_tets_sizing() { return tets_sizing; };
|
||||||
|
|
@ -202,6 +205,7 @@ private:
|
||||||
double approx;
|
double approx;
|
||||||
int approx_decimals;
|
int approx_decimals;
|
||||||
double edges_sizing;
|
double edges_sizing;
|
||||||
|
double edges_min_sizing;
|
||||||
double facets_sizing;
|
double facets_sizing;
|
||||||
double tets_sizing;
|
double tets_sizing;
|
||||||
double tets_shape;
|
double tets_shape;
|
||||||
|
|
@ -396,6 +400,7 @@ void Mesh_3_plugin::set_defaults() {
|
||||||
double diag = CGAL::sqrt((bbox.xmax()-bbox.xmin())*(bbox.xmax()-bbox.xmin()) + (bbox.ymax()-bbox.ymin())*(bbox.ymax()-bbox.ymin()) + (bbox.zmax()-bbox.zmin())*(bbox.zmax()-bbox.zmin()));
|
double diag = CGAL::sqrt((bbox.xmax()-bbox.xmin())*(bbox.xmax()-bbox.xmin()) + (bbox.ymax()-bbox.ymin())*(bbox.ymax()-bbox.ymin()) + (bbox.zmax()-bbox.zmin())*(bbox.zmax()-bbox.zmin()));
|
||||||
facets_sizing = get_approximate(diag * 0.05, 2, sizing_decimals);
|
facets_sizing = get_approximate(diag * 0.05, 2, sizing_decimals);
|
||||||
edges_sizing = facets_sizing;
|
edges_sizing = facets_sizing;
|
||||||
|
edges_min_sizing = 0.1 * facets_sizing;
|
||||||
tets_sizing = facets_sizing;
|
tets_sizing = facets_sizing;
|
||||||
angle = 25.;
|
angle = 25.;
|
||||||
sharp_edges_angle_bound = 60.;
|
sharp_edges_angle_bound = 60.;
|
||||||
|
|
@ -478,6 +483,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
ui.tetShape,
|
ui.tetShape,
|
||||||
SLOT(setEnabled(bool)));
|
SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
|
//edge sizing
|
||||||
connect(ui.protect,
|
connect(ui.protect,
|
||||||
SIGNAL(toggled(bool)),
|
SIGNAL(toggled(bool)),
|
||||||
ui.noEdgeSizing,
|
ui.noEdgeSizing,
|
||||||
|
|
@ -498,6 +504,28 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
ui.edgeSizing,
|
ui.edgeSizing,
|
||||||
SLOT(setEnabled(bool)));
|
SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
|
//edge min sizing
|
||||||
|
connect(ui.protect,
|
||||||
|
SIGNAL(toggled(bool)),
|
||||||
|
ui.noEdgeMinSizing,
|
||||||
|
SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
|
connect(ui.protect,
|
||||||
|
SIGNAL(toggled(bool)),
|
||||||
|
ui.noEdgeMinSizing,
|
||||||
|
SLOT(setChecked(bool)));
|
||||||
|
|
||||||
|
connect(ui.noEdgeMinSizing,
|
||||||
|
SIGNAL(toggled(bool)),
|
||||||
|
ui.edgeMinSizingLabel,
|
||||||
|
SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
|
connect(ui.noEdgeMinSizing,
|
||||||
|
SIGNAL(toggled(bool)),
|
||||||
|
ui.edgeMinSizing,
|
||||||
|
SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
|
//sharp edges
|
||||||
connect(ui.protect,
|
connect(ui.protect,
|
||||||
SIGNAL(toggled(bool)),
|
SIGNAL(toggled(bool)),
|
||||||
ui.sharpEdgesAngle,
|
ui.sharpEdgesAngle,
|
||||||
|
|
@ -531,6 +559,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
diag); // max
|
diag); // max
|
||||||
ui.facetSizing->setValue(facets_sizing);
|
ui.facetSizing->setValue(facets_sizing);
|
||||||
ui.edgeSizing->setValue(edges_sizing);
|
ui.edgeSizing->setValue(edges_sizing);
|
||||||
|
ui.edgeMinSizing->setValue(edges_min_sizing);
|
||||||
|
|
||||||
ui.tetSizing->setRange(diag * 10e-6, // min
|
ui.tetSizing->setRange(diag * 10e-6, // min
|
||||||
diag); // max
|
diag); // max
|
||||||
|
|
@ -568,8 +597,11 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
" automatically"));
|
" automatically"));
|
||||||
}
|
}
|
||||||
ui.noEdgeSizing->setChecked(ui.protect->isChecked());
|
ui.noEdgeSizing->setChecked(ui.protect->isChecked());
|
||||||
|
ui.noEdgeMinSizing->setChecked(false);
|
||||||
ui.edgeLabel->setEnabled(ui.noEdgeSizing->isChecked());
|
ui.edgeLabel->setEnabled(ui.noEdgeSizing->isChecked());
|
||||||
ui.edgeSizing->setEnabled(ui.noEdgeSizing->isChecked());
|
ui.edgeSizing->setEnabled(ui.noEdgeSizing->isChecked());
|
||||||
|
ui.edgeMinSizingLabel->setEnabled(ui.noEdgeMinSizing->isChecked());
|
||||||
|
ui.edgeMinSizing->setEnabled(ui.noEdgeMinSizing->isChecked());
|
||||||
|
|
||||||
if (features_protection_available) {
|
if (features_protection_available) {
|
||||||
if (items->which() == POLYHEDRAL_MESH_ITEMS) {
|
if (items->which() == POLYHEDRAL_MESH_ITEMS) {
|
||||||
|
|
@ -625,6 +657,8 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
std::cerr << "sharp_edges_angle_bound: " << sharp_edges_angle_bound << '\n';
|
std::cerr << "sharp_edges_angle_bound: " << sharp_edges_angle_bound << '\n';
|
||||||
edges_sizing =
|
edges_sizing =
|
||||||
!ui.noEdgeSizing->isChecked() ? DBL_MAX : ui.edgeSizing->value();
|
!ui.noEdgeSizing->isChecked() ? DBL_MAX : ui.edgeSizing->value();
|
||||||
|
edges_min_sizing =
|
||||||
|
!ui.noEdgeMinSizing->isChecked() ? 0. : ui.edgeMinSizing->value();
|
||||||
facets_sizing = !ui.noFacetSizing->isChecked() ? 0 : ui.facetSizing->value();
|
facets_sizing = !ui.noFacetSizing->isChecked() ? 0 : ui.facetSizing->value();
|
||||||
approx = !ui.noApprox->isChecked() ? 0 : ui.approx->value();
|
approx = !ui.noApprox->isChecked() ? 0 : ui.approx->value();
|
||||||
tets_shape = !ui.noTetShape->isChecked() ? 0 : ui.tetShape->value();
|
tets_shape = !ui.noTetShape->isChecked() ? 0 : ui.tetShape->value();
|
||||||
|
|
@ -701,6 +735,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
approx,
|
approx,
|
||||||
tets_sizing,
|
tets_sizing,
|
||||||
edges_sizing,
|
edges_sizing,
|
||||||
|
edges_min_sizing,
|
||||||
tets_shape,
|
tets_shape,
|
||||||
protect_features,
|
protect_features,
|
||||||
protect_borders,
|
protect_borders,
|
||||||
|
|
@ -719,6 +754,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
approx,
|
approx,
|
||||||
tets_sizing,
|
tets_sizing,
|
||||||
edges_sizing,
|
edges_sizing,
|
||||||
|
edges_min_sizing,
|
||||||
tets_shape,
|
tets_shape,
|
||||||
protect_features,
|
protect_features,
|
||||||
protect_borders,
|
protect_borders,
|
||||||
|
|
@ -743,6 +779,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
approx,
|
approx,
|
||||||
tets_sizing,
|
tets_sizing,
|
||||||
edges_sizing,
|
edges_sizing,
|
||||||
|
edges_min_sizing,
|
||||||
tets_shape,
|
tets_shape,
|
||||||
manifold,
|
manifold,
|
||||||
mesh_type == Mesh_type::SURFACE_ONLY);
|
mesh_type == Mesh_type::SURFACE_ONLY);
|
||||||
|
|
@ -779,6 +816,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
|
||||||
approx,
|
approx,
|
||||||
tets_sizing,
|
tets_sizing,
|
||||||
edges_sizing,
|
edges_sizing,
|
||||||
|
edges_min_sizing,
|
||||||
tets_shape,
|
tets_shape,
|
||||||
protect_features,
|
protect_features,
|
||||||
manifold,
|
manifold,
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ Meshing_thread* cgal_code_mesh_3(QList<const SMesh*> pMeshes,
|
||||||
const double facet_approx,
|
const double facet_approx,
|
||||||
const double tet_sizing,
|
const double tet_sizing,
|
||||||
const double edge_size,
|
const double edge_size,
|
||||||
|
const double edge_min_size,
|
||||||
const double tet_shape,
|
const double tet_shape,
|
||||||
bool protect_features,
|
bool protect_features,
|
||||||
bool protect_borders,
|
bool protect_borders,
|
||||||
|
|
@ -52,6 +53,7 @@ Meshing_thread* cgal_code_mesh_3(QList<const SMesh*> pMeshes,
|
||||||
std::cerr << "Meshing file \"" << qPrintable(filename) << "\"\n";
|
std::cerr << "Meshing file \"" << qPrintable(filename) << "\"\n";
|
||||||
std::cerr << " angle: " << facet_angle << std::endl
|
std::cerr << " angle: " << facet_angle << std::endl
|
||||||
<< " edge size bound: " << edge_size << std::endl
|
<< " edge size bound: " << edge_size << std::endl
|
||||||
|
<< " edge min size bound: " << edge_min_size << std::endl
|
||||||
<< " facets size bound: " << facet_sizing << std::endl
|
<< " facets size bound: " << facet_sizing << std::endl
|
||||||
<< " approximation bound: " << facet_approx << std::endl;
|
<< " approximation bound: " << facet_approx << std::endl;
|
||||||
if (!surface_only)
|
if (!surface_only)
|
||||||
|
|
@ -101,10 +103,12 @@ Meshing_thread* cgal_code_mesh_3(QList<const SMesh*> pMeshes,
|
||||||
"<ul>"
|
"<ul>"
|
||||||
"<li>Angle: %1</li>"
|
"<li>Angle: %1</li>"
|
||||||
"<li>Edge size bound: %2</li>"
|
"<li>Edge size bound: %2</li>"
|
||||||
"<li>Facets size bound: %3</li>"
|
"<li>Edge min size bound: %3</li>"
|
||||||
"<li>Approximation bound: %4</li>")
|
"<li>Facets size bound: %4</li>"
|
||||||
|
"<li>Approximation bound: %5</li>")
|
||||||
.arg(facet_angle)
|
.arg(facet_angle)
|
||||||
.arg(edge_size)
|
.arg(edge_size)
|
||||||
|
.arg(edge_min_size)
|
||||||
.arg(facet_sizing)
|
.arg(facet_sizing)
|
||||||
.arg(facet_approx);
|
.arg(facet_approx);
|
||||||
if (!surface_only)
|
if (!surface_only)
|
||||||
|
|
@ -120,6 +124,7 @@ Meshing_thread* cgal_code_mesh_3(QList<const SMesh*> pMeshes,
|
||||||
param.tet_sizing = tet_sizing;
|
param.tet_sizing = tet_sizing;
|
||||||
param.tet_shape = tet_shape;
|
param.tet_shape = tet_shape;
|
||||||
param.edge_sizing = edge_size;
|
param.edge_sizing = edge_size;
|
||||||
|
param.edge_min_sizing = edge_min_size;
|
||||||
param.manifold = manifold;
|
param.manifold = manifold;
|
||||||
param.protect_features = protect_features || protect_borders;
|
param.protect_features = protect_features || protect_borders;
|
||||||
param.use_sizing_field_with_aabb_tree = polylines.empty() && protect_features;
|
param.use_sizing_field_with_aabb_tree = polylines.empty() && protect_features;
|
||||||
|
|
@ -139,6 +144,7 @@ Meshing_thread* cgal_code_mesh_3(const QList<const SMesh*> pMeshes,
|
||||||
const double facet_approx,
|
const double facet_approx,
|
||||||
const double tet_sizing,
|
const double tet_sizing,
|
||||||
const double edge_size,
|
const double edge_size,
|
||||||
|
const double edge_min_size,
|
||||||
const double tet_shape,
|
const double tet_shape,
|
||||||
bool protect_features,
|
bool protect_features,
|
||||||
bool protect_borders,
|
bool protect_borders,
|
||||||
|
|
@ -151,6 +157,7 @@ Meshing_thread* cgal_code_mesh_3(const QList<const SMesh*> pMeshes,
|
||||||
std::cerr << "Meshing file \"" << qPrintable(filename) << "\"\n";
|
std::cerr << "Meshing file \"" << qPrintable(filename) << "\"\n";
|
||||||
std::cerr << " angle: " << facet_angle << std::endl
|
std::cerr << " angle: " << facet_angle << std::endl
|
||||||
<< " edge size bound: " << edge_size << std::endl
|
<< " edge size bound: " << edge_size << std::endl
|
||||||
|
<< " edge min size bound: " << edge_min_size << std::endl
|
||||||
<< " facets size bound: " << facet_sizing << std::endl
|
<< " facets size bound: " << facet_sizing << std::endl
|
||||||
<< " approximation bound: " << facet_approx << std::endl;
|
<< " approximation bound: " << facet_approx << std::endl;
|
||||||
if (!surface_only)
|
if (!surface_only)
|
||||||
|
|
@ -195,10 +202,12 @@ Meshing_thread* cgal_code_mesh_3(const QList<const SMesh*> pMeshes,
|
||||||
"<ul>"
|
"<ul>"
|
||||||
"<li>Angle: %1</li>"
|
"<li>Angle: %1</li>"
|
||||||
"<li>Edge size bound: %2</li>"
|
"<li>Edge size bound: %2</li>"
|
||||||
"<li>Facets size bound: %3</li>"
|
"<li>Edge min size bound :%3</li>"
|
||||||
"<li>Approximation bound: %4</li>")
|
"<li>Facets size bound: %4</li>"
|
||||||
|
"<li>Approximation bound: %5</li>")
|
||||||
.arg(facet_angle)
|
.arg(facet_angle)
|
||||||
.arg(edge_size)
|
.arg(edge_size)
|
||||||
|
.arg(edge_min_size)
|
||||||
.arg(facet_sizing)
|
.arg(facet_sizing)
|
||||||
.arg(facet_approx);
|
.arg(facet_approx);
|
||||||
if (!surface_only)
|
if (!surface_only)
|
||||||
|
|
@ -214,6 +223,7 @@ Meshing_thread* cgal_code_mesh_3(const QList<const SMesh*> pMeshes,
|
||||||
param.tet_sizing = tet_sizing;
|
param.tet_sizing = tet_sizing;
|
||||||
param.tet_shape = tet_shape;
|
param.tet_shape = tet_shape;
|
||||||
param.edge_sizing = edge_size;
|
param.edge_sizing = edge_size;
|
||||||
|
param.edge_min_sizing = edge_min_size;
|
||||||
param.manifold = manifold;
|
param.manifold = manifold;
|
||||||
param.protect_features = protect_features || protect_borders;
|
param.protect_features = protect_features || protect_borders;
|
||||||
param.use_sizing_field_with_aabb_tree = protect_features;
|
param.use_sizing_field_with_aabb_tree = protect_features;
|
||||||
|
|
@ -234,6 +244,7 @@ Meshing_thread* cgal_code_mesh_3(const Implicit_function_interface* pfunction,
|
||||||
const double facet_approx,
|
const double facet_approx,
|
||||||
const double tet_sizing,
|
const double tet_sizing,
|
||||||
const double edge_size,
|
const double edge_size,
|
||||||
|
const double edge_min_size,
|
||||||
const double tet_shape,
|
const double tet_shape,
|
||||||
const int manifold,
|
const int manifold,
|
||||||
const bool surface_only)
|
const bool surface_only)
|
||||||
|
|
@ -263,6 +274,7 @@ Meshing_thread* cgal_code_mesh_3(const Implicit_function_interface* pfunction,
|
||||||
param.tet_sizing = tet_sizing;
|
param.tet_sizing = tet_sizing;
|
||||||
param.tet_shape = tet_shape;
|
param.tet_shape = tet_shape;
|
||||||
param.edge_sizing = edge_size;
|
param.edge_sizing = edge_size;
|
||||||
|
param.edge_min_sizing = edge_min_size;
|
||||||
param.manifold = manifold;
|
param.manifold = manifold;
|
||||||
param.detect_connected_components = false; // to avoid random values
|
param.detect_connected_components = false; // to avoid random values
|
||||||
// in the debug displays
|
// in the debug displays
|
||||||
|
|
@ -290,6 +302,7 @@ Meshing_thread* cgal_code_mesh_3(const Image* pImage,
|
||||||
const double facet_approx,
|
const double facet_approx,
|
||||||
const double tet_sizing,
|
const double tet_sizing,
|
||||||
const double edge_size,
|
const double edge_size,
|
||||||
|
const double edge_min_size,
|
||||||
const double tet_shape,
|
const double tet_shape,
|
||||||
bool protect_features,
|
bool protect_features,
|
||||||
const int manifold,
|
const int manifold,
|
||||||
|
|
@ -314,6 +327,7 @@ Meshing_thread* cgal_code_mesh_3(const Image* pImage,
|
||||||
param.facet_approx = facet_approx;
|
param.facet_approx = facet_approx;
|
||||||
param.tet_sizing = tet_sizing;
|
param.tet_sizing = tet_sizing;
|
||||||
param.edge_sizing = edge_size;
|
param.edge_sizing = edge_size;
|
||||||
|
param.edge_min_sizing = edge_min_size;
|
||||||
param.tet_shape = tet_shape;
|
param.tet_shape = tet_shape;
|
||||||
param.manifold = manifold;
|
param.manifold = manifold;
|
||||||
param.image_3_ptr = pImage;
|
param.image_3_ptr = pImage;
|
||||||
|
|
@ -324,10 +338,12 @@ Meshing_thread* cgal_code_mesh_3(const Image* pImage,
|
||||||
"<ul>"
|
"<ul>"
|
||||||
"<li>Angle: %1</li>"
|
"<li>Angle: %1</li>"
|
||||||
"<li>Edge size bound: %2</li>"
|
"<li>Edge size bound: %2</li>"
|
||||||
"<li>Facets size bound: %3</li>"
|
"<li>Edge min size bound: %3</li>"
|
||||||
"<li>Approximation bound: %4</li>")
|
"<li>Facets size bound: %4</li>"
|
||||||
|
"<li>Approximation bound: %5</li>")
|
||||||
.arg(facet_angle)
|
.arg(facet_angle)
|
||||||
.arg(edge_size)
|
.arg(edge_size)
|
||||||
|
.arg(edge_min_size)
|
||||||
.arg(facet_sizing)
|
.arg(facet_sizing)
|
||||||
.arg(facet_approx);
|
.arg(facet_approx);
|
||||||
if (!surface_only)
|
if (!surface_only)
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ Meshing_thread* cgal_code_mesh_3(QList<const SMesh*> pMeshes,
|
||||||
const double facet_approx,
|
const double facet_approx,
|
||||||
const double tet_sizing,
|
const double tet_sizing,
|
||||||
const double edge_size,
|
const double edge_size,
|
||||||
|
const double edge_min_size,
|
||||||
const double tet_shape,
|
const double tet_shape,
|
||||||
bool protect_features,
|
bool protect_features,
|
||||||
bool protect_border,
|
bool protect_border,
|
||||||
|
|
@ -44,6 +45,7 @@ Meshing_thread* cgal_code_mesh_3(const QList<const SMesh*> pMeshes,
|
||||||
const double facet_approx,
|
const double facet_approx,
|
||||||
const double tet_sizing,
|
const double tet_sizing,
|
||||||
const double edge_size,
|
const double edge_size,
|
||||||
|
const double edge_min_size,
|
||||||
const double tet_shape,
|
const double tet_shape,
|
||||||
bool protect_features,
|
bool protect_features,
|
||||||
bool protect_border,
|
bool protect_border,
|
||||||
|
|
@ -58,6 +60,7 @@ Meshing_thread* cgal_code_mesh_3(const Implicit_function_interface* pfunction,
|
||||||
const double facet_approx,
|
const double facet_approx,
|
||||||
const double tet_sizing,
|
const double tet_sizing,
|
||||||
const double edge_size,
|
const double edge_size,
|
||||||
|
const double edge_min_size,
|
||||||
const double tet_shape,
|
const double tet_shape,
|
||||||
const int manifold,
|
const int manifold,
|
||||||
const bool surface_only);
|
const bool surface_only);
|
||||||
|
|
@ -71,6 +74,7 @@ Meshing_thread* cgal_code_mesh_3(const CGAL::Image_3* pImage,
|
||||||
const double facet_approx,
|
const double facet_approx,
|
||||||
const double tet_sizing,
|
const double tet_sizing,
|
||||||
const double edge_size,
|
const double edge_size,
|
||||||
|
const double edge_min_size,
|
||||||
const double tet_shape,
|
const double tet_shape,
|
||||||
bool protect_features,
|
bool protect_features,
|
||||||
const int manifold,
|
const int manifold,
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ struct Mesh_parameters
|
||||||
double tet_shape;
|
double tet_shape;
|
||||||
double tet_sizing;
|
double tet_sizing;
|
||||||
double edge_sizing;
|
double edge_sizing;
|
||||||
|
double edge_min_sizing;
|
||||||
bool protect_features;
|
bool protect_features;
|
||||||
bool detect_connected_components;
|
bool detect_connected_components;
|
||||||
int manifold;
|
int manifold;
|
||||||
|
|
@ -108,8 +109,8 @@ private:
|
||||||
void initialize(const Mesh_criteria& criteria, Mesh_fnt::Domain_tag);
|
void initialize(const Mesh_criteria& criteria, Mesh_fnt::Domain_tag);
|
||||||
void initialize(const Mesh_criteria& criteria, Mesh_fnt::Labeled_image_domain_tag);
|
void initialize(const Mesh_criteria& criteria, Mesh_fnt::Labeled_image_domain_tag);
|
||||||
|
|
||||||
Edge_criteria edge_criteria(double b, Mesh_fnt::Domain_tag);
|
Edge_criteria edge_criteria(double b, double minb, Mesh_fnt::Domain_tag);
|
||||||
Edge_criteria edge_criteria(double b, Mesh_fnt::Polyhedral_domain_tag);
|
Edge_criteria edge_criteria(double b, double minb, Mesh_fnt::Polyhedral_domain_tag);
|
||||||
|
|
||||||
void tweak_criteria(Mesh_criteria&, Mesh_fnt::Domain_tag) {}
|
void tweak_criteria(Mesh_criteria&, Mesh_fnt::Domain_tag) {}
|
||||||
void tweak_criteria(Mesh_criteria&, Mesh_fnt::Polyhedral_domain_tag);
|
void tweak_criteria(Mesh_criteria&, Mesh_fnt::Polyhedral_domain_tag);
|
||||||
|
|
@ -137,6 +138,7 @@ log() const
|
||||||
{
|
{
|
||||||
return QStringList()
|
return QStringList()
|
||||||
<< QString("edge max size: %1").arg(edge_sizing)
|
<< QString("edge max size: %1").arg(edge_sizing)
|
||||||
|
<< QString("edge min size: %1").arg(edge_min_sizing)
|
||||||
<< QString("facet min angle: %1").arg(facet_angle)
|
<< QString("facet min angle: %1").arg(facet_angle)
|
||||||
<< QString("facet max size: %1").arg(facet_sizing)
|
<< QString("facet max size: %1").arg(facet_sizing)
|
||||||
<< QString("facet approx error: %1").arg(facet_approx)
|
<< QString("facet approx error: %1").arg(facet_approx)
|
||||||
|
|
@ -238,9 +240,9 @@ initialize(const Mesh_criteria& criteria, Mesh_fnt::Domain_tag)
|
||||||
template < typename D_, typename Tag >
|
template < typename D_, typename Tag >
|
||||||
typename Mesh_function<D_,Tag>::Edge_criteria
|
typename Mesh_function<D_,Tag>::Edge_criteria
|
||||||
Mesh_function<D_,Tag>::
|
Mesh_function<D_,Tag>::
|
||||||
edge_criteria(double b, Mesh_fnt::Domain_tag)
|
edge_criteria(double b, double minb, Mesh_fnt::Domain_tag)
|
||||||
{
|
{
|
||||||
return Edge_criteria(b);
|
return Edge_criteria(b, minb);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h>
|
#include <CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h>
|
||||||
|
|
@ -249,7 +251,7 @@ edge_criteria(double b, Mesh_fnt::Domain_tag)
|
||||||
template < typename D_, typename Tag >
|
template < typename D_, typename Tag >
|
||||||
typename Mesh_function<D_,Tag>::Edge_criteria
|
typename Mesh_function<D_,Tag>::Edge_criteria
|
||||||
Mesh_function<D_,Tag>::
|
Mesh_function<D_,Tag>::
|
||||||
edge_criteria(double edge_size, Mesh_fnt::Polyhedral_domain_tag)
|
edge_criteria(double edge_size, double minb, Mesh_fnt::Polyhedral_domain_tag)
|
||||||
{
|
{
|
||||||
if(p_.use_sizing_field_with_aabb_tree) {
|
if(p_.use_sizing_field_with_aabb_tree) {
|
||||||
typedef typename Domain::Surface_patch_index_set Set_of_patch_ids;
|
typedef typename Domain::Surface_patch_index_set Set_of_patch_ids;
|
||||||
|
|
@ -277,9 +279,9 @@ edge_criteria(double edge_size, Mesh_fnt::Polyhedral_domain_tag)
|
||||||
QSharedPointer<Patches_ids_vector>(patches_ids_vector_p));
|
QSharedPointer<Patches_ids_vector>(patches_ids_vector_p));
|
||||||
|
|
||||||
std::cerr << "Note: Mesh_3 is using a sizing field based on AABB tree.\n";
|
std::cerr << "Note: Mesh_3 is using a sizing field based on AABB tree.\n";
|
||||||
return Edge_criteria(*sizing_field_ptr);
|
return Edge_criteria(*sizing_field_ptr, minb);
|
||||||
} else {
|
} else {
|
||||||
return Edge_criteria(edge_size);
|
return Edge_criteria(edge_size, minb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -293,7 +295,9 @@ launch()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Create mesh criteria
|
// Create mesh criteria
|
||||||
Mesh_criteria criteria(edge_criteria(p_.edge_sizing, Tag()),
|
Mesh_criteria criteria(edge_criteria(p_.edge_sizing,
|
||||||
|
p_.edge_min_sizing,
|
||||||
|
Tag()),
|
||||||
Facet_criteria(p_.facet_angle,
|
Facet_criteria(p_.facet_angle,
|
||||||
p_.facet_sizing,
|
p_.facet_sizing,
|
||||||
p_.facet_approx),
|
p_.facet_approx),
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>568</width>
|
<width>780</width>
|
||||||
<height>1049</height>
|
<height>1295</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
|
@ -101,22 +101,15 @@
|
||||||
<string>Sharp features</string>
|
<string>Sharp features</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
|
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
|
||||||
<item row="3" column="1">
|
<item row="7" column="1">
|
||||||
<widget class="DoubleEdit" name="sharpEdgesAngle">
|
<widget class="DoubleEdit" name="edgeSizing">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>60.00</string>
|
<string>0.0</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="1">
|
||||||
<widget class="QCheckBox" name="protect">
|
<widget class="QComboBox" name="protectEdges"/>
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="sharpEdgesAngleLabel">
|
<widget class="QLabel" name="sharpEdgesAngleLabel">
|
||||||
|
|
@ -134,15 +127,22 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="2">
|
<item row="3" column="1">
|
||||||
<widget class="QCheckBox" name="noEdgeSizing">
|
<widget class="DoubleEdit" name="sharpEdgesAngle">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>60.00</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="2">
|
||||||
<widget class="QComboBox" name="protectEdges"/>
|
<widget class="QCheckBox" name="protect">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="protectLabel">
|
<widget class="QLabel" name="protectLabel">
|
||||||
|
|
@ -157,13 +157,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
|
||||||
<widget class="DoubleEdit" name="edgeSizing">
|
|
||||||
<property name="text">
|
|
||||||
<string>0.0</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="edgeLabel">
|
<widget class="QLabel" name="edgeLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
@ -177,6 +170,33 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="7" column="2">
|
||||||
|
<widget class="QCheckBox" name="noEdgeSizing">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="edgeMinSizingLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Edge min size</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="DoubleEdit" name="edgeMinSizing"/>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="2">
|
||||||
|
<widget class="QCheckBox" name="noEdgeMinSizing">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue