mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-09-02 06:51:50 -06:00
Add support for structured noise (perlin) fuzzy skin (#7678)
* Add support for perlin noise fuzzy skin * Support multiple types of coherent noise * Updated tooltips for more clarity. * Reorder options as suggested by @discip * Fix accidental removal of & * Move libnoise to deps --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
118e14d788
commit
fd0b2547f2
14 changed files with 200 additions and 24 deletions
|
@ -16,10 +16,21 @@ struct FuzzySkinConfig
|
|||
coord_t thickness;
|
||||
coord_t point_distance;
|
||||
bool fuzzy_first_layer;
|
||||
NoiseType noise_type;
|
||||
double noise_scale;
|
||||
int noise_octaves;
|
||||
double noise_persistence;
|
||||
|
||||
bool operator==(const FuzzySkinConfig& r) const
|
||||
{
|
||||
return type == r.type && thickness == r.thickness && point_distance == r.point_distance && fuzzy_first_layer == r.fuzzy_first_layer;
|
||||
return type == r.type
|
||||
&& thickness == r.thickness
|
||||
&& point_distance == r.point_distance
|
||||
&& fuzzy_first_layer == r.fuzzy_first_layer
|
||||
&& noise_type == r.noise_type
|
||||
&& noise_scale == r.noise_scale
|
||||
&& noise_octaves == r.noise_octaves
|
||||
&& noise_persistence == r.noise_persistence;
|
||||
}
|
||||
|
||||
bool operator!=(const FuzzySkinConfig& r) const { return !(*this == r); }
|
||||
|
@ -35,6 +46,10 @@ template<> struct hash<Slic3r::FuzzySkinConfig>
|
|||
boost::hash_combine(seed, std::hash<coord_t>{}(c.thickness));
|
||||
boost::hash_combine(seed, std::hash<coord_t>{}(c.point_distance));
|
||||
boost::hash_combine(seed, std::hash<bool>{}(c.fuzzy_first_layer));
|
||||
boost::hash_combine(seed, std::hash<Slic3r::NoiseType>{}(c.noise_type));
|
||||
boost::hash_combine(seed, std::hash<double>{}(c.noise_scale));
|
||||
boost::hash_combine(seed, std::hash<int>{}(c.noise_octaves));
|
||||
boost::hash_combine(seed, std::hash<double>{}(c.noise_persistence));
|
||||
return seed;
|
||||
}
|
||||
};
|
||||
|
@ -51,6 +66,7 @@ public:
|
|||
const ExPolygons *lower_slices;
|
||||
double layer_height;
|
||||
int layer_id;
|
||||
coordf_t slice_z;
|
||||
Flow perimeter_flow;
|
||||
Flow ext_perimeter_flow;
|
||||
Flow overhang_flow;
|
||||
|
@ -83,6 +99,7 @@ public:
|
|||
const SurfaceCollection* slices,
|
||||
const LayerRegionPtrs *compatible_regions,
|
||||
double layer_height,
|
||||
coordf_t slice_z,
|
||||
Flow flow,
|
||||
const PrintRegionConfig* config,
|
||||
const PrintObjectConfig* object_config,
|
||||
|
@ -98,7 +115,7 @@ public:
|
|||
//BBS
|
||||
ExPolygons* fill_no_overlap)
|
||||
: slices(slices), compatible_regions(compatible_regions), upper_slices(nullptr), lower_slices(nullptr), layer_height(layer_height),
|
||||
layer_id(-1), perimeter_flow(flow), ext_perimeter_flow(flow),
|
||||
slice_z(slice_z), layer_id(-1), perimeter_flow(flow), ext_perimeter_flow(flow),
|
||||
overhang_flow(flow), solid_infill_flow(flow),
|
||||
config(config), object_config(object_config), print_config(print_config),
|
||||
m_spiral_vase(spiral_mode),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue