mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
GCodeViewer -> Selection of extrusions view type
This commit is contained in:
parent
75d1e8373d
commit
7b0e35e70d
5 changed files with 68 additions and 6 deletions
|
@ -62,6 +62,21 @@ class GCodeViewer
|
|||
Shader shader;
|
||||
};
|
||||
|
||||
public:
|
||||
enum class EViewType : unsigned char
|
||||
{
|
||||
FeatureType,
|
||||
Height,
|
||||
Width,
|
||||
Feedrate,
|
||||
FanSpeed,
|
||||
VolumetricRate,
|
||||
Tool,
|
||||
ColorPrint,
|
||||
Count
|
||||
};
|
||||
|
||||
private:
|
||||
VBuffer m_vertices;
|
||||
std::vector<IBuffer> m_buffers{ static_cast<size_t>(GCodeProcessor::EMoveType::Extrude) };
|
||||
|
||||
|
@ -71,6 +86,8 @@ class GCodeViewer
|
|||
|
||||
std::array<std::array<float, 4>, erCount> m_extrusion_role_colors;
|
||||
|
||||
EViewType m_view_type{ EViewType::FeatureType };
|
||||
|
||||
public:
|
||||
GCodeViewer() = default;
|
||||
~GCodeViewer() { reset(); }
|
||||
|
@ -86,6 +103,14 @@ public:
|
|||
|
||||
const std::vector<double>& get_layers_zs() const { return m_layers_zs; };
|
||||
|
||||
EViewType get_view_type() const { return m_view_type; }
|
||||
void set_view_type(EViewType type) {
|
||||
if (type == EViewType::Count)
|
||||
type = EViewType::FeatureType;
|
||||
|
||||
m_view_type = type;
|
||||
}
|
||||
|
||||
bool is_toolpath_visible(GCodeProcessor::EMoveType type) const;
|
||||
void set_toolpath_visible(GCodeProcessor::EMoveType type, bool visible);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue