mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_canvas_manager
This commit is contained in:
commit
a54d77699b
17 changed files with 124 additions and 120 deletions
|
@ -535,16 +535,16 @@ int GLVolumeCollection::load_wipe_tower_preview(
|
|||
// We'll now create the box with jagged edge. y-coordinates of the pre-generated model are shifted so that the front
|
||||
// edge has y=0 and centerline of the back edge has y=depth:
|
||||
Pointf3s points;
|
||||
std::vector<Vec3crd> facets;
|
||||
std::vector<Vec3i> facets;
|
||||
float out_points_idx[][3] = { { 0, -depth, 0 }, { 0, 0, 0 }, { 38.453f, 0, 0 }, { 61.547f, 0, 0 }, { 100.0f, 0, 0 }, { 100.0f, -depth, 0 }, { 55.7735f, -10.0f, 0 }, { 44.2265f, 10.0f, 0 },
|
||||
{ 38.453f, 0, 1 }, { 0, 0, 1 }, { 0, -depth, 1 }, { 100.0f, -depth, 1 }, { 100.0f, 0, 1 }, { 61.547f, 0, 1 }, { 55.7735f, -10.0f, 1 }, { 44.2265f, 10.0f, 1 } };
|
||||
int out_facets_idx[][3] = { { 0, 1, 2 }, { 3, 4, 5 }, { 6, 5, 0 }, { 3, 5, 6 }, { 6, 2, 7 }, { 6, 0, 2 }, { 8, 9, 10 }, { 11, 12, 13 }, { 10, 11, 14 }, { 14, 11, 13 }, { 15, 8, 14 },
|
||||
{8, 10, 14}, {3, 12, 4}, {3, 13, 12}, {6, 13, 3}, {6, 14, 13}, {7, 14, 6}, {7, 15, 14}, {2, 15, 7}, {2, 8, 15}, {1, 8, 2}, {1, 9, 8},
|
||||
{0, 9, 1}, {0, 10, 9}, {5, 10, 0}, {5, 11, 10}, {4, 11, 5}, {4, 12, 11} };
|
||||
for (int i = 0; i < 16; ++i)
|
||||
points.push_back(Vec3d(out_points_idx[i][0] / (100.f / min_width), out_points_idx[i][1] + depth, out_points_idx[i][2]));
|
||||
points.emplace_back(out_points_idx[i][0] / (100.f / min_width), out_points_idx[i][1] + depth, out_points_idx[i][2]);
|
||||
for (int i = 0; i < 28; ++i)
|
||||
facets.push_back(Vec3crd(out_facets_idx[i][0], out_facets_idx[i][1], out_facets_idx[i][2]));
|
||||
facets.emplace_back(out_facets_idx[i][0], out_facets_idx[i][1], out_facets_idx[i][2]);
|
||||
TriangleMesh tooth_mesh(points, facets);
|
||||
|
||||
// We have the mesh ready. It has one tooth and width of min_width. We will now append several of these together until we are close to
|
||||
|
@ -1901,7 +1901,7 @@ void GLModel::render() const
|
|||
bool GLArrow::on_init()
|
||||
{
|
||||
Pointf3s vertices;
|
||||
std::vector<Vec3crd> triangles;
|
||||
std::vector<Vec3i> triangles;
|
||||
|
||||
// bottom face
|
||||
vertices.emplace_back(0.5, 0.0, -0.1);
|
||||
|
@ -1967,7 +1967,7 @@ GLCurvedArrow::GLCurvedArrow(unsigned int resolution)
|
|||
bool GLCurvedArrow::on_init()
|
||||
{
|
||||
Pointf3s vertices;
|
||||
std::vector<Vec3crd> triangles;
|
||||
std::vector<Vec3i> triangles;
|
||||
|
||||
double ext_radius = 2.5;
|
||||
double int_radius = 1.5;
|
||||
|
|
|
@ -2051,7 +2051,7 @@ void GLCanvas3D::render()
|
|||
// we need to set the mouse's scene position here because the depth buffer
|
||||
// could be invalidated by the following gizmo render methods
|
||||
// this position is used later into on_mouse() to drag the objects
|
||||
m_mouse.scene_position = _mouse_to_3d(m_mouse.position.cast<int>());
|
||||
m_mouse.scene_position = _mouse_to_3d(m_mouse.position.cast<coord_t>());
|
||||
|
||||
_render_current_gizmo();
|
||||
_render_selection_sidebar_hints();
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace GUI {
|
|||
const Transform3d& projection_matrix = camera.get_projection_matrix();
|
||||
|
||||
// bounding box created from the rectangle corners - will take care of order of the corners
|
||||
BoundingBox rectangle(Points{ Point(m_start_corner.cast<int>()), Point(m_end_corner.cast<int>()) });
|
||||
BoundingBox rectangle(Points{ Point(m_start_corner.cast<coord_t>()), Point(m_end_corner.cast<coord_t>()) });
|
||||
|
||||
// Iterate over all points and determine whether they're in the rectangle.
|
||||
for (unsigned int i = 0; i<points.size(); ++i) {
|
||||
|
|
|
@ -223,7 +223,8 @@ void MainFrame::update_title()
|
|||
if (idx_plus != build_id.npos) {
|
||||
// Parse what is behind the '+'. If there is a number, then it is a build number after the label, and full build ID is shown.
|
||||
int commit_after_label;
|
||||
if (! boost::starts_with(build_id.data() + idx_plus + 1, "UNKNOWN") && sscanf(build_id.data() + idx_plus + 1, "%d-", &commit_after_label) == 0) {
|
||||
if (! boost::starts_with(build_id.data() + idx_plus + 1, "UNKNOWN") &&
|
||||
(build_id.at(idx_plus + 1) == '-' || sscanf(build_id.data() + idx_plus + 1, "%d-", &commit_after_label) == 0)) {
|
||||
// It is a release build.
|
||||
build_id.erase(build_id.begin() + idx_plus, build_id.end());
|
||||
#if defined(_WIN32) && ! defined(_WIN64)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue