mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 16:21:24 -06:00
Optimized and improved rectilinear fill.
This commit is contained in:
parent
3b81bf0e33
commit
f767ce816b
11 changed files with 62 additions and 6 deletions
|
@ -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();
|
||||
|
||||
} }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue