Move set_starting_point to private

This commit is contained in:
thewildmage
2023-07-16 10:54:11 -06:00
parent c5a026cda0
commit 6ff8b1a6ad
2 changed files with 20 additions and 23 deletions

View File

@@ -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(

View File

@@ -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,