From a311220c19d16ae402531651c73af993871b556c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 2 Oct 2011 11:57:47 +0200 Subject: [PATCH] New build script to install dependencies automatically --- Build.PL | 25 +++++++++++++++++++++++++ MANIFEST | 25 +++++++++++++++++++++++++ README.markdown | 20 ++++++++++++++++---- t/clean_polylines.t | 8 ++++---- 4 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 Build.PL create mode 100644 MANIFEST diff --git a/Build.PL b/Build.PL new file mode 100644 index 000000000..42337b8db --- /dev/null +++ b/Build.PL @@ -0,0 +1,25 @@ +use Module::Build; + +my $build = Module::Build->new( + module_name => 'Slic3r', + dist_abstract => 'STL-to-GCODE translator', + dist_author => 'Alessandro Ranellucci ', + dist_version => '0.1', + license => 'perl', + requires => { + 'CAD::Format::STL' => '0', + 'Getopt::Long' => '0', + 'Math::Clipper' => '1.00', + 'Math::Geometry::Planar' => '0', + 'Moo' => '0', + 'Time::HiRes' => '0', + }, + build_requires => { + 'Test::More' => '0.10', + }, + script_files => ['slic3r.pl'], +); +$build->dispatch('installdeps'); +$build->dispatch('test', verbose => 0); + +$build->create_build_script; diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 000000000..b3ae6257b --- /dev/null +++ b/MANIFEST @@ -0,0 +1,25 @@ +Build.PL +lib/Slic3r.pm +lib/Slic3r/Extruder.pm +lib/Slic3r/ExtrusionLoop.pm +lib/Slic3r/ExtrusionPath.pm +lib/Slic3r/ExtrusionPath/Collection.pm +lib/Slic3r/Fill.pm +lib/Slic3r/Fill/Rectilinear.pm +lib/Slic3r/Geometry.pm +lib/Slic3r/Geometry/DouglasPeucker.pm +lib/Slic3r/Layer.pm +lib/Slic3r/Line.pm +lib/Slic3r/Perimeter.pm +lib/Slic3r/Point.pm +lib/Slic3r/Polyline.pm +lib/Slic3r/Polyline/Closed.pm +lib/Slic3r/Print.pm +lib/Slic3r/STL.pm +lib/Slic3r/Surface.pm +lib/Slic3r/Surface/Collection.pm +lib/Slic3r/SVG.pm +MANIFEST This list of files +README.markdown +slic3r.pl +t/clean_polylines.t diff --git a/README.markdown b/README.markdown index e8e296949..6e656feda 100644 --- a/README.markdown +++ b/README.markdown @@ -27,6 +27,8 @@ Also, http://xkcd.com/224/ Slic3r current features are: +* multi-platform (Linux/Mac/Win); +* easy configuration/calibration; * read binary and ASCII STL files; * generate multiple perimeters (skins); * generate rectilinear fill; @@ -38,24 +40,34 @@ Slic3r current features are: * center print around bed center point; * multiple solid layers near horizontal external surfaces; * ability to scale, rotate and multiply input object; -* use different speed for bottom layer. +* use different speed for bottom layer and perimeters. Roadmap includes the following goals: * output some statistics; * allow the user to customize initial and final GCODE commands; * support material for internal perimeters; -* ability to infill in the direction of bridges; +* detect optimal infill direction for bridges; * cool; * other fill patterns; * nice packaging for cross-platform deployment. ## Is it usable already? -Yes, although its extrusion math needs to be tested. -I need to write a script to install dependencies and to package +Yes! I need to write a script to install dependencies and to package dependency-free executables for main platforms. +## How to install? + +Download the package, open a terminal and cd to its directory. Then type: + + perl Build.PL + +This will install any required dependency. If you want to install slic3r.pl +in your system path, type this as root: + + ./Build install + ## Can I help? Sure! Send patches and/or drop me a line at aar@cpan.org. You can also diff --git a/t/clean_polylines.t b/t/clean_polylines.t index d8f2269b7..e1188d9cf 100644 --- a/t/clean_polylines.t +++ b/t/clean_polylines.t @@ -49,10 +49,10 @@ my $gear = [ ]; $polyline = Slic3r::Polyline::Closed->cast($gear); $polyline->merge_continuous_lines; -diag sprintf "original points: %d\nnew points: %d", scalar(@$gear), scalar(@{$polyline->points}); -ok (@{$polyline->points} < @$gear), 'gear was simplified using merge_continuous_lines'; +note sprintf "original points: %d\nnew points: %d", scalar(@$gear), scalar(@{$polyline->points}); +ok @{$polyline->points} < @$gear, 'gear was simplified using merge_continuous_lines'; my $num_points = scalar @{$polyline->points}; $polyline->cleanup; -diag sprintf "original points: %d\nnew points: %d", $num_points, scalar(@{$polyline->points}); -ok (@{$polyline->points} < $num_points), 'gear was further simplified using Douglas-Peucker'; +note sprintf "original points: %d\nnew points: %d", $num_points, scalar(@{$polyline->points}); +ok @{$polyline->points} < $num_points, 'gear was further simplified using Douglas-Peucker';