mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 06:33:57 -06:00
Refactored the gyroid infill.
This commit is contained in:
parent
2edb96062e
commit
edb756c084
2 changed files with 79 additions and 186 deletions
|
@ -1,8 +1,6 @@
|
|||
#ifndef slic3r_FillGyroid_hpp_
|
||||
#define slic3r_FillGyroid_hpp_
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "../libslic3r.h"
|
||||
|
||||
#include "FillBase.hpp"
|
||||
|
@ -12,10 +10,8 @@ namespace Slic3r {
|
|||
class FillGyroid : public Fill
|
||||
{
|
||||
public:
|
||||
|
||||
FillGyroid(){ scaling = 1.75; }
|
||||
virtual Fill* clone() const { return new FillGyroid(*this); };
|
||||
virtual ~FillGyroid() {}
|
||||
FillGyroid() {}
|
||||
virtual Fill* clone() const { return new FillGyroid(*this); }
|
||||
|
||||
// require bridge flow since most of this pattern hangs in air
|
||||
virtual bool use_bridge_flow() const { return true; }
|
||||
|
@ -23,8 +19,7 @@ public:
|
|||
protected:
|
||||
|
||||
// mult of density, to have a good %of weight for each density parameter
|
||||
float scaling;
|
||||
|
||||
float scaling = 1.75;
|
||||
|
||||
virtual void _fill_surface_single(
|
||||
const FillParams ¶ms,
|
||||
|
@ -32,22 +27,6 @@ protected:
|
|||
const std::pair<float, Point> &direction,
|
||||
ExPolygon &expolygon,
|
||||
Polylines &polylines_out);
|
||||
|
||||
// create the gyroid grid to clip.
|
||||
Polylines makeGrid(coord_t gridZ, double density, double layer_width, size_t gridWidth, size_t gridHeight, size_t curveType);
|
||||
//add line poly in reverse if needed into array
|
||||
inline void correctOrderAndAdd(const int num, Polyline poly, Polylines &array);
|
||||
//create a curved horinzontal line (for each x, compute y)
|
||||
Polyline makeLineHori(double xPos, double yPos, double width, double height,
|
||||
double currentYBegin, double segmentSize, coord_t scaleFactor,
|
||||
double zCs, double zSn,
|
||||
bool flip, double decal=0);
|
||||
//create a curved vertival line (for each y, compute x)
|
||||
Polyline makeLineVert(double xPos, double yPos, double width, double height,
|
||||
double currentXBegin, double segmentSize, coord_t scaleFactor,
|
||||
double zCs, double zSn,
|
||||
bool flip, double decal=0);
|
||||
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue