mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 08:25:31 +02:00
cameo/zstack.pl: output one point at (x, y, z0) to set reference level
Otherwise, gp2rml will eliminate any offset. (x, y) is an arbitrary point from the toolpaths.
This commit is contained in:
parent
e82667e680
commit
033d55c8ad
@ -54,7 +54,11 @@ while (<>) {
|
|||||||
$z{$z} .= "$s\n";
|
$z{$z} .= "$s\n";
|
||||||
undef $s;
|
undef $s;
|
||||||
}
|
}
|
||||||
$z = $3 if /^-?\d+(\.\d*)?\s+-?\d+(\.\d*)?\s+(-?\d+(\.\d*)?)/;
|
if (/^-?\d+(\.\d*)?\s+-?\d+(\.\d*)?\s+(-?\d+(\.\d*)?)/) {
|
||||||
|
$x = $1 unless defined $x;
|
||||||
|
$y = $2 unless defined $y;
|
||||||
|
$z = $3;
|
||||||
|
}
|
||||||
$s .= $_;
|
$s .= $_;
|
||||||
$zmax = $z if $z > $zmax || !defined $zmax;
|
$zmax = $z if $z > $zmax || !defined $zmax;
|
||||||
}
|
}
|
||||||
@ -68,6 +72,8 @@ if ($reverse) {
|
|||||||
%z = %t;
|
%z = %t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "$x $y $z0\n\n";
|
||||||
|
|
||||||
$z = $z0;
|
$z = $z0;
|
||||||
for $c (sort { $b <=> $a } keys %z) {
|
for $c (sort { $b <=> $a } keys %z) {
|
||||||
while ($z > $c+$zs) {
|
while ($z > $c+$zs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user