mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Code cleanup
This commit is contained in:
parent
fd3a31651c
commit
a3a1c20172
2 changed files with 38 additions and 28 deletions
|
@ -24,12 +24,18 @@ namespace FillAdaptive_Internal
|
|||
size_t depth;
|
||||
CubeProperties properties;
|
||||
std::vector<std::unique_ptr<Cube>> children;
|
||||
|
||||
Cube(const Vec3d ¢er, size_t depth, const CubeProperties &properties)
|
||||
: center(center), depth(depth), properties(properties) {}
|
||||
};
|
||||
|
||||
struct Octree
|
||||
{
|
||||
std::unique_ptr<Cube> root_cube;
|
||||
Vec3d origin;
|
||||
|
||||
Octree(std::unique_ptr<Cube> rootCube, const Vec3d &origin)
|
||||
: root_cube(std::move(rootCube)), origin(origin) {}
|
||||
};
|
||||
}; // namespace FillAdaptive_Internal
|
||||
|
||||
|
@ -54,9 +60,9 @@ protected:
|
|||
|
||||
virtual bool no_sort() const { return true; }
|
||||
|
||||
void generate_polylines(FillAdaptive_Internal::Cube *cube, double z_position, const Vec3d &origin, std::vector<Polylines> &polylines_out);
|
||||
void generate_infill_lines(FillAdaptive_Internal::Cube *cube, double z_position, const Vec3d &origin, std::vector<Lines> &dir_lines_out);
|
||||
|
||||
void merge_polylines(Polylines &polylines, const Line &new_line);
|
||||
void connect_lines(Lines &lines, const Line &new_line);
|
||||
|
||||
public:
|
||||
static std::unique_ptr<FillAdaptive_Internal::Octree> build_octree(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue