Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CURA-10407] Introduce fractional layer-height support gaps #1955

Merged
merged 60 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b621644
Proof-of-concept 'true' support z-offset: half-layer heights.
rburema Sep 21, 2023
a07fb92
Proof-of-concept: fractional support z-distance.
rburema Sep 21, 2023
7bdbe9a
Applied clang-format.
rburema Sep 21, 2023
16d1a84
Fix crash in proof-of-concept code.
rburema Sep 22, 2023
3820d3b
Proof-of-concept. Attempt to fix newly introduced small extrusions.
rburema Sep 22, 2023
94d6007
Applied clang-format.
rburema Sep 22, 2023
7b6453c
Merge branch '5.5' into CURA-11041_fracional_support_gap
casperlamboo Sep 25, 2023
09a2ce9
Merge branch 'CURA-11084_fix_missing_prime' into CURA-11041_fracional…
rburema Sep 26, 2023
b996cd0
Proof-of-concept. Fix partial-layer-height difference for (support) l…
rburema Sep 26, 2023
185a221
Applied clang-format.
rburema Sep 26, 2023
de2c993
Fix comment to be technically correct.
rburema Oct 11, 2023
ad1aa19
Reverted the changes done in CURA-9521
saumyaj3 Oct 3, 2023
88e0f4c
Support brim printed only at layer 0
saumyaj3 Sep 25, 2023
54e4592
Applied clang-format.
saumyaj3 Sep 25, 2023
7a3aa04
Comment fix
saumyaj3 Sep 25, 2023
ff858f3
Comment fix
saumyaj3 Sep 29, 2023
0b18634
Use correct path config
casperlamboo Oct 3, 2023
09bbf91
Change seam position scoring to make it more consistent
wawanbreton Oct 5, 2023
69ff2c9
Better version of the corner angle computation (to be optimized)
wawanbreton Oct 5, 2023
8228272
Applied clang-format.
wawanbreton Oct 5, 2023
9311a7f
Clean and optimized new corner angle computation algorithm
wawanbreton Oct 6, 2023
55c4327
Applied clang-format.
wawanbreton Oct 6, 2023
57a0dae
Removed debug output
wawanbreton Oct 9, 2023
26ea92b
Fixed some edge-cases with new angle calculation
wawanbreton Oct 9, 2023
31399b1
Remove unused variable
casperlamboo Oct 5, 2023
e44da00
Use different config for roofing inner/outer walls
casperlamboo Oct 5, 2023
5a815f6
Applied clang-format.
casperlamboo Oct 5, 2023
0a91c65
the length of brim is correctly calculated in case of no adhesion
saumyaj3 Oct 5, 2023
3f81191
Applied clang-format.
saumyaj3 Oct 5, 2023
edfd1ce
comment for adding if statement
saumyaj3 Oct 6, 2023
1be4124
Applied clang-format.
saumyaj3 Oct 6, 2023
77028a9
Minor optimization
wawanbreton Oct 9, 2023
784ecfc
Applied code suggestion by @casperlamboo
wawanbreton Oct 9, 2023
948f860
Applied clang-format.
wawanbreton Oct 9, 2023
a96e603
pin gRPC defs to 0.1.0-beta.1
jellespijker Oct 10, 2023
6c20ccd
set version to 5.5.0-beta.2
jellespijker Oct 10, 2023
9ab698b
set version to 5.6.0-alpha
jellespijker Oct 10, 2023
81883c0
loosen deps version
jellespijker Oct 10, 2023
ab538dc
Small refactor.
rburema Oct 13, 2023
8c3740d
Support-infill can has fractional layers + refactor spike-code for ro…
rburema Oct 13, 2023
830c56a
Fractional(-support)-layers: Prevent nozzle from impacting build-plate.
rburema Oct 13, 2023
06a0157
Applied clang-format.
rburema Oct 13, 2023
4682128
Fix unit-test.
rburema Oct 13, 2023
3bea298
Introduce fractional roof-top layer-heigths in tree-support.
rburema Oct 17, 2023
ab39a77
Applied clang-format.
rburema Oct 17, 2023
e1e90a4
Print lower fractional layer heights before full ones, pt 1.
rburema Oct 17, 2023
f61991b
Remove debug code and typos.
rburema Oct 17, 2023
774cc0f
Fix flip-around of boolean. Refactor in prep for consolidation.
rburema Oct 17, 2023
7c02094
Consolidate duplicated code into 'fillInfillParts'.
rburema Oct 17, 2023
bd1b634
Print lower fractional layer heights before full ones, pt 2.
rburema Oct 17, 2023
42b3a71
Applied clang-format.
rburema Oct 17, 2023
1fed8a7
Merge branch 'main' into CURA-11041_fracional_support_gap
rburema Oct 18, 2023
e78f42c
Fix slice in fractional support
casperlamboo Oct 24, 2023
131cae1
Applied clang-format.
casperlamboo Oct 24, 2023
1609f0e
Fix possible crash
wawanbreton Oct 25, 2023
01a5b35
Merge remote-tracking branch 'origin/main' into CURA-11041_fracional_…
rburema Oct 25, 2023
98fc849
(From code review.) Small refactors and add documentation.
rburema Oct 25, 2023
78fcc88
Correct for support-gap equal to exact layer-height multiple.
rburema Oct 25, 2023
54edc02
Applied clang-format.
rburema Oct 25, 2023
4a09451
Really correct support z-gap for all heights now hopefully.
rburema Oct 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion include/FffGcodeWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,10 +634,12 @@ class FffGcodeWriter : public NoCopy
* layer.
*
* \param[in] storage Where the slice data is stored.
* \param[in] support_roof_outlines which polygons to generate roofs for -- originally split-up because of fractional (layer-height) layers
* \param[in] current_roof_config config to be used -- most importantly, support has slightly different configs for fractional (layer-height) layers
* \param gcodeLayer The initial planning of the g-code of the layer.
* \return Whether any support skin was added to the layer plan.
*/
bool addSupportRoofsToGCode(const SliceDataStorage& storage, LayerPlan& gcodeLayer) const;
bool addSupportRoofsToGCode(const SliceDataStorage& storage, const Polygons& support_roof_outlines, const GCodePathConfig& current_roof_config, LayerPlan& gcode_layer) const;

/*!
* Add the support bottoms to the layer plan \p gcodeLayer of the current
Expand Down
1 change: 1 addition & 0 deletions include/GCodePathConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace cura
*/
struct GCodePathConfig
{
coord_t z_offset{};
PrintFeatureType type{}; //!< name of the feature type
coord_t line_width{}; //!< width of the line extruded
coord_t layer_thickness{}; //!< current layer height in micron
Expand Down
19 changes: 10 additions & 9 deletions include/LayerPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ class LayerPlan : public NoCopy
*/
GCodePath* getLatestPathWithConfig(
const GCodePathConfig& config,
SpaceFillType space_fill_type,
const coord_t z_offset,
const SpaceFillType space_fill_type,
const Ratio flow = 1.0_r,
const Ratio width_factor = 1.0_r,
bool spiralize = false,
const bool spiralize = false,
const Ratio speed_factor = 1.0_r);

public:
Expand Down Expand Up @@ -281,7 +282,7 @@ class LayerPlan : public NoCopy
* \param p The point to travel to.
* \param force_retract Whether to force a retraction to occur.
*/
GCodePath& addTravel(const Point p, const bool force_retract = false);
GCodePath& addTravel(const Point p, const bool force_retract = false, const coord_t z_offset = 0);

/*!
* Add a travel path to a certain point and retract if needed.
Expand All @@ -291,7 +292,7 @@ class LayerPlan : public NoCopy
* \param p The point to travel to
* \param path (optional) The travel path to which to add the point \p p
*/
GCodePath& addTravel_simple(Point p, GCodePath* path = nullptr);
GCodePath& addTravel_simple(const Point p, GCodePath* path = nullptr);
rburema marked this conversation as resolved.
Show resolved Hide resolved

/*!
* Plan a prime blob at the current location.
Expand All @@ -317,14 +318,14 @@ class LayerPlan : public NoCopy
* \param fan_speed Fan speed override for this path.
*/
void addExtrusionMove(
Point p,
const Point p,
const GCodePathConfig& config,
SpaceFillType space_fill_type,
const SpaceFillType space_fill_type,
const Ratio& flow = 1.0_r,
const Ratio width_factor = 1.0_r,
bool spiralize = false,
Ratio speed_factor = 1.0_r,
double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT);
const bool spiralize = false,
const Ratio speed_factor = 1.0_r,
const double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT);

/*!
* Add polygon to the gcode starting at vertex \p startIdx
Expand Down
19 changes: 10 additions & 9 deletions include/SupportInfillPart.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#ifndef SUPPORT_INFILL_PART_H
#define SUPPORT_INFILL_PART_H

#include <vector>

#include "utils/AABB.h"
#include "utils/ExtrusionLine.h"
#include "utils/polygon.h"

#include <vector>


namespace cura
{
Expand All @@ -25,17 +25,18 @@ namespace cura
class SupportInfillPart
{
public:
PolygonsPart outline; //!< The outline of the support infill area
AABB outline_boundary_box; //!< The boundary box for the infill area
coord_t support_line_width; //!< The support line width
int inset_count_to_generate; //!< The number of insets need to be generated from the outline. This is not the actual insets that will be generated.
std::vector<std::vector<Polygons>> infill_area_per_combine_per_density; //!< a list of separated sub-areas which requires different infill densities and combined thicknesses
// for infill_areas[x][n], x means the density level and n means the thickness
PolygonsPart outline; //!< The outline of the support infill area
AABB outline_boundary_box; //!< The boundary box for the infill area
coord_t support_line_width; //!< The support line width
int inset_count_to_generate; //!< The number of insets need to be generated from the outline. This is not the actual insets that will be generated.
std::vector<std::vector<Polygons>> infill_area_per_combine_per_density; //!< a list of separated sub-areas which requires different infill densities and combined thicknesses
// for infill_areas[x][n], x means the density level and n means the thickness
std::vector<VariableWidthLines> wall_toolpaths; //!< Any walls go here, not in the areas, where they could be combined vertically (don't combine walls). Binned by inset_idx.

coord_t custom_line_distance;
bool use_fractional_config;
rburema marked this conversation as resolved.
Show resolved Hide resolved

SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, int inset_count_to_generate = 0, coord_t custom_line_distance = 0 );
SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate = 0, coord_t custom_line_distance = 0);

const Polygons& getInfillArea() const;
};
Expand Down
1 change: 1 addition & 0 deletions include/pathPlanning/GCodePath.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace cura
*/
struct GCodePath
{
coord_t z_offset{};
rburema marked this conversation as resolved.
Show resolved Hide resolved
GCodePathConfig config{}; //!< The configuration settings of the path.
std::shared_ptr<const SliceMeshStorage> mesh; //!< Which mesh this path belongs to, if any. If it's not part of any mesh, the mesh should be nullptr;
SpaceFillType space_fill_type{}; //!< The type of space filling of which this path is a part
Expand Down
2 changes: 2 additions & 0 deletions include/settings/PathConfigStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class PathConfigStorage
std::vector<GCodePathConfig> prime_tower_config_per_extruder; //!< Configuration for the prime tower per extruder.

std::vector<GCodePathConfig> support_infill_config; //!< The config used to print the normal support, rather than the support interface
std::vector<GCodePathConfig> support_fractional_infill_config; //!< The config used to print the normal support on fractional layer-height parts.
GCodePathConfig support_roof_config; //!< The config used to print the dense roofs of support.
GCodePathConfig support_fractional_roof_config; //!< The config used to print the dense roofs of support on fractional layer-height parts.
GCodePathConfig support_bottom_config; //!< The config to use to print the dense bottoms of support

std::vector<MeshPathConfigs> mesh_configs; //!< For each meash the config for all its feature types
Expand Down
21 changes: 21 additions & 0 deletions include/sliceDataStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ class SupportLayer
std::vector<SupportInfillPart> support_infill_parts; //!< a list of support infill parts
Polygons support_bottom; //!< Piece of support below the support and above the model. This must not overlap with any of the support_infill_parts or support_roof.
Polygons support_roof; //!< Piece of support above the support and below the model. This must not overlap with any of the support_infill_parts or support_bottom.
// NOTE: This is _all_ of the support_roof, and as such, overlaps with support_fractional_roof!
Polygons support_fractional_roof; //!< If the support distance is not exactly a multiple of the layer height,
// the first part of support just underneath the model needs to be printed at a fracional layer height.
Polygons support_mesh_drop_down; //!< Areas from support meshes which should be supported by more support
Polygons support_mesh; //!< Areas from support meshes which should NOT be supported by more support
Polygons anti_overhang; //!< Areas where no overhang should be detected.
Expand All @@ -223,6 +226,24 @@ class SupportLayer
* \param exclude_polygons_boundary_box The boundary box for the polygons to exclude
*/
void excludeAreasFromSupportInfillAreas(const Polygons& exclude_polygons, const AABB& exclude_polygons_boundary_box);

/* Fill up the infill parts for the support with the given support polygons. The support polygons will be split into parts. This also takes into account fractional-height
* support layers.
*
* \param layer_nr Current layer index.
* \param support_fill_per_layer All of the (infill) support (since the layer above might be needed).
* \param support_line_width Line width of the support extrusions.
* \param wall_line_count Wall-line count around the fill.
* \param grow_layer_above (optional, default to 0) In cases where support shrinks per layer up, an appropriate offset may be nescesary.
* \param unionAll (optional, default to false) Wether to 'union all' for the split into parts bit.
*/
void fillInfillParts(
const LayerIndex layer_nr,
const std::vector<Polygons>& support_fill_per_layer,
const coord_t support_line_width,
const coord_t wall_line_count,
const coord_t grow_layer_above = 0,
const bool unionAll = false);
};

class SupportStorage
Expand Down
Loading
Loading