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: fix for triangle source notation
[reprap-play.git]
/
distort-stl
diff --git
a/distort-stl
b/distort-stl
index d893057b135fe601de0d09725dcf1a89d2c19b16..b5ccb996f43f39860d1f172ccd5d145d39199e1e 100755
(executable)
--- a/
distort-stl
+++ b/
distort-stl
@@
-180,7
+180,7
@@
sub project_cylinder_tri {
my $radius = $project_cylinder_radius;
my @ot;
my $radius = $project_cylinder_radius;
my @ot;
- foreach my $p (@$t) {
+ foreach my $p (@$t
[0..2]
) {
my ($x,$y,$z) = @$p;
my $r = $radius - $y;
my $theta = $x / $radius;
my ($x,$y,$z) = @$p;
my $r = $radius - $y;
my $theta = $x / $radius;
@@
-188,6
+188,7
@@
sub project_cylinder_tri {
-$r * cos($theta),
$z ];
}
-$r * cos($theta),
$z ];
}
+ push @ot, $t->[3].'P';
append_triangle \@ot;
}
append_triangle \@ot;
}
@@
-275,8
+276,8
@@
print "solid distort-stl\n";
foreach my $t (@$triangles) {
print " facet normal 0 0 0\n";
print " outer loop\n";
foreach my $t (@$triangles) {
print " facet normal 0 0 0\n";
print " outer loop\n";
- die unless @$t==
3
;
- foreach my $p (@$t) {
+ die unless @$t==
4
;
+ foreach my $p (@$t
[0..2]
) {
die unless @$p==3;
print " vertex";
printf " %.18g", $_ foreach @$p;
die unless @$p==3;
print " vertex";
printf " %.18g", $_ foreach @$p;