Still support a minimum angle threshold for quality refinement in the
trangulator wrapper, but this isn't used by the calling layer any more.
This commit is contained in:
parent
fe6ff15206
commit
4ff5acb28c
2 changed files with 8 additions and 4 deletions
|
@ -338,7 +338,7 @@ static void write_out_data(struct triangulateio *out) {
|
||||||
// generates extra nodes for a better triangulation. 2 = second pass
|
// generates extra nodes for a better triangulation. 2 = second pass
|
||||||
// after split/reassem where we don't want any extra nodes generated.
|
// after split/reassem where we don't want any extra nodes generated.
|
||||||
|
|
||||||
int TGTriangle::run_triangulate( const string& angle, const int pass ) {
|
int TGTriangle::run_triangulate( double angle, const int pass ) {
|
||||||
TGPolygon poly;
|
TGPolygon poly;
|
||||||
Point3D p;
|
Point3D p;
|
||||||
struct triangulateio in, out, vorout;
|
struct triangulateio in, out, vorout;
|
||||||
|
@ -491,10 +491,14 @@ int TGTriangle::run_triangulate( const string& angle, const int pass ) {
|
||||||
// use a quality value of 10 (q10) meaning no interior
|
// use a quality value of 10 (q10) meaning no interior
|
||||||
// triangle angles less than 10 degrees
|
// triangle angles less than 10 degrees
|
||||||
// tri_options = "pczAen";
|
// tri_options = "pczAen";
|
||||||
if ( angle == "0" ) {
|
if ( angle < 0.00001 ) {
|
||||||
tri_options = "pczAen";
|
tri_options = "pczAen";
|
||||||
} else {
|
} else {
|
||||||
tri_options = "pczq" + angle + "Aen";
|
char angle_str[256];
|
||||||
|
sprintf( angle_str, "%.2f", angle );
|
||||||
|
tri_options = "pczq";
|
||||||
|
tri_options += angle_str;
|
||||||
|
tri_options += "Aen";
|
||||||
}
|
}
|
||||||
// // string tri_options = "pzAen";
|
// // string tri_options = "pzAen";
|
||||||
// // string tri_options = "pczq15S400Aen";
|
// // string tri_options = "pczq15S400Aen";
|
||||||
|
|
|
@ -91,7 +91,7 @@ public:
|
||||||
// generates extra nodes for a better triangulation. 2 = second
|
// generates extra nodes for a better triangulation. 2 = second
|
||||||
// pass after split/reassem where we don't want any extra nodes
|
// pass after split/reassem where we don't want any extra nodes
|
||||||
// generated.
|
// generated.
|
||||||
int run_triangulate( const string& angle, const int pass );
|
int run_triangulate( double angle, const int pass );
|
||||||
|
|
||||||
inline TGTriNodes get_out_nodes() const { return out_nodes; }
|
inline TGTriNodes get_out_nodes() const { return out_nodes; }
|
||||||
inline size_t get_out_nodes_size() const { return out_nodes.size(); }
|
inline size_t get_out_nodes_size() const { return out_nodes.size(); }
|
||||||
|
|
Loading…
Reference in a new issue