ENH: render default bed when use third-party printer

Change-Id: Ia6ffa5913159e71f89b00b9311be56608d6721d9
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2022-10-13 19:48:49 +08:00 committed by Lane.Wei
parent 35d2e91d68
commit 90f19d27f0
2 changed files with 49 additions and 13 deletions

View file

@ -1,7 +1,7 @@
#ifndef slic3r_3DBed_hpp_
#define slic3r_3DBed_hpp_
//#include "GLTexture.hpp"
#include "GLTexture.hpp"
#include "3DScene.hpp"
#include "GLModel.hpp"
@ -90,10 +90,10 @@ private:
// Print volume bounding box exteded with axes and model.
BoundingBoxf3 m_extended_bounding_box;
// Slightly expanded print bed polygon, for collision detection.
//Polygon m_polygon;
//GeometryBuffer m_triangles;
//GeometryBuffer m_gridlines;
//GLTexture m_texture;
Polygon m_polygon;
GeometryBuffer m_triangles;
GeometryBuffer m_gridlines;
GLTexture m_texture;
// temporary texture shown until the main texture has still no levels compressed
//GLTexture m_temp_texture;
GLModel m_model;
@ -148,6 +148,8 @@ private:
void calc_triangles(const ExPolygon& poly);
void calc_gridlines(const ExPolygon& poly, const BoundingBox& bed_bbox);
void update_model_offset() const;
//BBS: with offset
GeometryBuffer update_bed_triangles() const;
static std::tuple<Type, std::string, std::string> detect_type(const Pointfs& shape);
void render_internal(GLCanvas3D& canvas, bool bottom, float scale_factor,
bool show_axes);