Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/remi/fork_release'
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jul 26, 2018
2 parents 21f56f6 + ee9ce18 commit 7ede02e
Show file tree
Hide file tree
Showing 23 changed files with 178 additions and 117 deletions.
49 changes: 26 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_Q: Oh cool, a new RepRap slicer?_
_Q: Oh cool, a new fork of slic3r?_

A: Yes.

Slic3r
======
Prebuilt Windows, OSX and Linux binaries are available through the [git releases page](https://github.com/prusa3d/Slic3r/releases).
Prebuilt Windows 32b is available through the [git releases page](https://github.com/supermerill/Slic3r/releases).

<img width=256 src=https://cloud.githubusercontent.com/assets/31754/22719818/09998c92-ed6d-11e6-9fa0-09de638f3a36.png />

Expand All @@ -18,14 +18,20 @@ See the [project homepage](http://slic3r.org/) at slic3r.org and the

### What language is it written in?

The core geometric algorithms and data structures are written in C++,
and Perl is used for high-level flow abstraction, GUI and testing.
If you're wondering why Perl, see https://xkcd.com/224/
Almost everything are written in C++,
Perl is used a bit but the prusa fork is getting rid of it (unless for scripting, maybe).

The C++ API is public and its use in other projects is encouraged.
The goal is to make Slic3r fully modular so that any part of its logic
can be used separately.

### What are this fork main features/differences?

* **Ironing** top surface & many new settings to fine-tune the top surface quality.
* A denser infill option for 1-X layers before the top solid layers to better support them.
* Better overhangs (add perimeters if needed, slice them in opposite direction each layer).
* Better Thin walls (anchored inside the print, no more random bits at the ends).

### What are Slic3r's main features?

Key features are:
Expand All @@ -41,12 +47,12 @@ Key features are:

Other major features are:

* combine infill every 'n' perimeters layer to speed up printing
* combine infill every 'n' perimeters layer & varying density to speed up printing
* **3D preview** (including multi-material files)
* **multiple layer heights** in a single print
* **spiral vase** mode for bumpless vases
* fine-grained configuration of speed, acceleration, extrusion width
* several infill patterns including honeycomb, spirals, Hilbert curves
* several infill patterns including honeycomb, spirals, Hilbert curves, gyroid
* support material, raft, brim, skirt
* **standby temperature** and automatic wiping for multi-extruder printing
* customizable **G-code macros** and output filename with variable placeholders
Expand All @@ -55,39 +61,34 @@ Other major features are:

### How to install?

You can download a precompiled package from [slic3r.org](http://slic3r.org/);
You can download a precompiled package from the release page.
it will run without the need for any dependency.

If you want to compile the source yourself follow the instructions on one of these wiki pages:
* [Linux](https://github.com/alexrj/Slic3r/wiki/Running-Slic3r-from-git-on-GNU-Linux)
* [Windows](https://github.com/prusa3d/Slic3r/wiki/How-to-compile-Slic3r-Prusa-Edition-on-MS-Windows)
* [Mac OSX](https://github.com/alexrj/Slic3r/wiki/Running-Slic3r-from-git-on-OS-X)
* [Linux](https://github.com/supermerill/Slic3r/tree/master/doc/How%20to%20build%20-%20UNIX.md)
* [Windows](https://github.com/supermerill/Slic3r/tree/master/doc/How%20to%20build%20-%20Windows.md)
* [Mac OSX](https://github.com/supermerill/Slic3r/tree/master/doc/How_to_build_Slic3r.txt)

### Can I help?

Sure! You can do the following to find things that are available to help with:
* [Pull Request Milestone](https://github.com/alexrj/Slic3r/milestone/31)
* Please comment in the related github issue that you are working on it so that other people know.
* Items in the [TODO](https://github.com/alexrj/Slic3r/wiki/TODO) wiki page.
* Please comment in the related github issue that you are working on it so that other people know.
* Drop me a line at [email protected].
* You can also find me (rarely) in #reprap and in #slic3r on [FreeNode](https://webchat.freenode.net) with the nickname _Sound_. Another contributor, _LoH_, is also in both channels.
* Add an [issue](https://github.com/alexrj/Slic3r/issues) to the github tracker if it isn't already present.
* Add an issue to the github tracker if it isn't already present.

Before sending patches and pull requests contact me (preferably through opening a github issue or commenting on an existing, related, issue) to discuss your proposed
changes: this way we'll ensure nobody wastes their time and no conflicts arise
in development.
changes: this way we'll ensure nobody wastes their time and no conflicts arise in development.

### What's Slic3r license?

Slic3r is licensed under the _GNU Affero General Public License, version 3_.
The author is Alessandro Ranellucci.
The first author is Alessandro Ranellucci, and many contributors
Then the he Prusa team
Then Durand remi for this fork

The [Silk icon set](http://www.famfamfam.com/lab/icons/silk/) used in Slic3r is
The [Silk icon set](http://www.famfamfam.com/lab/icons/silk/) used (and modified) in Slic3r is
licensed under the _Creative Commons Attribution 3.0 License_.
The author of the Silk icon set is Mark James.

### How can I invoke slic3r.pl using the command line?
### How can I invoke slic3r.pl using the command line? (not up-to-date yet, use the --help command instead)

Usage: slic3r.pl [ OPTIONS ] [ file.stl ] [ file2.stl ] ...

Expand Down Expand Up @@ -296,6 +297,7 @@ The author of the Silk icon set is Mark James.
--min-fan-speed Minimum fan speed (default: 35%)
--max-fan-speed Maximum fan speed (default: 100%)
--bridge-fan-speed Fan speed to use when bridging (default: 100%)
--top-fan-speed Fan speed to use when printing top layer (default: 100%)
--fan-below-layer-time Enable fan if layer print time is below this approximate number
of seconds (default: 60)
--slowdown-below-layer-time Slow down if layer print time is below this approximate number
Expand Down Expand Up @@ -358,6 +360,7 @@ The author of the Silk icon set is Mark James.
Set a different extrusion width for support material
--infill-overlap Overlap between infill and perimeters (default: 15%)
--bridge-flow-ratio Multiplier for extrusion when bridging (> 0, default: 1)
--over-bridge-flow-ratio Multiplier for extrusion when printing the layer above a bride (> 0, default: 1.15)

Multiple extruder options:
--extruder-offset Offset of each extruder, if firmware doesn't handle the displacement
Expand Down
2 changes: 1 addition & 1 deletion lib/Slic3r.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ BEGIN {
use Config;
use Moo;
my $have_threads = $Config{useithreads} && eval "use threads; use threads::shared; use Thread::Queue; 1";
die "Slic3r Prusa Edition requires working Perl threads.\n" if ! $have_threads;
die "Slic3r++ requires working Perl threads.\n" if ! $have_threads;
die "threads.pm >= 1.96 is required, please update\n" if $threads::VERSION < 1.96;
die "Perl threading is broken with this Moo version: " . $Moo::VERSION . "\n" if $Moo::VERSION == 1.003000;
$debug = 1 if (defined($ENV{'SLIC3R_DEBUGOUT'}) && $ENV{'SLIC3R_DEBUGOUT'} == 1);
Expand Down
2 changes: 1 addition & 1 deletion lib/Slic3r/GUI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ sub OnInit {
my ($self) = @_;

$self->SetAppName('Slic3rPE');
$self->SetAppDisplayName('Slic3r Prusa Edition');
$self->SetAppDisplayName('Slic3r++');
Slic3r::debugf "wxWidgets version %s, Wx version %s\n", &Wx::wxVERSION_STRING, $Wx::VERSION;

# Set the Slic3r data directory at the Slic3r XS module.
Expand Down
4 changes: 2 additions & 2 deletions lib/Slic3r/GUI/MainFrame.pm
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ sub _init_menubar {
$self->_append_menu_item($helpMenu, L("Show &Configuration Folder"), L('Show user configuration folder (datadir)'), sub {
Slic3r::GUI::desktop_open_datadir_folder();
});
$self->_append_menu_item($helpMenu, L("Report an Issue"), L('Report an issue on the Slic3r Prusa Edition'), sub {
Wx::LaunchDefaultBrowser('http://github.com/prusa3d/slic3r/issues/new');
$self->_append_menu_item($helpMenu, L("Report an Issue"), L('Report an issue on the Slic3r++ github'), sub {
Wx::LaunchDefaultBrowser('http://github.com/supermerill/slic3r/issues/new');
});
$self->_append_menu_item($helpMenu, L("&About Slic3r"), L('Show about dialog'), sub {
Slic3r::GUI::about;
Expand Down
2 changes: 1 addition & 1 deletion lib/Slic3r/GUI/SystemInfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use base 'Wx::Dialog';

sub new {
my ($class, %params) = @_;
my $self = $class->SUPER::new($params{parent}, -1, 'Slic3r Prusa Edition - System Information', wxDefaultPosition, [600, 340],
my $self = $class->SUPER::new($params{parent}, -1, 'Slic3r++ - System Information', wxDefaultPosition, [600, 340],
wxDEFAULT_DIALOG_STYLE | wxMAXIMIZE_BOX | wxRESIZE_BORDER);
$self->{text_info} = $params{text_info};

Expand Down
Binary file modified resources/icons/Slic3r-console.ico
Binary file not shown.
Binary file modified resources/icons/Slic3r.ico
Binary file not shown.
Binary file modified resources/icons/Slic3r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icons/Slic3r_128px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icons/Slic3r_192px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icons/Slic3r_192px_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions xs/src/libslic3r/BridgeDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ bool BridgeDetector::detect_angle(double bridge_direction_override)
}

double total_length = 0;
uint32_t nbLines = 0;
double max_length = 0;
{
Lines clipped_lines = intersection_ln(lines, clip_area);
Expand All @@ -125,10 +126,11 @@ bool BridgeDetector::detect_angle(double bridge_direction_override)
double len = line.length();
total_length += len;
max_length = std::max(max_length, len);
nbLines++;
}
}
}
if (total_length == 0.)
if (total_length == 0. || nbLines == 0)
continue;

have_coverage = true;
Expand All @@ -139,6 +141,7 @@ bool BridgeDetector::detect_angle(double bridge_direction_override)
// $directions_coverage{$angle} = sum(map $_->area, @{$self->coverage($angle)}) // 0;
// max length of bridged lines
candidates[i_angle].max_length = max_length;
candidates[i_angle].mean_length = total_length / nbLines;
}

// if no direction produced coverage, then there's no bridge direction
Expand All @@ -149,10 +152,12 @@ bool BridgeDetector::detect_angle(double bridge_direction_override)
std::sort(candidates.begin(), candidates.end());

// if any other direction is within extrusion width of coverage, prefer it if shorter
// shorter = shorter max length, or if in espilon (10) range, the shorter mean length.
// TODO: There are two options here - within width of the angle with most coverage, or within width of the currently perferred?
size_t i_best = 0;
for (size_t i = 1; i < candidates.size() && candidates[i_best].coverage - candidates[i].coverage < this->spacing; ++ i)
if (candidates[i].max_length < candidates[i_best].max_length)
if (candidates[i].max_length < candidates[i_best].max_length ||
(candidates[i].max_length < candidates[i_best].max_length - 10 && candidates[i].mean_length < candidates[i_best].mean_length))
i_best = i;

this->angle = candidates[i_best].angle;
Expand Down
1 change: 1 addition & 0 deletions xs/src/libslic3r/BridgeDetector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class BridgeDetector {
double angle;
double coverage;
double max_length;
double mean_length;
};
public:
// Get possible briging direction candidates.
Expand Down
2 changes: 1 addition & 1 deletion xs/src/libslic3r/Fill/FillGyroid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FillGyroid : public Fill
virtual Fill* clone() const { return new FillGyroid(*this); }

// require bridge flow since most of this pattern hangs in air
virtual bool use_bridge_flow() const { return true; }
virtual bool use_bridge_flow() const { return false; }

protected:
virtual void _fill_surface_single(
Expand Down
12 changes: 7 additions & 5 deletions xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,29 +651,31 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::toolchange_Brim(bool sideOnly, flo
m_wipe_tower_width,
m_wipe_tower_depth);

PrusaMultiMaterial::Writer writer(m_layer_height, m_perimeter_width);
//use first layer width parameter

PrusaMultiMaterial::Writer writer(m_layer_height, m_brim_width);
writer.set_extrusion_flow(m_extrusion_flow * 1.1f)
.set_z(m_z_pos) // Let the writer know the current Z position as a base for Z-hop.
.set_initial_tool(m_current_tool)
.set_rotation(m_wipe_tower_pos, m_wipe_tower_width, m_wipe_tower_depth, m_wipe_tower_rotation_angle)
.append(";-------------------------------------\n"
"; CP WIPE TOWER FIRST LAYER BRIM START\n");

xy initial_position = wipeTower_box.lu - xy(m_perimeter_width * 6.f, 0);
xy initial_position = wipeTower_box.lu - xy(m_brim_width * 6.f, 0);
writer.set_initial_position(initial_position);

writer.extrude_explicit(wipeTower_box.ld - xy(m_perimeter_width * 6.f, 0), // Prime the extruder left of the wipe tower.
writer.extrude_explicit(wipeTower_box.ld - xy(m_brim_width * 6.f, 0), // Prime the extruder left of the wipe tower.
1.5f * m_extrusion_flow * (wipeTower_box.lu.y - wipeTower_box.ld.y), 2400);

// The tool is supposed to be active and primed at the time when the wipe tower brim is extruded.
// Extrude 4 rounds of a brim around the future wipe tower.
box_coordinates box(wipeTower_box);
box.expand(m_perimeter_width);
box.expand(m_brim_width);
for (size_t i = 0; i < 4; ++ i) {
writer.travel (box.ld, 7000)
.extrude(box.lu, 2100).extrude(box.ru)
.extrude(box.rd ).extrude(box.ld);
box.expand(m_perimeter_width);
box.expand(m_brim_width);
}

writer.travel(wipeTower_box.ld, 7000); // Move to the front left corner.
Expand Down
8 changes: 5 additions & 3 deletions xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class WipeTowerPrusaMM : public WipeTower
// wipe_area -- space available for one toolchange in mm
WipeTowerPrusaMM(float x, float y, float width, float rotation_angle, float cooling_tube_retraction,
float cooling_tube_length, float parking_pos_retraction, float extra_loading_move, float bridging,
const std::vector<std::vector<float>>& wiping_matrix, unsigned int initial_tool) :
const std::vector<std::vector<float>>& wiping_matrix, unsigned int initial_tool, float first_layer_width) :
m_wipe_tower_pos(x, y),
m_wipe_tower_width(width),
m_wipe_tower_rotation_angle(rotation_angle),
Expand All @@ -58,7 +58,8 @@ class WipeTowerPrusaMM : public WipeTower
m_extra_loading_move(extra_loading_move),
m_bridging(bridging),
m_current_tool(initial_tool),
wipe_volumes(wiping_matrix)
wipe_volumes(wiping_matrix),
m_brim_width(first_layer_width)
{}

virtual ~WipeTowerPrusaMM() {}
Expand Down Expand Up @@ -204,7 +205,8 @@ class WipeTowerPrusaMM : public WipeTower
float m_bridging = 0.f;
bool m_adhesion = true;

float m_perimeter_width = 0.4 * Width_To_Nozzle_Ratio; // Width of an extrusion line, also a perimeter spacing for 100% infill.
float m_perimeter_width = 0.4 * Width_To_Nozzle_Ratio; // Width of an extrusion line, also a perimeter spacing for 100% infill.
float m_brim_width = 0.4 * Width_To_Nozzle_Ratio * Width_To_Nozzle_Ratio; // Width of an extrusion line, also a perimeter spacing for 100% infill.
float m_extrusion_flow = 0.038; //0.029f;// Extrusion flow is derived from m_perimeter_width, layer height and filament diameter.


Expand Down
2 changes: 1 addition & 1 deletion xs/src/libslic3r/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ void Print::_make_wipe_tower()
float(this->config.wipe_tower_rotation_angle.value), float(this->config.cooling_tube_retraction.value),
float(this->config.cooling_tube_length.value), float(this->config.parking_pos_retraction.value),
float(this->config.extra_loading_move.value), float(this->config.wipe_tower_bridging), wipe_volumes,
m_tool_ordering.first_extruder());
m_tool_ordering.first_extruder(), float(this->config.first_layer_extrusion_width));

//wipe_tower.set_retract();
//wipe_tower.set_zhop();
Expand Down
Loading

0 comments on commit 7ede02e

Please sign in to comment.