mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 05:26:02 +08:00
Do not center volume when create new
This commit is contained in:
parent
9b1b4c8b83
commit
f146cd0224
@ -1289,7 +1289,7 @@ namespace {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Align expolygons by type
|
/// Align expolygons by type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type">Type of alignement</param>
|
/// <param name="type">Type of alignment</param>
|
||||||
/// <param name="shape">shapes to align</param>
|
/// <param name="shape">shapes to align</param>
|
||||||
/// <param name="text">Same size as shape for align per line(detect of end line - '\n')</param>
|
/// <param name="text">Same size as shape for align per line(detect of end line - '\n')</param>
|
||||||
void align_shape(FontProp::Align type, std::vector<ExPolygons> &shape, const std::wstring &text);
|
void align_shape(FontProp::Align type, std::vector<ExPolygons> &shape, const std::wstring &text);
|
||||||
@ -1968,7 +1968,7 @@ int32_t get_align_x_offset(FontProp::Align type, const BoundingBox &shape_bb, co
|
|||||||
void align_shape(FontProp::Align type, std::vector<ExPolygons> &shapes, const std::wstring &text)
|
void align_shape(FontProp::Align type, std::vector<ExPolygons> &shapes, const std::wstring &text)
|
||||||
{
|
{
|
||||||
if (type == FontProp::Align::first_line_left)
|
if (type == FontProp::Align::first_line_left)
|
||||||
return; // no alignement
|
return; // no alignment
|
||||||
|
|
||||||
BoundingBox shape_bb;
|
BoundingBox shape_bb;
|
||||||
for (const ExPolygons& shape: shapes)
|
for (const ExPolygons& shape: shapes)
|
||||||
|
@ -138,9 +138,6 @@ void CreateVolumeJob::process(Ctl &ctl) {
|
|||||||
if (!priv::check(m_input)) throw std::runtime_error("Bad input data for EmbossCreateVolumeJob.");
|
if (!priv::check(m_input)) throw std::runtime_error("Bad input data for EmbossCreateVolumeJob.");
|
||||||
auto was_canceled = [&ctl]()->bool { return ctl.was_canceled(); };
|
auto was_canceled = [&ctl]()->bool { return ctl.was_canceled(); };
|
||||||
m_result = priv::create_mesh(m_input, was_canceled, ctl);
|
m_result = priv::create_mesh(m_input, was_canceled, ctl);
|
||||||
// center result
|
|
||||||
Vec3f c = m_result.bounding_box().center().cast<float>();
|
|
||||||
if (!c.isApprox(Vec3f::Zero())) m_result.translate(-c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateVolumeJob::finalize(bool canceled, std::exception_ptr &eptr) {
|
void CreateVolumeJob::finalize(bool canceled, std::exception_ptr &eptr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user