diff options
Diffstat (limited to 'dxf2camm.pl')
-rwxr-xr-x | dxf2camm.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dxf2camm.pl b/dxf2camm.pl index 8659dde..ff006da 100755 --- a/dxf2camm.pl +++ b/dxf2camm.pl @@ -832,10 +832,11 @@ sub usage { translate => "Translate everything to this point (\"x,y\")", scale => "Scale everything by this factor", sort => "Sort order: /(left|bottom|right|top)(|-asc|-desc)|box/, comma-separated", + speed => "speed in mm/s (defaults to 300mm/s).", help => "Show this help screen.", ); -@opts = qw(output|o=s offset|off=f offsetless_start! bbox=f ignore_bbox! align_knife! overlap=f raw! relative! epsilon=f shortline=f smallangle=f coarsify=f combine! combine_cycles|cycles! combine_reverse|reverse! translate=s scale=f sort=s help|h|?); +@opts = qw(output|o=s offset|off=f offsetless_start! bbox=f ignore_bbox! align_knife! overlap=f raw! relative! epsilon=f shortline=f smallangle=f coarsify=f combine! combine_cycles|cycles! combine_reverse|reverse! translate=s scale=f sort=s speed=f help|h|?); GetOptions(\%opts,@opts) or usage(2); @@ -844,6 +845,7 @@ usage(2) if @ARGV > 1; $opts{headerfooter} = !$opts{raw}; $opts{offset} *= CAMM::units_per_mm if defined $opts{offset}; $opts{shortline} *= CAMM::units_per_mm if defined $opts{shortline}; +$opts{speed} /= 10 if defined $opts{speed}; $opts{translate} = [split /,/,$opts{translate}] if defined $opts{translate}; # we don't want the bbox to cause negative coordinates. @@ -877,7 +879,7 @@ for (@$paths) { # a path } # We shift everything to [offset,offset] based on bounding box now, since cutting negative coordinates isn't possible anyway. -# TODO: make option to not translate according to bbox. +# DONE: make option to not translate according to bbox. my $input_bbox = $opts{ignore_bbox} ? [0,0,0,0] : bbox_union(compute_bboxes($paths)); |