Documented the purpose of various perl modules.

Conflicts:

	lib/Slic3r/GUI/3DScene.pm
	lib/Slic3r/GUI/Plater/2DToolpaths.pm
This commit is contained in:
bubnikv 2016-09-14 11:22:41 +02:00 committed by Alessandro Ranellucci
parent 335638a614
commit 9f0523cb53
25 changed files with 83 additions and 2 deletions

View File

@ -20,6 +20,7 @@ sub debugf {
# load threads before Moo as required by it # load threads before Moo as required by it
our $have_threads; our $have_threads;
BEGIN { BEGIN {
# Test, whether the perl was compiled with ithreads support and ithreads actually work.
use Config; use Config;
$have_threads = $Config{useithreads} && eval "use threads; use threads::shared; use Thread::Queue; 1"; $have_threads = $Config{useithreads} && eval "use threads; use threads::shared; use Thread::Queue; 1";
warn "threads.pm >= 1.96 is required, please update\n" if $have_threads && $threads::VERSION < 1.96; warn "threads.pm >= 1.96 is required, please update\n" if $have_threads && $threads::VERSION < 1.96;
@ -27,6 +28,13 @@ BEGIN {
### temporarily disable threads if using the broken Moo version ### temporarily disable threads if using the broken Moo version
use Moo; use Moo;
$have_threads = 0 if $Moo::VERSION == 1.003000; $have_threads = 0 if $Moo::VERSION == 1.003000;
# Disable multi threading completely by an environment value.
# This is useful for debugging as the Perl debugger does not work
# in multi-threaded context at all.
# A good interactive perl debugger is the ActiveState Komodo IDE
# or the EPIC http://www.epic-ide.org/
$have_threads = 0 if (defined($ENV{'SLIC3R_SINGLETHREADED'}) && $ENV{'SLIC3R_SINGLETHREADED'} == 1)
} }
warn "Running Slic3r under Perl 5.16 is neither supported nor recommended\n" warn "Running Slic3r under Perl 5.16 is neither supported nor recommended\n"

View File

@ -1,3 +1,5 @@
# Bed shape dialog
package Slic3r::GUI::2DBed; package Slic3r::GUI::2DBed;
use strict; use strict;
use warnings; use warnings;

View File

@ -1376,6 +1376,8 @@ sub _expolygons_to_verts {
gluDeleteTess($tess); gluDeleteTess($tess);
} }
# Fill in the $qverts and $tverts with quads and triangles
# for the extrusion $entity.
sub _extrusionentity_to_verts { sub _extrusionentity_to_verts {
my ($self, $entity, $top_z, $copy, $qverts, $tverts) = @_; my ($self, $entity, $top_z, $copy, $qverts, $tverts) = @_;
@ -1407,8 +1409,18 @@ sub _extrusionentity_to_verts {
push @$heights, map $path->height, 0..$#$path_lines; push @$heights, map $path->height, 0..$#$path_lines;
} }
} }
# Calling the C++ implementation Slic3r::_3DScene::_extrusionentity_to_verts_do()
# This adds new vertices to the $qverts and $tverts.
Slic3r::GUI::_3DScene::_extrusionentity_to_verts_do($lines, $widths, $heights, Slic3r::GUI::_3DScene::_extrusionentity_to_verts_do($lines, $widths, $heights,
$closed, $top_z, $copy, $qverts, $tverts); $closed,
# Top height of the extrusion.
$top_z,
# $copy is not used here.
$copy,
# GLVertexArray object: C++ class maintaining an std::vector<float> for coords and normals.
$qverts,
$tverts);
} }
sub object_idx { sub object_idx {

View File

@ -1,3 +1,6 @@
# The bed shape dialog.
# The dialog opens from Print Settins tab -> Bed Shape: Set...
package Slic3r::GUI::BedShapeDialog; package Slic3r::GUI::BedShapeDialog;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,5 @@
# A tiny dialog to select an OctoPrint device to print to.
package Slic3r::GUI::BonjourBrowser; package Slic3r::GUI::BonjourBrowser;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,6 @@
# The config wizard is executed when the Slic3r is first started.
# The wizard helps the user to specify the 3D printer properties.
package Slic3r::GUI::ConfigWizard; package Slic3r::GUI::ConfigWizard;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,7 @@
# The "Controller" tab to control the printer using serial / USB.
# This feature is rarely used. Much more often, the firmware reads the G-codes from a SD card.
# May there be multiple subtabs per each printer connected?
package Slic3r::GUI::Controller; package Slic3r::GUI::Controller;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,5 @@
# A printer "Controller" -> "ManualControlDialog" subtab, opened per 3D printer connected?
package Slic3r::GUI::Controller::ManualControlDialog; package Slic3r::GUI::Controller::ManualControlDialog;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,5 @@
# The main frame, the parent of all.
package Slic3r::GUI::MainFrame; package Slic3r::GUI::MainFrame;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,6 @@
# Notify about the end of slicing.
# The notifications are sent out using the Growl protocol if installed, and using DBus XWindow protocol.
package Slic3r::GUI::Notifier; package Slic3r::GUI::Notifier;
use Moo; use Moo;

View File

@ -1,3 +1,5 @@
# A dialog group object. Used by the Tab, SimpleTab, Preferences dialog, ManualControlDialog etc.
package Slic3r::GUI::OptionsGroup; package Slic3r::GUI::OptionsGroup;
use Moo; use Moo;

View File

@ -1,3 +1,5 @@
# The "Plater" tab. It contains the "3D", "2D", "Preview" and "Layers" subtabs.
package Slic3r::GUI::Plater; package Slic3r::GUI::Plater;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,6 @@
# 2D preview on the platter.
# 3D objects are visualized by their convex hulls.
package Slic3r::GUI::Plater::2D; package Slic3r::GUI::Plater::2D;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,7 @@
# 2D preview of the tool paths of a single layer, using a thin line.
# OpenGL is used to render the paths.
# Vojtech also added a 2D simulation of under/over extrusion in a single layer.
package Slic3r::GUI::Plater::2DToolpaths; package Slic3r::GUI::Plater::2DToolpaths;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,6 @@
# Cut an object at a Z position, keep either the top or the bottom of the object.
# This dialog gets opened with the "Cut..." button above the platter.
package Slic3r::GUI::Plater::ObjectCutDialog; package Slic3r::GUI::Plater::ObjectCutDialog;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,6 @@
# Configuration of mesh modifiers and their parameters.
# This panel is inserted into ObjectSettingsDialog.
package Slic3r::GUI::Plater::ObjectPartsPanel; package Slic3r::GUI::Plater::ObjectPartsPanel;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,7 @@
# This dialog opens up when double clicked on an object line in the list at the right side of the platter.
# One may load additional STLs and additional modifier STLs,
# one may change the properties of the print per each modifier mesh or a Z-span.
package Slic3r::GUI::Plater::ObjectSettingsDialog; package Slic3r::GUI::Plater::ObjectSettingsDialog;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,6 @@
# Included in ObjectSettingsDialog -> ObjectPartsPanel.
# Maintains, displays, adds and removes overrides of slicing parameters for an object and its modifier mesh.
package Slic3r::GUI::Plater::OverrideSettingsPanel; package Slic3r::GUI::Plater::OverrideSettingsPanel;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,5 @@
# Preferences dialog, opens from Menu: File->Preferences
package Slic3r::GUI::Preferences; package Slic3r::GUI::Preferences;
use Wx qw(:dialog :id :misc :sizer :systemsettings wxTheApp); use Wx qw(:dialog :id :misc :sizer :systemsettings wxTheApp);
use Wx::Event qw(EVT_BUTTON EVT_TEXT_ENTER); use Wx::Event qw(EVT_BUTTON EVT_TEXT_ENTER);

View File

@ -1,3 +1,5 @@
# Status bar at the bottom of the main screen.
package Slic3r::GUI::ProgressStatusBar; package Slic3r::GUI::ProgressStatusBar;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,5 @@
# DLP Projector screen for the SLA (stereolitography) print process
package Slic3r::GUI::Projector; package Slic3r::GUI::Projector;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,6 @@
# The "Simple" Print Settings tab.
# The "Simple" mode is enabled by File->Preferences dialog.
package Slic3r::GUI::SimpleTab; package Slic3r::GUI::SimpleTab;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,3 +1,6 @@
# The "Expert" tab at the right of the main tabbed window.
# The "Expert" is enabled by File->Preferences dialog.
package Slic3r::GUI::Tab; package Slic3r::GUI::Tab;
use strict; use strict;
use warnings; use warnings;

View File

@ -1,4 +1,6 @@
# Slices at the XZ plane, for debugging purposes. # 2D cut in the XZ plane through the toolpaths.
# For debugging purposes.
package Slic3r::Test::SectionCut; package Slic3r::Test::SectionCut;
use Moo; use Moo;

View File

@ -116,6 +116,8 @@ PerimeterGenerator::process()
*/ */
} }
} else { } else {
//FIXME Is this offset correct if the line width of the inner perimeters differs
// from the line width of the infill?
coord_t distance = (i == 1) ? ext_pspacing2 : pspacing; coord_t distance = (i == 1) ? ext_pspacing2 : pspacing;
if (this->config->thin_walls) { if (this->config->thin_walls) {