Fix for empty or broken png output.

Fix for instance transformation order error and state invalidation issues with rasterization.
This commit is contained in:
tamasmeszaros 2018-11-29 18:12:40 +01:00
parent bf94751a94
commit 55d62b8295
5 changed files with 54 additions and 161 deletions

View file

@ -33,6 +33,10 @@ class GLCanvas;
using _SLAPrintObjectBase =
PrintObjectBaseWithState<SLAPrint, SLAPrintObjectStep, slaposCount>;
// Layers according to quantized height levels. This will be consumed by
// the printer (rasterizer) in the SLAPrint class.
using LevelID = long long;
class SLAPrintObject : public _SLAPrintObjectBase
{
private: // Prevents erroneous use by other classes.
@ -93,7 +97,6 @@ public:
// to the z coordinate of the object coordinate system.
struct SliceRecord {
using Key = float;
// inline static float scale_back(Key h) { return float(h * SCALING_FACTOR); }
using Idx = size_t;
static const Idx NONE = Idx(-1); // this will be the max limit of size_t
@ -145,6 +148,7 @@ private:
std::vector<bool> m_stepmask;
std::vector<ExPolygons> m_model_slices;
SliceIndex m_slice_index;
std::vector<LevelID> m_level_ids;
// Caching the transformed (m_trafo) raw mesh of the object
mutable CachedObject<TriangleMesh> m_transformed_rmesh;
@ -214,10 +218,6 @@ private:
lref(std::cref(lyr)), copies(std::cref(cp)) {}
};
// Layers according to quantized height levels. This will be consumed by
// the printer (rasterizer) in the SLAPrint class.
using LevelID = long long;
// One level may contain multiple slices from multiple objects and their
// supports
using LayerRefs = std::vector<LayerRef>;