chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
distort-stl: break out sprintf_triangle (nfc)
[reprap-play.git]
/
distort-stl
diff --git
a/distort-stl
b/distort-stl
index 844344cdb0c1a1f09a80e3ea9fe61fa168507c36..722e4faf6c2c750152b846a1ca1f1f7fc0d6a106 100755
(executable)
--- a/
distort-stl
+++ b/
distort-stl
@@
-44,10
+44,10
@@
sub shift_arg () {
#no warnings qw(recursion);
#no warnings qw(recursion);
-sub
maybe_subdivide_triangle ($$$
$) {
- my ($t
, $ok, $changed, $edge_need_subdivide_fn
) = @_;
+sub
sprintf_triangle (
$) {
+ my ($t) = @_;
- printf STDERR
+ sprintf
"%11.6f,%11.6f,%11.6f / ".
"%11.6f,%11.6f,%11.6f / ".
"%11.6f,%11.6f,%11.6f %-40s ",
"%11.6f,%11.6f,%11.6f / ".
"%11.6f,%11.6f,%11.6f / ".
"%11.6f,%11.6f,%11.6f %-40s ",
@@
-55,6
+55,12
@@
sub maybe_subdivide_triangle ($$$$) {
$t->[1][0], $t->[1][1], $t->[1][2],
$t->[2][0], $t->[2][1], $t->[2][2],
$t->[3];
$t->[1][0], $t->[1][1], $t->[1][2],
$t->[2][0], $t->[2][1], $t->[2][2],
$t->[3];
+}
+
+sub maybe_subdivide_triangle ($$$$) {
+ my ($t, $ok, $changed, $edge_need_subdivide_fn) = @_;
+
+ print STDERR sprintf_triangle $t;
foreach my $ix (0..2) {
my $jx = ($ix+1) % 3;
foreach my $ix (0..2) {
my $jx = ($ix+1) % 3;