mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 02:52:10 +00:00
ENH: preview: refine the logic to switch camera view
when switch between preview and view3D, if the screen center is on the plate don't change to the plate view Change-Id: I16b8815ad9b10a7cea174faa6a16bb9e582a77c3
This commit is contained in:
@@ -1840,7 +1840,7 @@ bool PartPlate::set_shape(const Pointfs& shape, const Pointfs& exclude_areas, Ve
|
||||
ExPolygon logo_poly;
|
||||
generate_logo_polygon(logo_poly);
|
||||
if (!m_logo_triangles.set_from_triangles(triangulate_expolygon_2f(logo_poly, NORMALS_UP), GROUND_Z+0.02f))
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ":Unable to create plate triangles\n";
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ":Unable to create logo triangles\n";
|
||||
|
||||
ExPolygon poly;
|
||||
/*for (const Vec2d& p : m_shape) {
|
||||
@@ -1883,9 +1883,9 @@ const BoundingBox PartPlate::get_bounding_box_crd()
|
||||
return plate_shape.bounding_box();
|
||||
}
|
||||
|
||||
bool PartPlate::contains(const Point& point) const
|
||||
bool PartPlate::contains(const Vec3d& point) const
|
||||
{
|
||||
return m_polygon.contains(point);
|
||||
return m_bounding_box.contains(point);
|
||||
}
|
||||
|
||||
bool PartPlate::contains(const GLVolume& v) const
|
||||
@@ -1917,11 +1917,6 @@ bool PartPlate::intersects(const BoundingBoxf3& bb) const
|
||||
return print_volume.intersects(bb);
|
||||
}
|
||||
|
||||
Point PartPlate::point_projection(const Point& point) const
|
||||
{
|
||||
return m_polygon.point_projection(point);
|
||||
}
|
||||
|
||||
void PartPlate::render(bool bottom, bool only_body, bool force_background_color, HeightLimitMode mode, int hover_id)
|
||||
{
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
|
||||
Reference in New Issue
Block a user