|
@@ -345,11 +345,19 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
switch (tools[i]) {
|
|
|
case TOOL_BREAK:
|
|
|
+ if (flag.combine->answer && (otype & GV_BOUNDARY)) {
|
|
|
+ G_message(_("Tool: Split boundaries"));
|
|
|
+ split_lines(&Out, GV_BOUNDARY, pErr);
|
|
|
+ }
|
|
|
G_message(_("Tool: Break lines at intersections"));
|
|
|
Vect_break_lines(&Out, otype, pErr);
|
|
|
if (flag.combine->answer) {
|
|
|
G_message(_("Tool: Remove duplicates"));
|
|
|
Vect_remove_duplicates(&Out, otype, pErr);
|
|
|
+ if (otype & GV_BOUNDARY) {
|
|
|
+ G_message(_("Tool: Merge boundaries"));
|
|
|
+ Vect_merge_lines(&Out, GV_BOUNDARY, NULL, pErr);
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
case TOOL_RMDUPL:
|
|
@@ -382,6 +390,10 @@ int main(int argc, char *argv[])
|
|
|
if (flag.combine->answer) {
|
|
|
int nmod;
|
|
|
|
|
|
+ if (otype & GV_BOUNDARY) {
|
|
|
+ G_message(_("Tool: Split boundaries"));
|
|
|
+ split_lines(&Out, GV_BOUNDARY, pErr);
|
|
|
+ }
|
|
|
do {
|
|
|
G_message(_("Tool: Break lines at intersections"));
|
|
|
Vect_break_lines(&Out, otype, pErr);
|
|
@@ -391,6 +403,10 @@ int main(int argc, char *argv[])
|
|
|
nmod =
|
|
|
Vect_clean_small_angles_at_nodes(&Out, otype, pErr);
|
|
|
} while (nmod > 0);
|
|
|
+ if (otype & GV_BOUNDARY) {
|
|
|
+ G_message(_("Tool: Merge boundaries"));
|
|
|
+ Vect_merge_lines(&Out, GV_BOUNDARY, NULL, pErr);
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
case TOOL_BPOL:
|
|
@@ -419,6 +435,10 @@ int main(int argc, char *argv[])
|
|
|
else {
|
|
|
int nmod;
|
|
|
|
|
|
+ if (otype & GV_BOUNDARY) {
|
|
|
+ G_message(_("Tool: Split boundaries"));
|
|
|
+ split_lines(&Out, GV_BOUNDARY, pErr);
|
|
|
+ }
|
|
|
while ((nmod =
|
|
|
Vect_clean_small_angles_at_nodes(&Out, otype, pErr)) > 0) {
|
|
|
count += nmod;
|
|
@@ -428,6 +448,10 @@ int main(int argc, char *argv[])
|
|
|
Vect_remove_duplicates(&Out, otype, pErr);
|
|
|
G_message(_("Tool: Remove small angles at nodes"));
|
|
|
}
|
|
|
+ if (otype & GV_BOUNDARY) {
|
|
|
+ G_message(_("Tool: Merge boundaries"));
|
|
|
+ Vect_merge_lines(&Out, GV_BOUNDARY, NULL, pErr);
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
case TOOL_RMLINE:
|