rename 2DHoneycomb and 2DLattice to LateralHoneycomb and LateralLattice (#10423)

* rename 2DHoneycomb and 2DLattice to LateralHoneycomb and LateralLattice

* more renaming
This commit is contained in:
SoftFever
2025-08-17 23:49:06 +08:00
committed by GitHub
parent 9e0df24b9a
commit 6ae89f7d9b
36 changed files with 191 additions and 191 deletions
+15 -15
View File
@@ -68,13 +68,13 @@ struct SurfaceFillParams
float solid_infill_speed = 0;
// Params for lattice infill angles
float lattice_angle_1 = 0.f;
float lattice_angle_2 = 0.f;
float lateral_lattice_angle_1 = 0.f;
float lateral_lattice_angle_2 = 0.f;
float infill_lock_depth = 0;
float skin_infill_depth = 0;
bool symmetric_infill_y_axis = false;
// Params for 2D honeycomb
// Params for Lateral honeycomb
float infill_overhang_angle = 60.f;
bool operator<(const SurfaceFillParams &rhs) const {
@@ -103,8 +103,8 @@ struct SurfaceFillParams
RETURN_COMPARE_NON_EQUAL(sparse_infill_speed);
RETURN_COMPARE_NON_EQUAL(top_surface_speed);
RETURN_COMPARE_NON_EQUAL(solid_infill_speed);
RETURN_COMPARE_NON_EQUAL(lattice_angle_1);
RETURN_COMPARE_NON_EQUAL(lattice_angle_2);
RETURN_COMPARE_NON_EQUAL(lateral_lattice_angle_1);
RETURN_COMPARE_NON_EQUAL(lateral_lattice_angle_2);
RETURN_COMPARE_NON_EQUAL(symmetric_infill_y_axis);
RETURN_COMPARE_NON_EQUAL(infill_lock_depth);
RETURN_COMPARE_NON_EQUAL(skin_infill_depth); RETURN_COMPARE_NON_EQUAL(infill_overhang_angle);
@@ -130,8 +130,8 @@ struct SurfaceFillParams
this->sparse_infill_speed == rhs.sparse_infill_speed &&
this->top_surface_speed == rhs.top_surface_speed &&
this->solid_infill_speed == rhs.solid_infill_speed &&
this->lattice_angle_1 == rhs.lattice_angle_1 &&
this->lattice_angle_2 == rhs.lattice_angle_2 &&
this->lateral_lattice_angle_1 == rhs.lateral_lattice_angle_1 &&
this->lateral_lattice_angle_2 == rhs.lateral_lattice_angle_2 &&
this->infill_lock_depth == rhs.infill_lock_depth &&
this->skin_infill_depth == rhs.skin_infill_depth &&
this->infill_overhang_angle == rhs.infill_overhang_angle;
@@ -653,8 +653,8 @@ std::vector<SurfaceFill> group_fills(const Layer &layer, LockRegionParam &lock_p
params.pattern = region_config.sparse_infill_pattern.value;
params.density = float(region_config.sparse_infill_density);
params.multiline = int(region_config.fill_multiline);
params.lattice_angle_1 = region_config.lattice_angle_1;
params.lattice_angle_2 = region_config.lattice_angle_2;
params.lateral_lattice_angle_1 = region_config.lateral_lattice_angle_1;
params.lateral_lattice_angle_2 = region_config.lateral_lattice_angle_2;
params.infill_overhang_angle = region_config.infill_overhang_angle;
params.angle = 0.;
if (params.pattern == ipLockedZag) {
@@ -1041,8 +1041,8 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
params.resolution = resolution;
params.use_arachne = surface_fill.params.pattern == ipConcentric || surface_fill.params.pattern == ipConcentricInternal;
params.layer_height = layerm->layer()->height;
params.lattice_angle_1 = surface_fill.params.lattice_angle_1;
params.lattice_angle_2 = surface_fill.params.lattice_angle_2;
params.lateral_lattice_angle_1 = surface_fill.params.lateral_lattice_angle_1;
params.lateral_lattice_angle_2 = surface_fill.params.lateral_lattice_angle_2;
params.infill_overhang_angle = surface_fill.params.infill_overhang_angle;
// BBS
@@ -1320,14 +1320,14 @@ Polylines Layer::generate_sparse_infill_polylines_for_anchoring(FillAdaptive::Oc
case ipMonotonicLine:
case ipAlignedRectilinear:
case ipGrid:
case ip2DLattice:
case ipLateralLattice:
case ipTriangles:
case ipStars:
case ipCubic:
case ipLine:
case ipConcentric:
case ipHoneycomb:
case ip2DHoneycomb:
case ipLateralHoneycomb:
case ip3DHoneycomb:
case ipGyroid:
case ipTpmsD:
@@ -1381,8 +1381,8 @@ Polylines Layer::generate_sparse_infill_polylines_for_anchoring(FillAdaptive::Oc
params.resolution = resolution;
params.use_arachne = false;
params.layer_height = layerm.layer()->height;
params.lattice_angle_1 = surface_fill.params.lattice_angle_1;
params.lattice_angle_2 = surface_fill.params.lattice_angle_2;
params.lateral_lattice_angle_1 = surface_fill.params.lateral_lattice_angle_1;
params.lateral_lattice_angle_2 = surface_fill.params.lateral_lattice_angle_2;
params.infill_overhang_angle = surface_fill.params.infill_overhang_angle;
params.multiline = surface_fill.params.multiline;
+2 -2
View File
@@ -41,7 +41,7 @@ Fill* Fill::new_from_type(const InfillPattern type)
switch (type) {
case ipConcentric: return new FillConcentric();
case ipHoneycomb: return new FillHoneycomb();
case ip2DHoneycomb: return new Fill2DHoneycomb();
case ipLateralHoneycomb: return new FillLateralHoneycomb();
case ip3DHoneycomb: return new Fill3DHoneycomb();
case ipGyroid: return new FillGyroid();
case ipTpmsD: return new FillTpmsD();//from creality print
@@ -52,7 +52,7 @@ Fill* Fill::new_from_type(const InfillPattern type)
case ipMonotonic: return new FillMonotonic();
case ipLine: return new FillLine();
case ipGrid: return new FillGrid();
case ip2DLattice: return new Fill2DLattice();
case ipLateralLattice: return new FillLateralLattice();
case ipTriangles: return new FillTriangles();
case ipStars: return new FillStars();
case ipCubic: return new FillCubic();
+4 -4
View File
@@ -79,12 +79,12 @@ struct FillParams
// Layer height for Concentric infill with Arachne.
coordf_t layer_height { 0.f };
// For 2D lattice
coordf_t lattice_angle_1 { 0.f };
coordf_t lattice_angle_2 { 0.f };
// For Lateral lattice
coordf_t lateral_lattice_angle_1 { 0.f };
coordf_t lateral_lattice_angle_2 { 0.f };
InfillPattern pattern{ ipRectilinear };
// For 2D Honeycomb
// For Lateral Honeycomb
float infill_overhang_angle { 60 };
// BBS
+9 -9
View File
@@ -3025,7 +3025,7 @@ bool FillRectilinear::fill_surface_by_multilines(const Surface *surface, FillPar
}
}
if ((params.pattern == ip2DLattice || params.pattern == ip2DHoneycomb ) && params.multiline >1 )
if ((params.pattern == ipLateralLattice || params.pattern == ipLateralHoneycomb ) && params.multiline >1 )
remove_overlapped(fill_lines, line_width);
if (!fill_lines.empty()) {
@@ -3090,16 +3090,16 @@ Polylines FillGrid::fill_surface(const Surface *surface, const FillParams &param
return polylines_out;
}
Polylines Fill2DLattice::fill_surface(const Surface *surface, const FillParams &params)
Polylines FillLateralLattice::fill_surface(const Surface *surface, const FillParams &params)
{
Polylines polylines_out;
coordf_t dx1 = tan(Geometry::deg2rad(params.lattice_angle_1)) * z;
coordf_t dx2 = tan(Geometry::deg2rad(params.lattice_angle_2)) * z;
coordf_t dx1 = tan(Geometry::deg2rad(params.lateral_lattice_angle_1)) * z;
coordf_t dx2 = tan(Geometry::deg2rad(params.lateral_lattice_angle_2)) * z;
if (! this->fill_surface_by_multilines(
surface, params,
{ { float(M_PI / 2.), float(dx1) }, { float(M_PI / 2.), float(dx2) } },
polylines_out))
BOOST_LOG_TRIVIAL(error) << "Fill2DLattice::fill_surface() failed to fill a region.";
BOOST_LOG_TRIVIAL(error) << "FillLateralLattice::fill_surface() failed to fill a region.";
if (this->layer_id % 2 == 1)
for (int i = 0; i < polylines_out.size(); i++)
@@ -3172,9 +3172,9 @@ Polylines FillQuarterCubic::fill_surface(const Surface* surface, const FillParam
return polylines_out;
}
Polylines Fill2DHoneycomb::fill_surface(const Surface *surface, const FillParams &params)
Polylines FillLateralHoneycomb::fill_surface(const Surface *surface, const FillParams &params)
{
// the 2D honeycomb is generated based on a base pattern of an inverted Y with its junction at height zero
// the lateral honeycomb is generated based on a base pattern of an inverted Y with its junction at height zero
// |
// |
// 0 --+--
@@ -3211,7 +3211,7 @@ Polylines Fill2DHoneycomb::fill_surface(const Surface *surface, const FillParams
surface, multiline_params,
{ { half_pi, horizontal_offset } },
polylines_out))
BOOST_LOG_TRIVIAL(error) << "Fill2DHoneycomb::fill_surface() failed to fill a region.";
BOOST_LOG_TRIVIAL(error) << "FillLateralHoneycomb::fill_surface() failed to fill a region.";
} else {
FillParams multiline_params = params;
multiline_params.density *= 2 / (1*(2/3.) + 2*(1/3.));
@@ -3222,7 +3222,7 @@ Polylines Fill2DHoneycomb::fill_surface(const Surface *surface, const FillParams
surface, multiline_params,
{ { half_pi, -horizontal_position + horizontal_offset }, { half_pi, horizontal_position + horizontal_offset } },
polylines_out))
BOOST_LOG_TRIVIAL(error) << "Fill2DHoneycomb::fill_surface() failed to fill a region.";
BOOST_LOG_TRIVIAL(error) << "FillLateralHoneycomb::fill_surface() failed to fill a region.";
}
if (this->layer_id % 2 == 1)
+6 -6
View File
@@ -76,11 +76,11 @@ protected:
float _layer_angle(size_t idx) const override { return 0.f; }
};
class Fill2DLattice : public FillRectilinear
class FillLateralLattice : public FillRectilinear
{
public:
Fill* clone() const override { return new Fill2DLattice(*this); }
~Fill2DLattice() override = default;
Fill* clone() const override { return new FillLateralLattice(*this); }
~FillLateralLattice() override = default;
Polylines fill_surface(const Surface *surface, const FillParams &params) override;
protected:
@@ -140,11 +140,11 @@ protected:
float _layer_angle(size_t idx) const override { return 0.f; }
};
class Fill2DHoneycomb : public FillAlignedRectilinear
class FillLateralHoneycomb : public FillAlignedRectilinear
{
public:
Fill* clone() const override { return new Fill2DHoneycomb(*this); }
~Fill2DHoneycomb() override = default;
Fill* clone() const override { return new FillLateralHoneycomb(*this); }
~FillLateralHoneycomb() override = default;
Polylines fill_surface(const Surface *surface, const FillParams &params) override;
};
+2 -2
View File
@@ -396,13 +396,13 @@ coordf_t Layer::get_sparse_infill_max_void_area()
case ipAlignedRectilinear:
case ipOctagramSpiral:
case ipHilbertCurve:
case ip2DHoneycomb:
case ipLateralHoneycomb:
case ip3DHoneycomb:
case ipArchimedeanChords:
max_void_area = std::max(max_void_area, spacing * spacing);
break;
case ipGrid:
case ip2DLattice:
case ipLateralLattice:
case ipHoneycomb:
case ipLightning:
max_void_area = std::max(max_void_area, 4.0 * spacing * spacing);
+1 -1
View File
@@ -792,7 +792,7 @@ static std::vector<std::string> s_Preset_print_options {
"layer_height", "initial_layer_print_height", "wall_loops", "alternate_extra_wall", "slice_closing_radius", "spiral_mode", "spiral_mode_smooth", "spiral_mode_max_xy_smoothing", "spiral_starting_flow_ratio", "spiral_finishing_flow_ratio", "slicing_mode",
"top_shell_layers", "top_shell_thickness", "top_surface_density", "bottom_surface_density", "bottom_shell_layers", "bottom_shell_thickness",
"extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold","overhang_reverse_internal_only", "wall_direction",
"seam_position", "staggered_inner_seams", "wall_sequence", "is_infill_first", "sparse_infill_density","fill_multiline", "sparse_infill_pattern", "lattice_angle_1", "lattice_angle_2", "infill_overhang_angle", "top_surface_pattern", "bottom_surface_pattern",
"seam_position", "staggered_inner_seams", "wall_sequence", "is_infill_first", "sparse_infill_density","fill_multiline", "sparse_infill_pattern", "lateral_lattice_angle_1", "lateral_lattice_angle_2", "infill_overhang_angle", "top_surface_pattern", "bottom_surface_pattern",
"infill_direction", "solid_infill_direction", "counterbore_hole_bridging","infill_shift_step", "sparse_infill_rotate_template", "solid_infill_rotate_template", "symmetric_infill_y_axis","skeleton_infill_density", "infill_lock_depth", "skin_infill_depth", "skin_infill_density",
"align_infill_direction_to_model",
"minimum_sparse_infill_area", "reduce_infill_retraction","internal_solid_infill_pattern","gap_fill_target",
+12 -12
View File
@@ -161,8 +161,8 @@ static t_config_enum_values s_keys_map_InfillPattern {
{ "lightning", ipLightning },
{ "honeycomb", ipHoneycomb },
{ "3dhoneycomb", ip3DHoneycomb },
{ "2dhoneycomb", ip2DHoneycomb },
{ "2dlattice", ip2DLattice },
{ "lateral-honeycomb", ipLateralHoneycomb },
{ "lateral-lattice", ipLateralLattice },
{ "crosshatch", ipCrossHatch },
{ "tpmsd", ipTpmsD },
{ "tpmsfk", ipTpmsFK },
@@ -2414,8 +2414,8 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("lightning");
def->enum_values.push_back("honeycomb");
def->enum_values.push_back("3dhoneycomb");
def->enum_values.push_back("2dhoneycomb");
def->enum_values.push_back("2dlattice");
def->enum_values.push_back("lateral-honeycomb");
def->enum_values.push_back("lateral-lattice");
def->enum_values.push_back("crosshatch");
def->enum_values.push_back("tpmsd");
def->enum_values.push_back("tpmsfk");
@@ -2440,8 +2440,8 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Lightning"));
def->enum_labels.push_back(L("Honeycomb"));
def->enum_labels.push_back(L("3D Honeycomb"));
def->enum_labels.push_back(L("2D Honeycomb"));
def->enum_labels.push_back(L("2D Lattice"));
def->enum_labels.push_back(L("Lateral Honeycomb"));
def->enum_labels.push_back(L("Lateral Lattice"));
def->enum_labels.push_back(L("Cross Hatch"));
def->enum_labels.push_back(L("TPMS-D"));
def->enum_labels.push_back(L("TPMS-FK"));
@@ -2452,20 +2452,20 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Octagram Spiral"));
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipCrossHatch));
def = this->add("lattice_angle_1", coFloat);
def->label = L("Lattice angle 1");
def = this->add("lateral_lattice_angle_1", coFloat);
def->label = L("Lateral lattice angle 1");
def->category = L("Strength");
def->tooltip = L("The angle of the first set of 2D lattice elements in the Z direction. Zero is vertical.");
def->tooltip = L("The angle of the first set of Lateral lattice elements in the Z direction. Zero is vertical.");
def->sidetext = "°"; // degrees, don't need translation
def->min = -75;
def->max = 75;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(-45));
def = this->add("lattice_angle_2", coFloat);
def->label = L("Lattice angle 2");
def = this->add("lateral_lattice_angle_2", coFloat);
def->label = L("Lateral lattice angle 2");
def->category = L("Strength");
def->tooltip = L("The angle of the second set of 2D lattice elements in the Z direction. Zero is vertical.");
def->tooltip = L("The angle of the second set of Lateral lattice elements in the Z direction. Zero is vertical.");
def->sidetext = "°"; // degrees, don't need translation
def->min = -75;
def->max = 75;
+3 -3
View File
@@ -70,7 +70,7 @@ enum InfillPattern : int {
ipLine, ipGrid,
ipTriangles, ipStars,
ipCubic, ipAdaptiveCubic, ipQuarterCubic, ipSupportCubic, ipLightning,
ipHoneycomb, ip3DHoneycomb, ip2DHoneycomb, ip2DLattice,
ipHoneycomb, ip3DHoneycomb, ipLateralHoneycomb, ipLateralLattice,
ipCrossHatch, ipTpmsD, ipTpmsFK, ipGyroid,
ipConcentric, ipHilbertCurve, ipArchimedeanChords, ipOctagramSpiral,
ipSupportBase, ipConcentricInternal,
@@ -981,8 +981,8 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionString, sparse_infill_rotate_template))
((ConfigOptionPercent, sparse_infill_density))
((ConfigOptionEnum<InfillPattern>, sparse_infill_pattern))
((ConfigOptionFloat, lattice_angle_1))
((ConfigOptionFloat, lattice_angle_2))
((ConfigOptionFloat, lateral_lattice_angle_1))
((ConfigOptionFloat, lateral_lattice_angle_2))
((ConfigOptionFloat, infill_overhang_angle))
((ConfigOptionBool, align_infill_direction_to_model))
((ConfigOptionEnum<FuzzySkinType>, fuzzy_skin))
+4 -4
View File
@@ -1098,8 +1098,8 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "bottom_surface_density"
|| opt_key == "initial_layer_line_width"
|| opt_key == "small_area_infill_flow_compensation"
|| opt_key == "lattice_angle_1"
|| opt_key == "lattice_angle_2"
|| opt_key == "lateral_lattice_angle_1"
|| opt_key == "lateral_lattice_angle_2"
|| opt_key == "infill_overhang_angle") {
steps.emplace_back(posInfill);
} else if (opt_key == "sparse_infill_pattern"
@@ -3785,10 +3785,10 @@ void PrintObject::combine_infill()
((infill_pattern == ipRectilinear ||
infill_pattern == ipMonotonic ||
infill_pattern == ipGrid ||
infill_pattern == ip2DLattice ||
infill_pattern == ipLateralLattice ||
infill_pattern == ipLine ||
infill_pattern == ipHoneycomb ||
infill_pattern == ip2DHoneycomb) ? 1.5f : 0.5f) *
infill_pattern == ipLateralHoneycomb) ? 1.5f : 0.5f) *
layerms.back()->flow(frSolidInfill).scaled_width();
for (ExPolygon &expoly : intersection)
polygons_append(intersection_with_clearance, offset(expoly, clearance_offset));