From 4451fc424c0eef293806acb7944383629cd878a9 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 28 Jul 2018 12:38:44 -0500 Subject: [PATCH] Renamed interface -> _interface to avoid reserved word under Windows. --- xs/src/libslic3r/SupportMaterial.cpp | 56 ++++++++++++++-------------- xs/src/libslic3r/SupportMaterial.hpp | 8 ++-- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/xs/src/libslic3r/SupportMaterial.cpp b/xs/src/libslic3r/SupportMaterial.cpp index 62beb24f0..be97c06b4 100644 --- a/xs/src/libslic3r/SupportMaterial.cpp +++ b/xs/src/libslic3r/SupportMaterial.cpp @@ -14,7 +14,7 @@ void SupportMaterial::generate_toolpaths(PrintObject *object, map overhang, map contact, - map interface, + map _interface, map base) { // Assign the object to the supports class. @@ -85,20 +85,20 @@ SupportMaterial::generate(PrintObject *object) this->generate_pillars_shape(contact, support_z, shape); // Propagate contact layers downwards to generate interface layers. - map interface = generate_interface_layers(support_z, contact, top); - clip_with_object(interface, support_z, *object); + map _interface = generate_interface_layers(support_z, contact, top); + clip_with_object(_interface, support_z, *object); if (!shape.empty()) - clip_with_shape(interface, shape); + clip_with_shape(_interface, shape); // Propagate contact layers and interface layers downwards to generate // the main support layers. - map base = generate_base_layers(support_z, contact, interface, top); + map base = generate_base_layers(support_z, contact, _interface, top); clip_with_object(base, support_z, *object); if (!shape.empty()) clip_with_shape(base, shape); // Detect what part of base support layers are "reverse interfaces" because they // lie above object's top surfaces. - generate_bottom_interface_layers(support_z, base, top, interface); + generate_bottom_interface_layers(support_z, base, top, _interface); // Install support layers into object. for (int i = 0; i < int(support_z.size()); i++) { object->add_support_layer( @@ -113,7 +113,7 @@ SupportMaterial::generate(PrintObject *object) } } // Generate the actual toolpaths and save them into each layer. - generate_toolpaths(object, overhang, contact, interface, base); + generate_toolpaths(object, overhang, contact, _interface, base); } vector @@ -649,7 +649,7 @@ SupportMaterial::generate_pillars_shape(const map &contact, map SupportMaterial::generate_base_layers(vector support_z, map contact, - map interface, + map _interface, map top) { // Let's now generate support layers under interface layers. @@ -671,15 +671,15 @@ SupportMaterial::generate_base_layers(vector support_z, Polygons ps_1; append_to(ps_1, base[i + 1]); // support regions on upper layer. - append_to(ps_1, interface[i + 1]); // interface regions on upper layer + append_to(ps_1, _interface[i + 1]); // _interface regions on upper layer append_to(ps_1, upper_contact); // contact regions on upper layer Polygons ps_2; for (auto el : overlapping_z) { if (top.count(el) > 0) append_to(ps_2, top[el]); // top slices on this layer. - if (interface.count(el) > 0) - append_to(ps_2, interface[el]); // interface regions on this layer. + if (_interface.count(el) > 0) + append_to(ps_2, _interface[el]); // _interface regions on this layer. if (contact.count(el) > 0) append_to(ps_2, contact[el]); // contact regions on this layer. } @@ -700,7 +700,7 @@ SupportMaterial::generate_interface_layers(vector support_z, map top) { // let's now generate interface layers below contact areas. - map interface; + map _interface; auto interface_layers_num = object_config->support_material_interface_layers.value; for (int layer_id = 0; layer_id < support_z.size(); layer_id++) { @@ -726,7 +726,7 @@ SupportMaterial::generate_interface_layers(vector support_z, // investigation. Polygons ps_1; append_to(ps_1, _contact); // clipped projection of the current contact regions. - append_to(ps_1, interface[i]); // interface regions already applied to this layer. + append_to(ps_1, _interface[i]); // _interface regions already applied to this layer. Polygons ps_2; for (auto el : overlapping_z) { @@ -736,21 +736,21 @@ SupportMaterial::generate_interface_layers(vector support_z, append_to(ps_2, contact[el]); // contact regions on this layer. } - _contact = interface[i] = diff( + _contact = _interface[i] = diff( ps_1, ps_2, true ); } } - return interface; + return _interface; } void SupportMaterial::generate_bottom_interface_layers(const vector &support_z, map &base, map &top, - map &interface) + map &_interface) { // If no interface layers are allowed, don't generate bottom interface layers. if (object_config->support_material_interface_layers.value == 0) @@ -792,7 +792,7 @@ SupportMaterial::generate_bottom_interface_layers(const vector &suppor ); // Add the new interface area to interface. - append_to(interface[layer_id], interface_area); + append_to(_interface[layer_id], interface_area); } interface_layers++; @@ -902,7 +902,7 @@ SupportMaterial::process_layer(int layer_id, toolpaths_params params) Polygons overhang = this->overhang.count(z) > 0 ? this->overhang[z] : Polygons(); Polygons contact = this->contact.count(z) > 0 ? this->contact[z] : Polygons(); - Polygons interface = this->interface.count(layer_id) > 0 ? this->interface[layer_id] : Polygons(); + Polygons _interface = this->_interface.count(layer_id) > 0 ? this->_interface[layer_id] : Polygons(); Polygons base = this->base.count(layer_id) > 0 ? this->base[layer_id] : Polygons(); // Islands. @@ -910,7 +910,7 @@ SupportMaterial::process_layer(int layer_id, toolpaths_params params) Polygons ps; append_to(ps, base); append_to(ps, contact); - append_to(ps, interface); + append_to(ps, _interface); layer->support_islands.append(union_ex(ps)); } @@ -1024,42 +1024,42 @@ SupportMaterial::process_layer(int layer_id, toolpaths_params params) fillers["support"]->bounding_box = bounding_box; // Interface and contact infill. - if (!interface.empty() || !contact_infill.empty()) { + if (!_interface.empty() || !contact_infill.empty()) { // Make interface layers alternate angles by 90 degrees. double alternate_angle = params.interface_angle + (90 * ((layer_id + 1) % 2)); fillers["interface"]->angle = static_cast(Geometry::deg2rad(alternate_angle)); fillers["interface"]->min_spacing = _interface_flow.spacing(); // Find centerline of the external loop. - interface = offset2(interface, +SCALED_EPSILON, -(SCALED_EPSILON + _interface_flow.scaled_width() / 2)); + _interface = offset2(_interface, +SCALED_EPSILON, -(SCALED_EPSILON + _interface_flow.scaled_width() / 2)); // Join regions by offsetting them to ensure they're merged. { Polygons ps; - append_to(ps, interface); + append_to(ps, _interface); append_to(ps, contact_infill); - interface = offset(ps, SCALED_EPSILON); + _interface = offset(ps, SCALED_EPSILON); } // turn base support into interface when it's contained in our holes // (this way we get wider interface anchoring). { - Polygons ps = interface; - interface = Polygons(); + Polygons ps = _interface; + _interface = Polygons(); for (auto p: ps) { if (p.is_clockwise()) { Polygon p2 = p; p2.make_counter_clockwise(); if (diff(Polygons({p2}), base, 1).empty()) continue; - interface.push_back(p); + _interface.push_back(p); } } } - base = diff(base, interface); + base = diff(base, _interface); ExtrusionPaths paths; - ExPolygons expolygons = union_ex(interface); + ExPolygons expolygons = union_ex(_interface); for (auto expolygon : expolygons) { Surface surface(stInternal, expolygon); fillers["interface"]->density = params.interface_density; diff --git a/xs/src/libslic3r/SupportMaterial.hpp b/xs/src/libslic3r/SupportMaterial.hpp index 1671807d8..4e62bdaf2 100644 --- a/xs/src/libslic3r/SupportMaterial.hpp +++ b/xs/src/libslic3r/SupportMaterial.hpp @@ -79,7 +79,7 @@ public: void generate_toolpaths(PrintObject *object, map overhang, map contact, - map interface, + map _interface, map base); /// Generate support material for the given print object. @@ -100,7 +100,7 @@ public: map generate_base_layers(vector support_z, map contact, - map interface, + map _interface, map top); map generate_interface_layers(vector support_z, @@ -110,7 +110,7 @@ public: void generate_bottom_interface_layers(const vector &support_z, map &base, map &top, - map &interface); + map &_interface); coordf_t contact_distance(coordf_t layer_height, coordf_t nozzle_diameter); @@ -158,7 +158,7 @@ private: PrintObject *object; map overhang; map contact; - map interface; + map _interface; map base; };