mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 04:32:01 +08:00
Removed some legacy unused code which caused overflows with larger beds,
the problem was not visible in Release mode (SPE-2318)
This commit is contained in:
parent
06a7099fa3
commit
21651f185b
@ -85,7 +85,6 @@ bool Bed3D::set_shape(const Pointfs& bed_shape, const double max_print_height, c
|
|||||||
const BoundingBox bbox = m_contour.contour.bounding_box();
|
const BoundingBox bbox = m_contour.contour.bounding_box();
|
||||||
if (!bbox.defined)
|
if (!bbox.defined)
|
||||||
throw RuntimeError(std::string("Invalid bed shape"));
|
throw RuntimeError(std::string("Invalid bed shape"));
|
||||||
m_polygon = offset(m_contour.contour, (float)bbox.radius() * 1.7f, jtRound, scale_(0.5)).front();
|
|
||||||
|
|
||||||
m_triangles.reset();
|
m_triangles.reset();
|
||||||
m_gridlines.reset();
|
m_gridlines.reset();
|
||||||
@ -104,16 +103,6 @@ bool Bed3D::set_shape(const Pointfs& bed_shape, const double max_print_height, c
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Bed3D::contains(const Point& point) const
|
|
||||||
{
|
|
||||||
return m_polygon.contains(point);
|
|
||||||
}
|
|
||||||
|
|
||||||
Point Bed3D::point_projection(const Point& point) const
|
|
||||||
{
|
|
||||||
return m_polygon.point_projection(point);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Bed3D::render(GLCanvas3D& canvas, const Transform3d& view_matrix, const Transform3d& projection_matrix, bool bottom, float scale_factor, bool show_texture)
|
void Bed3D::render(GLCanvas3D& canvas, const Transform3d& view_matrix, const Transform3d& projection_matrix, bool bottom, float scale_factor, bool show_texture)
|
||||||
{
|
{
|
||||||
render_internal(canvas, view_matrix, projection_matrix, bottom, scale_factor, show_texture, false);
|
render_internal(canvas, view_matrix, projection_matrix, bottom, scale_factor, show_texture, false);
|
||||||
|
@ -41,8 +41,6 @@ private:
|
|||||||
BoundingBoxf3 m_extended_bounding_box;
|
BoundingBoxf3 m_extended_bounding_box;
|
||||||
// Print bed polygon
|
// Print bed polygon
|
||||||
ExPolygon m_contour;
|
ExPolygon m_contour;
|
||||||
// Slightly expanded print bed polygon, for collision detection.
|
|
||||||
Polygon m_polygon;
|
|
||||||
GLModel m_triangles;
|
GLModel m_triangles;
|
||||||
GLModel m_gridlines;
|
GLModel m_gridlines;
|
||||||
GLModel m_contourlines;
|
GLModel m_contourlines;
|
||||||
@ -76,11 +74,6 @@ public:
|
|||||||
// Bounding box around the print bed, axes and model, for rendering.
|
// Bounding box around the print bed, axes and model, for rendering.
|
||||||
const BoundingBoxf3& extended_bounding_box() const { return m_extended_bounding_box; }
|
const BoundingBoxf3& extended_bounding_box() const { return m_extended_bounding_box; }
|
||||||
|
|
||||||
// Check against an expanded 2d bounding box.
|
|
||||||
//FIXME shall one check against the real build volume?
|
|
||||||
bool contains(const Point& point) const;
|
|
||||||
Point point_projection(const Point& point) const;
|
|
||||||
|
|
||||||
void render(GLCanvas3D& canvas, const Transform3d& view_matrix, const Transform3d& projection_matrix, bool bottom, float scale_factor, bool show_texture);
|
void render(GLCanvas3D& canvas, const Transform3d& view_matrix, const Transform3d& projection_matrix, bool bottom, float scale_factor, bool show_texture);
|
||||||
void render_axes();
|
void render_axes();
|
||||||
void render_for_picking(GLCanvas3D& canvas, const Transform3d& view_matrix, const Transform3d& projection_matrix, bool bottom, float scale_factor);
|
void render_for_picking(GLCanvas3D& canvas, const Transform3d& view_matrix, const Transform3d& projection_matrix, bool bottom, float scale_factor);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user