mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
Preparation for new infill
This commit is contained in:
parent
add3894e8c
commit
42a7f2b1d8
9 changed files with 95 additions and 1 deletions
53
src/libslic3r/Fill/FillAdaptive.hpp
Normal file
53
src/libslic3r/Fill/FillAdaptive.hpp
Normal file
|
@ -0,0 +1,53 @@
|
|||
#ifndef slic3r_FillAdaptive_hpp_
|
||||
#define slic3r_FillAdaptive_hpp_
|
||||
|
||||
#include "FillBase.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
namespace FillAdaptive_Internal
|
||||
{
|
||||
struct CubeProperties
|
||||
{
|
||||
double edge_length; // Lenght of edge of a cube
|
||||
double height; // Height of rotated cube (standing on the corner)
|
||||
double diagonal_length; // Length of diagonal of a cube a face
|
||||
double line_z_distance; // Defines maximal distance from a center of a cube on Z axis on which lines will be created
|
||||
double line_xy_distance;// Defines maximal distance from a center of a cube on X and Y axis on which lines will be created
|
||||
};
|
||||
|
||||
struct Cube
|
||||
{
|
||||
Vec3d center;
|
||||
size_t depth;
|
||||
CubeProperties properties;
|
||||
std::vector<Cube*> children;
|
||||
};
|
||||
|
||||
struct Octree
|
||||
{
|
||||
Cube *root_cube;
|
||||
Vec3d origin;
|
||||
};
|
||||
}; // namespace FillAdaptive_Internal
|
||||
|
||||
class FillAdaptive : public Fill
|
||||
{
|
||||
public:
|
||||
virtual ~FillAdaptive() {}
|
||||
|
||||
protected:
|
||||
virtual Fill* clone() const { return new FillAdaptive(*this); };
|
||||
virtual void _fill_surface_single(
|
||||
const FillParams ¶ms,
|
||||
unsigned int thickness_layers,
|
||||
const std::pair<float, Point> &direction,
|
||||
ExPolygon &expolygon,
|
||||
Polylines &polylines_out);
|
||||
|
||||
virtual bool no_sort() const { return true; }
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif // slic3r_FillAdaptive_hpp_
|
Loading…
Add table
Add a link
Reference in a new issue