mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
NEW:add CutUtils class and its_make_groove_plane for cut tool
Jira:STUDIO-4227 most of code from PrusaSlcer,thanks for PrusaSlcer and YuSanka commit 1b451cdf9f8859aff58df54fa89d689aa47518d7 Author: YuSanka <yusanka@gmail.com> Date: Wed Aug 9 13:22:11 2023 +0200 CutGizmo: Big code refactoring. All manipulations related to cut are extracted to CutUtils now ... Change-Id: I4e93e19b8e0d46ec2395247796c59587574851cb
This commit is contained in:
committed by
Lane.Wei
parent
a92a138918
commit
56ab965af1
@@ -848,6 +848,7 @@ public:
|
||||
// It contains information about connetors
|
||||
struct CutInfo
|
||||
{
|
||||
bool is_from_upper{true};
|
||||
bool is_connector{false};
|
||||
bool is_processed{true};
|
||||
CutConnectorType connector_type{CutConnectorType::Plug};
|
||||
@@ -864,11 +865,14 @@ public:
|
||||
|
||||
void set_processed() { is_processed = true; }
|
||||
void invalidate() { is_connector = false; }
|
||||
|
||||
void reset_from_upper() { is_from_upper = true; }
|
||||
template<class Archive> inline void serialize(Archive &ar) { ar(is_connector, is_processed, connector_type, radius_tolerance, height_tolerance); }
|
||||
};
|
||||
CutInfo cut_info;
|
||||
|
||||
bool is_from_upper() const { return cut_info.is_from_upper; }
|
||||
void reset_from_upper() { cut_info.reset_from_upper(); }
|
||||
|
||||
bool is_cut_connector() const { return cut_info.is_processed && cut_info.is_connector; }
|
||||
void invalidate_cut_info() { cut_info.invalidate(); }
|
||||
|
||||
@@ -914,6 +918,7 @@ public:
|
||||
bool is_support_modifier() const { return m_type == ModelVolumeType::SUPPORT_BLOCKER || m_type == ModelVolumeType::SUPPORT_ENFORCER; }
|
||||
t_model_material_id material_id() const { return m_material_id; }
|
||||
void set_material_id(t_model_material_id material_id);
|
||||
void reset_extra_facets();
|
||||
ModelMaterial* material() const;
|
||||
void set_material(t_model_material_id material_id, const ModelMaterial &material);
|
||||
// Extract the current extruder ID based on this ModelVolume's config and the parent ModelObject's config.
|
||||
|
||||
Reference in New Issue
Block a user