mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
GUI integration of rotation angle setting
This commit is contained in:
parent
3813402aa3
commit
2921302fe9
9 changed files with 26 additions and 10 deletions
|
@ -32,7 +32,7 @@ public:
|
|||
out.y=(x-origin.x) * sin(angle) + (y-origin.y) * cos(angle);
|
||||
return out+origin;
|
||||
}
|
||||
|
||||
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
#define ROTATION_ANGLE 30
|
||||
|
||||
|
||||
namespace Slic3r
|
||||
|
@ -548,7 +547,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::tool_change(unsigned int tool, boo
|
|||
.set_z(m_z_pos)
|
||||
.set_layer_height(m_layer_height)
|
||||
.set_initial_tool(m_current_tool)
|
||||
.set_rotation(this->m_wipe_tower_pos,ROTATION_ANGLE)
|
||||
.set_rotation(this->m_wipe_tower_pos,m_wipe_tower_rotation_angle)
|
||||
.append(";--------------------\n"
|
||||
"; CP TOOLCHANGE START\n")
|
||||
.comment_with_value(" toolchange #", m_num_tool_changes)
|
||||
|
@ -646,7 +645,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::toolchange_Brim(Purpose purpose, b
|
|||
.set_z(m_z_pos)
|
||||
.set_layer_height(m_layer_height)
|
||||
.set_initial_tool(m_current_tool)
|
||||
.set_rotation(this->m_wipe_tower_pos,ROTATION_ANGLE)
|
||||
.set_rotation(this->m_wipe_tower_pos,m_wipe_tower_rotation_angle)
|
||||
.append(
|
||||
";-------------------------------------\n"
|
||||
"; CP WIPE TOWER FIRST LAYER BRIM START\n");
|
||||
|
@ -935,7 +934,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::finish_layer(Purpose purpose)
|
|||
.set_z(m_z_pos)
|
||||
.set_layer_height(m_layer_height)
|
||||
.set_initial_tool(m_current_tool)
|
||||
.set_rotation(this->m_wipe_tower_pos,ROTATION_ANGLE)
|
||||
.set_rotation(this->m_wipe_tower_pos,m_wipe_tower_rotation_angle)
|
||||
.append(";--------------------\n"
|
||||
"; CP EMPTY GRID START\n")
|
||||
// m_num_layer_changes is incremented by set_z, so it is 1 based.
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#include "WipeTower.hpp"
|
||||
|
||||
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
|
||||
|
@ -39,10 +41,11 @@ public:
|
|||
// y -- y coordinates of wipe tower in mm ( left bottom corner )
|
||||
// width -- width of wipe tower in mm ( default 60 mm - leave as it is )
|
||||
// wipe_area -- space available for one toolchange in mm
|
||||
WipeTowerPrusaMM(float x, float y, float width, float wipe_area, unsigned int initial_tool) :
|
||||
WipeTowerPrusaMM(float x, float y, float width, float wipe_area, float rotation_angle, unsigned int initial_tool) :
|
||||
m_wipe_tower_pos(x, y),
|
||||
m_wipe_tower_width(width),
|
||||
m_wipe_area(wipe_area),
|
||||
m_wipe_tower_rotation_angle(rotation_angle),
|
||||
m_z_pos(0.f),
|
||||
m_current_tool(initial_tool)
|
||||
{
|
||||
|
@ -96,6 +99,7 @@ public:
|
|||
// Extrusion rate for an extrusion aka perimeter width 0.35mm.
|
||||
// Clamp the extrusion height to a 0.2mm layer height, independent of the nozzle diameter.
|
||||
// m_extrusion_flow = std::min(0.2f, layer_height) * 0.145f;
|
||||
|
||||
// Use a strictly
|
||||
m_extrusion_flow = layer_height * 0.145f;
|
||||
}
|
||||
|
@ -149,6 +153,8 @@ private:
|
|||
float m_wipe_tower_width;
|
||||
// Per color Y span.
|
||||
float m_wipe_area;
|
||||
// Wipe tower rotation angle in degrees (with respect to x axis
|
||||
float m_wipe_tower_rotation_angle;
|
||||
// Current Z position.
|
||||
float m_z_pos = 0.f;
|
||||
// Current layer height.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue