Solving issue with first empty layer.
This commit is contained in:
parent
519f5e5ea7
commit
831de96a81
3 changed files with 10 additions and 4 deletions
|
@ -1746,7 +1746,7 @@ SlicedSupports SLASupportTree::slice(float layerh, float init_layerh) const
|
|||
const Pad& pad = m_impl->pad();
|
||||
if(!pad.empty()) gndlvl -= float(get_pad_elevation(pad.cfg));
|
||||
|
||||
std::vector<float> heights = {gndlvl};
|
||||
std::vector<float> heights;
|
||||
heights.reserve(size_t(modelh/layerh) + 1);
|
||||
|
||||
for(float h = gndlvl + init_layerh; h < gndlvl + modelh; h += layerh) {
|
||||
|
|
|
@ -732,9 +732,7 @@ void SLAPrint::process()
|
|||
po.m_supportdata->level_ids.reserve(sslices.size());
|
||||
|
||||
for(int i = 0; i < int(sslices.size()); ++i) {
|
||||
int a = i == 0 ? 0 : 1;
|
||||
int b = i == 0 ? 0 : i - 1;
|
||||
LevelID h = sminZ + a * sih + b * slh;
|
||||
LevelID h = sminZ + sih + i * slh;
|
||||
po.m_supportdata->level_ids.emplace_back(h);
|
||||
|
||||
float fh = float(double(h) * SCALING_FACTOR);
|
||||
|
|
|
@ -148,8 +148,16 @@ private:
|
|||
|
||||
// Which steps have to be performed. Implicitly: all
|
||||
std::vector<bool> m_stepmask;
|
||||
|
||||
// Individual 2d slice polygons from lower z to higher z levels
|
||||
std::vector<ExPolygons> m_model_slices;
|
||||
|
||||
// Exact (float) height levels mapped to the slices. Each record contains
|
||||
// the index to the model and the support slice vectors.
|
||||
SliceIndex m_slice_index;
|
||||
|
||||
// The height levels corrected and scaled up in integer values. This will
|
||||
// be used at rasterization.
|
||||
std::vector<LevelID> m_level_ids;
|
||||
|
||||
// Caching the transformed (m_trafo) raw mesh of the object
|
||||
|
|
Loading…
Reference in a new issue