Optimized and improved rectilinear fill.
This commit is contained in:
parent
3b81bf0e33
commit
f767ce816b
@ -40,6 +40,7 @@ use Wx 0.9901 qw(:bitmap :dialog :icon :id :misc :systemsettings :toplevelwindow
|
||||
:filedialog :font);
|
||||
use Wx::Event qw(EVT_IDLE EVT_COMMAND);
|
||||
use base 'Wx::App';
|
||||
#use base 'Wx::AppConsole';
|
||||
|
||||
use constant FILE_WILDCARDS => {
|
||||
known => 'Known files (*.stl, *.obj, *.amf, *.xml)|*.stl;*.STL;*.obj;*.OBJ;*.amf;*.AMF;*.xml;*.XML',
|
||||
|
@ -284,8 +284,13 @@ sub _init_menubar {
|
||||
$self->_append_menu_item($helpMenu, "&About Slic3r", 'Show about dialog', sub {
|
||||
wxTheApp->about;
|
||||
});
|
||||
if (Slic3r::GUI::debugged()) {
|
||||
$self->_append_menu_item($helpMenu, "&Debug", 'Break to debugger', sub {
|
||||
Slic3r::GUI::break_to_debugger();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# menubar
|
||||
# assign menubar to frame after appending items, otherwise special items
|
||||
# will not be handled correctly
|
||||
|
@ -28,7 +28,7 @@
|
||||
"name": "xs & run",
|
||||
"working_dir": "$project_path/xs",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"shell_cmd": "perl Build install & perl ..\\slic3r.pl --gui \"..\\..\\Slic3r-tests\\star3-big2.stl\""
|
||||
"shell_cmd": "perl Build install & cd .. & perl slic3r.pl --gui \"..\\Slic3r-tests\\star3-big2.stl\""
|
||||
}
|
||||
],
|
||||
"folders":
|
||||
@ -36,5 +36,26 @@
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
],
|
||||
|
||||
"settings":
|
||||
{
|
||||
"sublimegdb_workingdir": "${folder:${project_path:run}}",
|
||||
// NOTE: You MUST provide --interpreter=mi for the plugin to work
|
||||
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi -ex 'target localhost:2345'",
|
||||
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi perl --args perl slic3r.pl",
|
||||
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi perl --args slic3r.pl ",
|
||||
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi -e C:\\Strawberry\\perl\\bin\\perl.exe -s C:\\Strawberry\\perl\\site\\lib\\auto\\Slic3r\\XS\\XS.xs.dll --args perl slic3r.pl -j 1 --gui D:\\src\\Slic3r-tests\\star3-big.stl",
|
||||
"sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi perl.exe --args perl slic3r.pl -j 1 --gui", // D:\\src\\Slic3r-tests\\star3-big.stl",
|
||||
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi -x slic3r.gdb",
|
||||
// "arguments": "slic3r -j 1 --gui ../Slic3r-tests/star3-big.stl",
|
||||
// "arguments": "../slic3r.pl -j 1 --gui",
|
||||
// "sublimegdb_exec_cmd": "-exec-continue",
|
||||
|
||||
// Add "pending breakpoints" for symbols that are dynamically loaded from
|
||||
// external shared libraries
|
||||
"debug_ext" : true,
|
||||
"run_after_init": false,
|
||||
"close_views": false
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ src/libslic3r/Fill/FillPlanePath.cpp
|
||||
src/libslic3r/Fill/FillPlanePath.hpp
|
||||
src/libslic3r/Fill/FillRectilinear.cpp
|
||||
src/libslic3r/Fill/FillRectilinear.hpp
|
||||
src/libslic3r/Fill/FillRectilinear2.cpp
|
||||
src/libslic3r/Fill/FillRectilinear2.hpp
|
||||
src/libslic3r/Flow.cpp
|
||||
src/libslic3r/Flow.hpp
|
||||
src/libslic3r/GCode.cpp
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "Fill3DHoneycomb.hpp"
|
||||
#include "FillPlanePath.hpp"
|
||||
#include "FillRectilinear.hpp"
|
||||
#include "FillRectilinear2.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@ -18,7 +19,8 @@ Fill* Fill::new_from_type(const std::string &type)
|
||||
if (type == "3dhoneycomb")
|
||||
return new Fill3DHoneycomb();
|
||||
if (type == "rectilinear")
|
||||
return new FillRectilinear();
|
||||
// return new FillRectilinear();
|
||||
return new FillRectilinear2();
|
||||
if (type == "line")
|
||||
return new FillLine();
|
||||
if (type == "grid")
|
||||
|
@ -12,6 +12,8 @@ class Surface;
|
||||
|
||||
struct FillParams
|
||||
{
|
||||
FillParams() { memset(this, 0, sizeof(FillParams)); }
|
||||
|
||||
coordf_t width;
|
||||
// Fraction in <0, 1>
|
||||
float density;
|
||||
|
@ -34,7 +34,7 @@ Polylines FillRectilinear::fill_surface(const Surface *surface, const FillParams
|
||||
bounding_box.min.x - (bounding_box.min.x % this->_line_spacing),
|
||||
bounding_box.min.y - (bounding_box.min.y % this->_line_spacing)));
|
||||
}
|
||||
|
||||
|
||||
// generate the basic pattern
|
||||
coord_t x_max = bounding_box.max.x + SCALED_EPSILON;
|
||||
Lines lines;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef SLIC3R_DEBUG
|
||||
#define SLIC3R_TRIANGLEMESH_DEBUG
|
||||
// #define SLIC3R_TRIANGLEMESH_DEBUG
|
||||
#include "SVG.hpp"
|
||||
#endif
|
||||
|
||||
|
@ -36,4 +36,19 @@ enable_screensaver()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
debugged()
|
||||
{
|
||||
return IsDebuggerPresent();
|
||||
}
|
||||
|
||||
void
|
||||
break_to_debugger()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (IsDebuggerPresent())
|
||||
DebugBreak();
|
||||
#endif /* _WIN32 */
|
||||
}
|
||||
|
||||
} }
|
||||
|
@ -5,6 +5,8 @@ namespace Slic3r { namespace GUI {
|
||||
|
||||
void disable_screensaver();
|
||||
void enable_screensaver();
|
||||
bool debugged();
|
||||
void break_to_debugger();
|
||||
|
||||
} }
|
||||
|
||||
|
@ -13,3 +13,9 @@ void disable_screensaver()
|
||||
|
||||
void enable_screensaver()
|
||||
%code{% Slic3r::GUI::enable_screensaver(); %};
|
||||
|
||||
bool debugged()
|
||||
%code{% RETVAL=Slic3r::GUI::debugged(); %};
|
||||
|
||||
void break_to_debugger()
|
||||
%code{% Slic3r::GUI::break_to_debugger(); %};
|
||||
|
Loading…
Reference in New Issue
Block a user