mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-25 06:05:15 +00:00
Move set_starting_point to private
This commit is contained in:
@@ -354,26 +354,6 @@ CalibPressureAdvancePattern::CalibPressureAdvancePattern(
|
||||
refresh_setup(config, model);
|
||||
};
|
||||
|
||||
void CalibPressureAdvancePattern::set_starting_point(const Model& model)
|
||||
{
|
||||
ModelObject* obj = model.objects.front();
|
||||
BoundingBoxf3 bbox =
|
||||
obj->instance_bounding_box(
|
||||
*obj->instances.front(),
|
||||
false
|
||||
)
|
||||
;
|
||||
|
||||
Vec3d pt(bbox.min.x(), bbox.max.y(), 0);
|
||||
|
||||
m_starting_point = pt;
|
||||
|
||||
if (m_is_delta) {
|
||||
m_starting_point.x() *= -1;
|
||||
m_starting_point.y() -= (frame_size_y() / 2);
|
||||
}
|
||||
}
|
||||
|
||||
void CalibPressureAdvancePattern::generate_custom_gcodes(
|
||||
const DynamicPrintConfig& config,
|
||||
bool is_bbl_machine,
|
||||
@@ -557,7 +537,25 @@ void CalibPressureAdvancePattern::refresh_setup(
|
||||
m_config.apply(model.objects.front()->volumes.front()->config.get(), true);
|
||||
|
||||
m_is_delta = (m_config.option<ConfigOptionPoints>("printable_area")->values.size() > 4);
|
||||
set_starting_point(model);
|
||||
_refresh_starting_point(model);
|
||||
}
|
||||
|
||||
void CalibPressureAdvancePattern::_refresh_starting_point(const Model& model)
|
||||
{
|
||||
ModelObject* obj = model.objects.front();
|
||||
BoundingBoxf3 bbox =
|
||||
obj->instance_bounding_box(
|
||||
*obj->instances.front(),
|
||||
false
|
||||
)
|
||||
;
|
||||
|
||||
m_starting_point = Vec3d(bbox.min.x(), bbox.max.y(), 0);
|
||||
|
||||
if (m_is_delta) {
|
||||
m_starting_point.x() *= -1;
|
||||
m_starting_point.y() -= (frame_size_y() / 2);
|
||||
}
|
||||
}
|
||||
|
||||
GCodeWriter CalibPressureAdvancePattern::pattern_writer(
|
||||
|
||||
@@ -149,8 +149,6 @@ public:
|
||||
double height_layer() const { return m_config.option<ConfigOptionFloat>("layer_height")->value; };
|
||||
double max_layer_z() const { return height_first_layer() + ((m_num_layers - 1) * height_layer()); };
|
||||
|
||||
void set_starting_point(const Model& model);
|
||||
|
||||
void generate_custom_gcodes(
|
||||
const DynamicPrintConfig& config,
|
||||
bool is_bbl_machine,
|
||||
@@ -195,6 +193,7 @@ private:
|
||||
};
|
||||
|
||||
void refresh_setup(const DynamicPrintConfig& config, const Model& model);
|
||||
void _refresh_starting_point(const Model& model);
|
||||
GCodeWriter pattern_writer(
|
||||
bool is_bbl_machine,
|
||||
const Model& model,
|
||||
|
||||
Reference in New Issue
Block a user