C++ supports sketched, but not finalized yet. Slic3r is still using

the old Perl supports, but this time with the C++ fillers.
This commit is contained in:
bubnikv 2016-10-16 16:30:56 +02:00
parent 8f40d9b34e
commit 7d7f093120
19 changed files with 602 additions and 557 deletions

View file

@ -14,13 +14,6 @@
namespace Slic3r {
Fill* Fill::new_from_type(const std::string &type)
{
static t_config_enum_values enum_keys_map = ConfigOptionEnum<InfillPattern>::get_enum_values();
t_config_enum_values::const_iterator it = enum_keys_map.find(type);
return (it == enum_keys_map.end()) ? NULL : new_from_type(InfillPattern(it->second));
}
Fill* Fill::new_from_type(const InfillPattern type)
{
switch (type) {
@ -39,6 +32,13 @@ Fill* Fill::new_from_type(const InfillPattern type)
}
}
Fill* Fill::new_from_type(const std::string &type)
{
static t_config_enum_values enum_keys_map = ConfigOptionEnum<InfillPattern>::get_enum_values();
t_config_enum_values::const_iterator it = enum_keys_map.find(type);
return (it == enum_keys_map.end()) ? NULL : new_from_type(InfillPattern(it->second));
}
Polylines Fill::fill_surface(const Surface *surface, const FillParams &params)
{
// Perform offset.

View file

@ -7,6 +7,7 @@
#include "../libslic3r.h"
#include "../BoundingBox.hpp"
#include "../PrintConfig.hpp"
namespace Slic3r {
@ -52,6 +53,7 @@ public:
public:
virtual ~Fill() {}
static Fill* Fill::new_from_type(const InfillPattern type);
static Fill* new_from_type(const std::string &type);
void set_bounding_box(const Slic3r::BoundingBox &bbox) { bounding_box = bbox; }