Reworked the command line interface based on the current state

of the upstream.
Thanks @alexrj, @lordofhyphens for the original code of slic3r.cpp
This commit is contained in:
bubnikv 2019-03-13 15:44:50 +01:00
parent 75cf1cde92
commit 18025cc669
22 changed files with 1131 additions and 530 deletions

View file

@ -577,6 +577,11 @@ end:
return input_file;
}
std::string Model::propose_export_file_name_and_path(const std::string &new_extension) const
{
return boost::filesystem::path(this->propose_export_file_name_and_path()).replace_extension(new_extension).string();
}
ModelObject::~ModelObject()
{
this->clear_volumes();
@ -1568,6 +1573,22 @@ void ModelVolume::scale(const Vec3d& scaling_factors)
set_scaling_factor(get_scaling_factor().cwiseProduct(scaling_factors));
}
void ModelObject::scale_to_fit(const Vec3d &size)
{
/*
BoundingBoxf3 instance_bounding_box(size_t instance_idx, bool dont_translate = false) const;
Vec3d orig_size = this->bounding_box().size();
float factor = fminf(
size.x / orig_size.x,
fminf(
size.y / orig_size.y,
size.z / orig_size.z
)
);
this->scale(factor);
*/
}
void ModelVolume::rotate(double angle, Axis axis)
{
switch (axis)