ENH: refine some func and class naming
jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Icaaf6197bacf5e7037835c475b0d0af0cfb22a44
This commit is contained in:
parent
1959fa7d5c
commit
dc1bac6b6c
|
@ -112,8 +112,8 @@ set(lisbslic3r_sources
|
||||||
Fill/Lightning/TreeNode.hpp
|
Fill/Lightning/TreeNode.hpp
|
||||||
Fill/FillRectilinear.cpp
|
Fill/FillRectilinear.cpp
|
||||||
Fill/FillRectilinear.hpp
|
Fill/FillRectilinear.hpp
|
||||||
Fill/FillContour.hpp
|
Fill/FillFloatingConcentric.hpp
|
||||||
Fill/FillContour.cpp
|
Fill/FillFloatingConcentric.cpp
|
||||||
Flow.cpp
|
Flow.cpp
|
||||||
Flow.hpp
|
Flow.hpp
|
||||||
Frustum.cpp
|
Frustum.cpp
|
||||||
|
|
|
@ -619,7 +619,7 @@ std::string ExtrusionEntity::role_to_string(ExtrusionRole role)
|
||||||
case erExternalPerimeter : return L("Outer wall");
|
case erExternalPerimeter : return L("Outer wall");
|
||||||
case erOverhangPerimeter : return L("Overhang wall");
|
case erOverhangPerimeter : return L("Overhang wall");
|
||||||
case erInternalInfill : return L("Sparse infill");
|
case erInternalInfill : return L("Sparse infill");
|
||||||
case erEnsureVertical : return L("Ensure vertical");
|
case erFloatingVerticalShell : return L("Floating vertical shell");
|
||||||
case erSolidInfill : return L("Internal solid infill");
|
case erSolidInfill : return L("Internal solid infill");
|
||||||
case erTopSolidInfill : return L("Top surface");
|
case erTopSolidInfill : return L("Top surface");
|
||||||
case erBottomSurface : return L("Bottom surface");
|
case erBottomSurface : return L("Bottom surface");
|
||||||
|
@ -650,8 +650,8 @@ ExtrusionRole ExtrusionEntity::string_to_role(const std::string_view role)
|
||||||
return erOverhangPerimeter;
|
return erOverhangPerimeter;
|
||||||
else if (role == L("Sparse infill"))
|
else if (role == L("Sparse infill"))
|
||||||
return erInternalInfill;
|
return erInternalInfill;
|
||||||
else if (role == L("Ensure vertical"))
|
else if (role == L("Floating vertical shell"))
|
||||||
return erEnsureVertical;
|
return erFloatingVerticalShell;
|
||||||
else if (role == L("Internal solid infill"))
|
else if (role == L("Internal solid infill"))
|
||||||
return erSolidInfill;
|
return erSolidInfill;
|
||||||
else if (role == L("Top surface"))
|
else if (role == L("Top surface"))
|
||||||
|
|
|
@ -48,7 +48,7 @@ enum ExtrusionRole : uint8_t {
|
||||||
erOverhangPerimeter,
|
erOverhangPerimeter,
|
||||||
erInternalInfill,
|
erInternalInfill,
|
||||||
erSolidInfill,
|
erSolidInfill,
|
||||||
erEnsureVertical,
|
erFloatingVerticalShell,
|
||||||
erTopSolidInfill,
|
erTopSolidInfill,
|
||||||
erBottomSurface,
|
erBottomSurface,
|
||||||
erIroning,
|
erIroning,
|
||||||
|
@ -70,7 +70,7 @@ enum ExtrusionRole : uint8_t {
|
||||||
enum CustomizeFlag : uint8_t {
|
enum CustomizeFlag : uint8_t {
|
||||||
cfNone,
|
cfNone,
|
||||||
cfCircleCompensation, // shaft hole tolerance compensation
|
cfCircleCompensation, // shaft hole tolerance compensation
|
||||||
cfEnsureVertical
|
cfFloatingVerticalShell
|
||||||
};
|
};
|
||||||
|
|
||||||
// Special flags describing loop
|
// Special flags describing loop
|
||||||
|
@ -99,7 +99,7 @@ inline bool is_infill(ExtrusionRole role)
|
||||||
return role == erBridgeInfill
|
return role == erBridgeInfill
|
||||||
|| role == erInternalInfill
|
|| role == erInternalInfill
|
||||||
|| role == erSolidInfill
|
|| role == erSolidInfill
|
||||||
|| role == erEnsureVertical
|
|| role == erFloatingVerticalShell
|
||||||
|| role == erTopSolidInfill
|
|| role == erTopSolidInfill
|
||||||
|| role == erBottomSurface
|
|| role == erBottomSurface
|
||||||
|| role == erIroning;
|
|| role == erIroning;
|
||||||
|
@ -114,7 +114,7 @@ inline bool is_solid_infill(ExtrusionRole role)
|
||||||
{
|
{
|
||||||
return role == erBridgeInfill
|
return role == erBridgeInfill
|
||||||
|| role == erSolidInfill
|
|| role == erSolidInfill
|
||||||
|| role == erEnsureVertical
|
|| role == erFloatingVerticalShell
|
||||||
|| role == erTopSolidInfill
|
|| role == erTopSolidInfill
|
||||||
|| role == erBottomSurface
|
|| role == erBottomSurface
|
||||||
|| role == erIroning;
|
|| role == erIroning;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "FillLightning.hpp"
|
#include "FillLightning.hpp"
|
||||||
#include "FillConcentricInternal.hpp"
|
#include "FillConcentricInternal.hpp"
|
||||||
#include "FillConcentric.hpp"
|
#include "FillConcentric.hpp"
|
||||||
#include "FillContour.hpp"
|
#include "FillFloatingConcentric.hpp"
|
||||||
|
|
||||||
#define NARROW_INFILL_AREA_THRESHOLD 3
|
#define NARROW_INFILL_AREA_THRESHOLD 3
|
||||||
|
|
||||||
|
@ -168,8 +168,8 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
||||||
if (surface.is_solid()) {
|
if (surface.is_solid()) {
|
||||||
params.density = 100.f;
|
params.density = 100.f;
|
||||||
//FIXME for non-thick bridges, shall we allow a bottom surface pattern?
|
//FIXME for non-thick bridges, shall we allow a bottom surface pattern?
|
||||||
if (surface.is_ensure_vertical())
|
if (surface.is_floating_vertical_shell())
|
||||||
params.pattern = InfillPattern::ipEnsureVertical;
|
params.pattern = InfillPattern::ipFloatingConcentric;
|
||||||
else if (surface.is_solid_infill())
|
else if (surface.is_solid_infill())
|
||||||
params.pattern = region_config.internal_solid_infill_pattern.value;
|
params.pattern = region_config.internal_solid_infill_pattern.value;
|
||||||
else if (surface.is_external() && !is_bridge)
|
else if (surface.is_external() && !is_bridge)
|
||||||
|
@ -184,7 +184,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
||||||
is_bridge ?
|
is_bridge ?
|
||||||
erBridgeInfill :
|
erBridgeInfill :
|
||||||
(surface.is_solid() ?
|
(surface.is_solid() ?
|
||||||
(surface.is_top() ? erTopSolidInfill : (surface.is_bottom()? erBottomSurface : surface.is_ensure_vertical()?erEnsureVertical:erSolidInfill)) :
|
(surface.is_top() ? erTopSolidInfill : (surface.is_bottom()? erBottomSurface : surface.is_floating_vertical_shell()?erFloatingVerticalShell:erSolidInfill)) :
|
||||||
erInternalInfill);
|
erInternalInfill);
|
||||||
params.bridge_angle = float(surface.bridge_angle);
|
params.bridge_angle = float(surface.bridge_angle);
|
||||||
params.angle = float(Geometry::deg2rad(region_config.infill_direction.value));
|
params.angle = float(Geometry::deg2rad(region_config.infill_direction.value));
|
||||||
|
@ -203,7 +203,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
||||||
params.top_surface_speed = region_config.top_surface_speed.get_at(layer.get_extruder_id(params.extruder));
|
params.top_surface_speed = region_config.top_surface_speed.get_at(layer.get_extruder_id(params.extruder));
|
||||||
else if (params.extrusion_role == erSolidInfill)
|
else if (params.extrusion_role == erSolidInfill)
|
||||||
params.solid_infill_speed = region_config.internal_solid_infill_speed.get_at(layer.get_extruder_id(params.extruder));
|
params.solid_infill_speed = region_config.internal_solid_infill_speed.get_at(layer.get_extruder_id(params.extruder));
|
||||||
else if (params.extrusion_role == erEnsureVertical)
|
else if (params.extrusion_role == erFloatingVerticalShell)
|
||||||
params.solid_infill_speed = region_config.bridge_speed.get_at(layer.get_extruder_id(params.extruder));
|
params.solid_infill_speed = region_config.bridge_speed.get_at(layer.get_extruder_id(params.extruder));
|
||||||
}
|
}
|
||||||
// Calculate flow spacing for infill pattern generation.
|
// Calculate flow spacing for infill pattern generation.
|
||||||
|
@ -395,9 +395,9 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (narrow_floating_expoly_idx.size() == expolygons_size) {
|
else if (narrow_floating_expoly_idx.size() == expolygons_size) {
|
||||||
surface_fills[i].params.pattern = ipEnsureVertical;
|
surface_fills[i].params.pattern = ipFloatingConcentric;
|
||||||
surface_fills[i].params.extrusion_role = erEnsureVertical;
|
surface_fills[i].params.extrusion_role = erFloatingVerticalShell;
|
||||||
surface_fills[i].surface.surface_type = stEnsureVertical;
|
surface_fills[i].surface.surface_type = stFloatingVerticalShell;
|
||||||
}
|
}
|
||||||
else if (narrow_expoly_idx.size() == expolygons_size) {
|
else if (narrow_expoly_idx.size() == expolygons_size) {
|
||||||
surface_fills[i].params.pattern = ipConcentricInternal;
|
surface_fills[i].params.pattern = ipConcentricInternal;
|
||||||
|
@ -421,11 +421,11 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
||||||
|
|
||||||
if (!narrow_floating_expoly_idx.empty()) {
|
if (!narrow_floating_expoly_idx.empty()) {
|
||||||
params = surface_fills[i].params;
|
params = surface_fills[i].params;
|
||||||
params.pattern = ipEnsureVertical;
|
params.pattern = ipFloatingConcentric;
|
||||||
params.extrusion_role = erEnsureVertical;
|
params.extrusion_role = erFloatingVerticalShell;
|
||||||
surface_fills.emplace_back(params);
|
surface_fills.emplace_back(params);
|
||||||
surface_fills.back().region_id = surface_fills[i].region_id;
|
surface_fills.back().region_id = surface_fills[i].region_id;
|
||||||
surface_fills.back().surface.surface_type = stEnsureVertical;
|
surface_fills.back().surface.surface_type = stFloatingVerticalShell;
|
||||||
surface_fills.back().surface.thickness = surface_fills[i].surface.thickness;
|
surface_fills.back().surface.thickness = surface_fills[i].surface.thickness;
|
||||||
surface_fills.back().region_id_group = surface_fills[i].region_id_group;
|
surface_fills.back().region_id_group = surface_fills[i].region_id_group;
|
||||||
surface_fills.back().no_overlap_expolygons = surface_fills[i].no_overlap_expolygons;
|
surface_fills.back().no_overlap_expolygons = surface_fills[i].no_overlap_expolygons;
|
||||||
|
@ -519,8 +519,8 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
||||||
} else if (surface_fill.params.pattern == ipLightning){
|
} else if (surface_fill.params.pattern == ipLightning){
|
||||||
dynamic_cast<FillLightning::Filler*>(f.get())->generator = lightning_generator;
|
dynamic_cast<FillLightning::Filler*>(f.get())->generator = lightning_generator;
|
||||||
}
|
}
|
||||||
else if (surface_fill.params.pattern == ipEnsureVertical) {
|
else if (surface_fill.params.pattern == ipFloatingConcentric) {
|
||||||
FillContour* fill_contour = dynamic_cast<FillContour*>(f.get());
|
FillFloatingConcentric* fill_contour = dynamic_cast<FillFloatingConcentric*>(f.get());
|
||||||
assert(fill_contour != nullptr);
|
assert(fill_contour != nullptr);
|
||||||
ExPolygons lower_unsuporrt_expolys;
|
ExPolygons lower_unsuporrt_expolys;
|
||||||
Polygons lower_sparse_polys;
|
Polygons lower_sparse_polys;
|
||||||
|
@ -584,7 +584,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
||||||
params.anchor_length = surface_fill.params.anchor_length;
|
params.anchor_length = surface_fill.params.anchor_length;
|
||||||
params.anchor_length_max = surface_fill.params.anchor_length_max;
|
params.anchor_length_max = surface_fill.params.anchor_length_max;
|
||||||
params.resolution = resolution;
|
params.resolution = resolution;
|
||||||
params.use_arachne = surface_fill.params.pattern == ipConcentric || surface_fill.params.pattern == ipEnsureVertical;
|
params.use_arachne = surface_fill.params.pattern == ipConcentric || surface_fill.params.pattern == ipFloatingConcentric;
|
||||||
params.layer_height = m_regions[surface_fill.region_id]->layer()->height;
|
params.layer_height = m_regions[surface_fill.region_id]->layer()->height;
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
|
@ -602,7 +602,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
||||||
params.symmetric_infill_y_axis = surface_fill.params.symmetric_infill_y_axis;
|
params.symmetric_infill_y_axis = surface_fill.params.symmetric_infill_y_axis;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (surface_fill.params.pattern == ipGrid || surface_fill.params.pattern == ipEnsureVertical)
|
if (surface_fill.params.pattern == ipGrid || surface_fill.params.pattern == ipFloatingConcentric)
|
||||||
params.can_reverse = false;
|
params.can_reverse = false;
|
||||||
LayerRegion* layerm = this->m_regions[surface_fill.region_id];
|
LayerRegion* layerm = this->m_regions[surface_fill.region_id];
|
||||||
for (ExPolygon& expoly : surface_fill.expolygons) {
|
for (ExPolygon& expoly : surface_fill.expolygons) {
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
// BBS: new infill pattern header
|
// BBS: new infill pattern header
|
||||||
#include "FillConcentricInternal.hpp"
|
#include "FillConcentricInternal.hpp"
|
||||||
#include "FillCrossHatch.hpp"
|
#include "FillCrossHatch.hpp"
|
||||||
#include "FillContour.hpp"
|
#include "FillFloatingConcentric.hpp"
|
||||||
|
|
||||||
// #define INFILL_DEBUG_OUTPUT
|
// #define INFILL_DEBUG_OUTPUT
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ Fill* Fill::new_from_type(const InfillPattern type)
|
||||||
case ipMonotonicLine: return new FillMonotonicLineWGapFill();
|
case ipMonotonicLine: return new FillMonotonicLineWGapFill();
|
||||||
case ipZigZag: return new FillZigZag();
|
case ipZigZag: return new FillZigZag();
|
||||||
case ipCrossZag: return new FillCrossZag();
|
case ipCrossZag: return new FillCrossZag();
|
||||||
case ipEnsureVertical: return new FillContour();
|
case ipFloatingConcentric: return new FillFloatingConcentric();
|
||||||
default: throw Slic3r::InvalidArgument("unknown type");
|
default: throw Slic3r::InvalidArgument("unknown type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "../ExPolygon.hpp"
|
#include "../ExPolygon.hpp"
|
||||||
#include "../Surface.hpp"
|
#include "../Surface.hpp"
|
||||||
#include "../VariableWidth.hpp"
|
#include "../VariableWidth.hpp"
|
||||||
#include "FillContour.hpp"
|
#include "FillFloatingConcentric.hpp"
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
@ -101,7 +101,7 @@ static ExtrusionPaths floating_thick_polyline_to_extrusion_paths(const FloatingT
|
||||||
if (curr_floating != is_floating && length != 0) {
|
if (curr_floating != is_floating && length != 0) {
|
||||||
path.polyline.append(lines[idx].a);
|
path.polyline.append(lines[idx].a);
|
||||||
if (is_floating)
|
if (is_floating)
|
||||||
path.set_customize_flag(CustomizeFlag::cfEnsureVertical);
|
path.set_customize_flag(CustomizeFlag::cfFloatingVerticalShell);
|
||||||
set_flow_for_path(path, sum / length);
|
set_flow_for_path(path, sum / length);
|
||||||
append_path_and_reset(length, sum, path);
|
append_path_and_reset(length, sum, path);
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ static ExtrusionPaths floating_thick_polyline_to_extrusion_paths(const FloatingT
|
||||||
path.polyline.append(lines[i].a);
|
path.polyline.append(lines[i].a);
|
||||||
if (length > SCALED_EPSILON) {
|
if (length > SCALED_EPSILON) {
|
||||||
if (lines[i].is_a_floating && lines[i].is_b_floating)
|
if (lines[i].is_a_floating && lines[i].is_b_floating)
|
||||||
path.set_customize_flag(CustomizeFlag::cfEnsureVertical);
|
path.set_customize_flag(CustomizeFlag::cfFloatingVerticalShell);
|
||||||
set_flow_for_path(path, sum / length);
|
set_flow_for_path(path, sum / length);
|
||||||
paths.emplace_back(std::move(path));
|
paths.emplace_back(std::move(path));
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ static ExtrusionPaths floating_thick_polyline_to_extrusion_paths(const FloatingT
|
||||||
if (curr_floating!= is_floating && length != 0) {
|
if (curr_floating!= is_floating && length != 0) {
|
||||||
path.polyline.append(lines[idx].a);
|
path.polyline.append(lines[idx].a);
|
||||||
if(is_floating)
|
if(is_floating)
|
||||||
path.set_customize_flag(CustomizeFlag::cfEnsureVertical);
|
path.set_customize_flag(CustomizeFlag::cfFloatingVerticalShell);
|
||||||
set_flow_for_path(path, sum / length);
|
set_flow_for_path(path, sum / length);
|
||||||
append_path_and_reset(length, sum, path);
|
append_path_and_reset(length, sum, path);
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ static ExtrusionPaths floating_thick_polyline_to_extrusion_paths(const FloatingT
|
||||||
path.polyline.append(lines[final_size - 1].b);
|
path.polyline.append(lines[final_size - 1].b);
|
||||||
if (length > SCALED_EPSILON) {
|
if (length > SCALED_EPSILON) {
|
||||||
if (lines[final_size - 1].is_a_floating && lines[final_size - 1].is_b_floating)
|
if (lines[final_size - 1].is_a_floating && lines[final_size - 1].is_b_floating)
|
||||||
path.set_customize_flag(CustomizeFlag::cfEnsureVertical);
|
path.set_customize_flag(CustomizeFlag::cfFloatingVerticalShell);
|
||||||
set_flow_for_path(path, sum / length);
|
set_flow_for_path(path, sum / length);
|
||||||
paths.emplace_back(std::move(path));
|
paths.emplace_back(std::move(path));
|
||||||
}
|
}
|
||||||
|
@ -676,7 +676,7 @@ void smooth_floating_line(FloatingThickPolyline& line,coord_t max_gap_threshold,
|
||||||
}
|
}
|
||||||
|
|
||||||
// nearest neibour排序,但是取点时,只能取get_loop_start_candidates得到的点
|
// nearest neibour排序,但是取点时,只能取get_loop_start_candidates得到的点
|
||||||
FloatingThickPolylines FillContour::resplit_order_loops(Point curr_point, std::vector<const Arachne::ExtrusionLine*> all_extrusions, const ExPolygons& floating_areas, const Polygons& sparse_polys, const coord_t default_width)
|
FloatingThickPolylines FillFloatingConcentric::resplit_order_loops(Point curr_point, std::vector<const Arachne::ExtrusionLine*> all_extrusions, const ExPolygons& floating_areas, const Polygons& sparse_polys, const coord_t default_width)
|
||||||
{
|
{
|
||||||
FloatingThickPolylines result;
|
FloatingThickPolylines result;
|
||||||
|
|
||||||
|
@ -715,7 +715,7 @@ FloatingThickPolylines FillContour::resplit_order_loops(Point curr_point, std::v
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
Polylines FillContour::resplit_order_loops(Point curr_point, Polygons loops, const ExPolygons& floating_areas)
|
Polylines FillFloatingConcentric::resplit_order_loops(Point curr_point, Polygons loops, const ExPolygons& floating_areas)
|
||||||
{
|
{
|
||||||
Polylines result;
|
Polylines result;
|
||||||
for (size_t idx = 0; idx < loops.size(); ++idx) {
|
for (size_t idx = 0; idx < loops.size(); ++idx) {
|
||||||
|
@ -745,7 +745,7 @@ Polylines FillContour::resplit_order_loops(Point curr_point, Polygons loops, con
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
void FillContour::_fill_surface_single(
|
void FillFloatingConcentric::_fill_surface_single(
|
||||||
const FillParams& params,
|
const FillParams& params,
|
||||||
unsigned int thickness_layers,
|
unsigned int thickness_layers,
|
||||||
const std::pair<float, Point>& direction,
|
const std::pair<float, Point>& direction,
|
||||||
|
@ -788,7 +788,7 @@ void FillContour::_fill_surface_single(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void FillContour::_fill_surface_single(const FillParams& params,
|
void FillFloatingConcentric::_fill_surface_single(const FillParams& params,
|
||||||
unsigned int thickness_layers,
|
unsigned int thickness_layers,
|
||||||
const std::pair<float, Point>& direction,
|
const std::pair<float, Point>& direction,
|
||||||
ExPolygon expolygon,
|
ExPolygon expolygon,
|
||||||
|
@ -842,7 +842,7 @@ void FillContour::_fill_surface_single(const FillParams& params,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FloatingThickPolylines FillContour::fill_surface_arachne_floating(const Surface* surface, const FillParams& params)
|
FloatingThickPolylines FillFloatingConcentric::fill_surface_arachne_floating(const Surface* surface, const FillParams& params)
|
||||||
{
|
{
|
||||||
// Create the infills for each of the regions.
|
// Create the infills for each of the regions.
|
||||||
FloatingThickPolylines floating_thick_polylines_out;
|
FloatingThickPolylines floating_thick_polylines_out;
|
||||||
|
@ -851,7 +851,7 @@ FloatingThickPolylines FillContour::fill_surface_arachne_floating(const Surface*
|
||||||
return floating_thick_polylines_out;
|
return floating_thick_polylines_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FillContour::fill_surface_extrusion(const Surface* surface, const FillParams& params, ExtrusionEntitiesPtr& out)
|
void FillFloatingConcentric::fill_surface_extrusion(const Surface* surface, const FillParams& params, ExtrusionEntitiesPtr& out)
|
||||||
{
|
{
|
||||||
FloatingThickPolylines floating_lines = this->fill_surface_arachne_floating(surface, params);
|
FloatingThickPolylines floating_lines = this->fill_surface_arachne_floating(surface, params);
|
||||||
if (floating_lines.empty())
|
if (floating_lines.empty())
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef SLIC3R_FILLCONTOUR_HPP
|
#ifndef SLIC3R_FillFloatingConcentric_HPP
|
||||||
#define SLIC3R_FILLCONTOUR_HPP
|
#define SLIC3R_FillFloatingConcentric_HPP
|
||||||
|
|
||||||
#include "FillBase.hpp"
|
#include "FillBase.hpp"
|
||||||
#include "FillConcentric.hpp"
|
#include "FillConcentric.hpp"
|
||||||
|
@ -33,15 +33,15 @@ namespace Slic3r{
|
||||||
};
|
};
|
||||||
using FloatingThickPolylines = std::vector<FloatingThickPolyline>;
|
using FloatingThickPolylines = std::vector<FloatingThickPolyline>;
|
||||||
|
|
||||||
class FillContour : public FillConcentric
|
class FillFloatingConcentric : public FillConcentric
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~FillContour() override = default;
|
~FillFloatingConcentric() override = default;
|
||||||
ExPolygons lower_layer_unsupport_areas;
|
ExPolygons lower_layer_unsupport_areas;
|
||||||
Polygons lower_sparse_polys;
|
Polygons lower_sparse_polys;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Fill* clone() const override { return new FillContour(*this); }
|
Fill* clone() const override { return new FillFloatingConcentric(*this); }
|
||||||
#if 0
|
#if 0
|
||||||
void _fill_surface_single(
|
void _fill_surface_single(
|
||||||
const FillParams ¶ms,
|
const FillParams ¶ms,
|
|
@ -4880,7 +4880,7 @@ std::string GCode::extrude_entity(const ExtrusionEntity &entity, std::string des
|
||||||
std::string GCode::extrude_path(ExtrusionPath path, std::string description, double speed)
|
std::string GCode::extrude_path(ExtrusionPath path, std::string description, double speed)
|
||||||
{
|
{
|
||||||
// description += ExtrusionEntity::role_to_string(path.role());
|
// description += ExtrusionEntity::role_to_string(path.role());
|
||||||
bool flag = path.get_customize_flag() == CustomizeFlag::cfEnsureVertical;
|
bool flag = path.get_customize_flag() == CustomizeFlag::cfFloatingVerticalShell;
|
||||||
std::string gcode = this->_extrude(path, description, speed,flag);
|
std::string gcode = this->_extrude(path, description, speed,flag);
|
||||||
if (m_wipe.enable && FILAMENT_CONFIG(wipe)) {
|
if (m_wipe.enable && FILAMENT_CONFIG(wipe)) {
|
||||||
m_wipe.path = std::move(path.polyline);
|
m_wipe.path = std::move(path.polyline);
|
||||||
|
@ -5420,7 +5420,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
speed = m_config.sparse_infill_speed.get_at(cur_extruder_index());
|
speed = m_config.sparse_infill_speed.get_at(cur_extruder_index());
|
||||||
} else if (path.role() == erSolidInfill) {
|
} else if (path.role() == erSolidInfill) {
|
||||||
speed = m_config.internal_solid_infill_speed.get_at(cur_extruder_index());
|
speed = m_config.internal_solid_infill_speed.get_at(cur_extruder_index());
|
||||||
} else if (path.role() == erEnsureVertical){
|
} else if (path.role() == erFloatingVerticalShell){
|
||||||
if(use_seperate_speed){
|
if(use_seperate_speed){
|
||||||
speed = m_config.bridge_speed.get_at(cur_extruder_index());
|
speed = m_config.bridge_speed.get_at(cur_extruder_index());
|
||||||
}
|
}
|
||||||
|
|
|
@ -5513,7 +5513,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type, EMovePathType path_type)
|
||||||
void GCodeProcessor::set_extrusion_role(ExtrusionRole role)
|
void GCodeProcessor::set_extrusion_role(ExtrusionRole role)
|
||||||
{
|
{
|
||||||
m_used_filaments.process_role_cache(this);
|
m_used_filaments.process_role_cache(this);
|
||||||
if (role == erEnsureVertical) {
|
if (role == erFloatingVerticalShell) {
|
||||||
m_extrusion_role = erSolidInfill;
|
m_extrusion_role = erSolidInfill;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -1364,7 +1364,7 @@ void PrintConfigDef::init_fff_params()
|
||||||
|
|
||||||
def = this->add("vertical_shell_speed",coFloatsOrPercents);
|
def = this->add("vertical_shell_speed",coFloatsOrPercents);
|
||||||
def->label = L("Vertical shell speed");
|
def->label = L("Vertical shell speed");
|
||||||
def->tooltip = L("Speed for vertical shell area. If expressed as percentage (for example: 80%) it will be calculated on"
|
def->tooltip = L("Speed for vertical shells with overhang regions. If expressed as percentage (for example: 80%) it will be calculated on"
|
||||||
"the internal solid infill speed above");
|
"the internal solid infill speed above");
|
||||||
def->category = L("Speed");
|
def->category = L("Speed");
|
||||||
def->sidetext = L("mm/s or %");
|
def->sidetext = L("mm/s or %");
|
||||||
|
@ -1376,7 +1376,7 @@ void PrintConfigDef::init_fff_params()
|
||||||
|
|
||||||
def = this->add("detect_floating_vertical_shell", coBool);
|
def = this->add("detect_floating_vertical_shell", coBool);
|
||||||
def->label = L("Detect floating vertical shells");
|
def->label = L("Detect floating vertical shells");
|
||||||
def->tooltip = L("Detect floating vertical shells and slow them by using bridge speed.");
|
def->tooltip = L("Detect overhang paths in vertical shells and slow them by bridge speed.");
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionBool{true});
|
def->set_default_value(new ConfigOptionBool{true});
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ enum AuthorizationType {
|
||||||
enum InfillPattern : int {
|
enum InfillPattern : int {
|
||||||
ipConcentric, ipRectilinear, ipGrid, ipLine, ipCubic, ipTriangles, ipStars, ipGyroid, ipHoneycomb, ipAdaptiveCubic, ipMonotonic, ipMonotonicLine, ipAlignedRectilinear, ip3DHoneycomb,
|
ipConcentric, ipRectilinear, ipGrid, ipLine, ipCubic, ipTriangles, ipStars, ipGyroid, ipHoneycomb, ipAdaptiveCubic, ipMonotonic, ipMonotonicLine, ipAlignedRectilinear, ip3DHoneycomb,
|
||||||
ipHilbertCurve, ipArchimedeanChords, ipOctagramSpiral, ipSupportCubic, ipSupportBase, ipConcentricInternal,
|
ipHilbertCurve, ipArchimedeanChords, ipOctagramSpiral, ipSupportCubic, ipSupportBase, ipConcentricInternal,
|
||||||
ipLightning, ipCrossHatch, ipZigZag, ipCrossZag,ipEnsureVertical,
|
ipLightning, ipCrossHatch, ipZigZag, ipCrossZag,ipFloatingConcentric,
|
||||||
ipCount,
|
ipCount,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1957,7 +1957,7 @@ void PrintObject::bridge_over_infill()
|
||||||
unsupported_area = diff(unsupported_area, lower_layer_solids);
|
unsupported_area = diff(unsupported_area, lower_layer_solids);
|
||||||
|
|
||||||
for (LayerRegion *region : layer->regions()) {
|
for (LayerRegion *region : layer->regions()) {
|
||||||
auto region_internal_solids = region->fill_surfaces.filter_by_types({ stInternalSolid,stEnsureVertical }); // 取当前层的实心区域
|
auto region_internal_solids = region->fill_surfaces.filter_by_type(stInternalSolid); // 取当前层的实心区域
|
||||||
for (const Surface *s : region_internal_solids) {
|
for (const Surface *s : region_internal_solids) {
|
||||||
Polygons unsupported = intersection(to_polygons(s->expolygon), unsupported_area); // 当前层需要生成桥接的区域,通过当前层的实心区域与下一层的非实心区域求交得到
|
Polygons unsupported = intersection(to_polygons(s->expolygon), unsupported_area); // 当前层需要生成桥接的区域,通过当前层的实心区域与下一层的非实心区域求交得到
|
||||||
// The following flag marks those surfaces, which overlap with unuspported area, but at least part of them is supported.
|
// The following flag marks those surfaces, which overlap with unuspported area, but at least part of them is supported.
|
||||||
|
|
|
@ -38,7 +38,7 @@ const char* surface_type_to_color_name(const SurfaceType surface_type)
|
||||||
case stBottom: return "rgb(0,255,0)"; // "green";
|
case stBottom: return "rgb(0,255,0)"; // "green";
|
||||||
case stBottomBridge: return "rgb(0,0,255)"; // "blue";
|
case stBottomBridge: return "rgb(0,0,255)"; // "blue";
|
||||||
case stInternal: return "rgb(255,255,128)"; // yellow
|
case stInternal: return "rgb(255,255,128)"; // yellow
|
||||||
case stEnsureVertical:
|
case stFloatingVerticalShell:
|
||||||
case stInternalSolid: return "rgb(255,0,255)"; // magenta
|
case stInternalSolid: return "rgb(255,0,255)"; // magenta
|
||||||
case stInternalBridge: return "rgb(0,255,255)";
|
case stInternalBridge: return "rgb(0,255,255)";
|
||||||
case stInternalVoid: return "rgb(128,128,128)";
|
case stInternalVoid: return "rgb(128,128,128)";
|
||||||
|
|
|
@ -15,7 +15,7 @@ enum SurfaceType {
|
||||||
stBottomBridge,
|
stBottomBridge,
|
||||||
// Normal sparse infill.
|
// Normal sparse infill.
|
||||||
stInternal,
|
stInternal,
|
||||||
stEnsureVertical,
|
stFloatingVerticalShell,
|
||||||
// Full infill, supporting the top surfaces and/or defining the verticall wall thickness.
|
// Full infill, supporting the top surfaces and/or defining the verticall wall thickness.
|
||||||
stInternalSolid,
|
stInternalSolid,
|
||||||
// 1st layer of dense infill over sparse infill, printed with a bridging extrusion flow.
|
// 1st layer of dense infill over sparse infill, printed with a bridging extrusion flow.
|
||||||
|
@ -107,8 +107,8 @@ public:
|
||||||
bool is_bridge() const { return this->surface_type == stBottomBridge || this->surface_type == stInternalBridge; }
|
bool is_bridge() const { return this->surface_type == stBottomBridge || this->surface_type == stInternalBridge; }
|
||||||
bool is_external() const { return this->is_top() || this->is_bottom(); }
|
bool is_external() const { return this->is_top() || this->is_bottom(); }
|
||||||
bool is_internal() const { return ! this->is_external(); }
|
bool is_internal() const { return ! this->is_external(); }
|
||||||
bool is_ensure_vertical() const { return this->surface_type == stEnsureVertical; }
|
bool is_floating_vertical_shell() const { return this->surface_type == stFloatingVerticalShell; }
|
||||||
bool is_solid() const { return this->is_external() || this->is_ensure_vertical() || this->surface_type == stInternalSolid || this->surface_type == stInternalBridge; }
|
bool is_solid() const { return this->is_external() || this->is_floating_vertical_shell() || this->surface_type == stInternalSolid || this->surface_type == stInternalBridge; }
|
||||||
bool is_solid_infill() const { return this->surface_type == stInternalSolid; }
|
bool is_solid_infill() const { return this->surface_type == stInternalSolid; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -745,7 +745,7 @@ const std::vector<GCodeViewer::Color> GCodeViewer::Extrusion_Role_Colors {{
|
||||||
{ 0.12f, 0.12f, 1.00f, 1.0f }, // erOverhangPerimeter
|
{ 0.12f, 0.12f, 1.00f, 1.0f }, // erOverhangPerimeter
|
||||||
{ 0.69f, 0.19f, 0.16f, 1.0f }, // erInternalInfill
|
{ 0.69f, 0.19f, 0.16f, 1.0f }, // erInternalInfill
|
||||||
{ 0.59f, 0.33f, 0.80f, 1.0f }, // erSolidInfill
|
{ 0.59f, 0.33f, 0.80f, 1.0f }, // erSolidInfill
|
||||||
{ 0.90f, 0.70f, 0.70f, 1.0f }, // erEnsureVertical
|
{ 0.90f, 0.70f, 0.70f, 1.0f }, // erFloatingVerticalShell
|
||||||
{ 0.94f, 0.25f, 0.25f, 1.0f }, // erTopSolidInfill
|
{ 0.94f, 0.25f, 0.25f, 1.0f }, // erTopSolidInfill
|
||||||
{ 0.40f, 0.36f, 0.78f, 1.0f }, // erBottomSurface
|
{ 0.40f, 0.36f, 0.78f, 1.0f }, // erBottomSurface
|
||||||
{ 1.00f, 0.55f, 0.41f, 1.0f }, // erIroning
|
{ 1.00f, 0.55f, 0.41f, 1.0f }, // erIroning
|
||||||
|
@ -1725,7 +1725,7 @@ void GCodeViewer::render_calibration_thumbnail(ThumbnailData& thumbnail_data, un
|
||||||
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erExternalPerimeter);
|
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erExternalPerimeter);
|
||||||
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erOverhangPerimeter);
|
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erOverhangPerimeter);
|
||||||
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erSolidInfill);
|
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erSolidInfill);
|
||||||
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erEnsureVertical);
|
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erFloatingVerticalShell);
|
||||||
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erTopSolidInfill);
|
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erTopSolidInfill);
|
||||||
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erInternalInfill);
|
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erInternalInfill);
|
||||||
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erBottomSurface);
|
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags | (1 << erBottomSurface);
|
||||||
|
|
Loading…
Reference in New Issue