mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-11 19:17:33 +00:00
rename 2DHoneycomb and 2DLattice to LateralHoneycomb and LateralLattice (#10423)
* rename 2DHoneycomb and 2DLattice to LateralHoneycomb and LateralLattice * more renaming
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ¶m
|
||||
return polylines_out;
|
||||
}
|
||||
|
||||
Polylines Fill2DLattice::fill_surface(const Surface *surface, const FillParams ¶ms)
|
||||
Polylines FillLateralLattice::fill_surface(const Surface *surface, const FillParams ¶ms)
|
||||
{
|
||||
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 ¶ms)
|
||||
Polylines FillLateralHoneycomb::fill_surface(const Surface *surface, const FillParams ¶ms)
|
||||
{
|
||||
// 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)
|
||||
|
||||
@@ -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 ¶ms) 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 ¶ms) override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user