mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-11 05:39:08 +08:00
Fixed #1244 - perl part
This commit is contained in:
parent
cce5f3203b
commit
3835a1cacf
@ -424,6 +424,7 @@ sub on_btn_load {
|
|||||||
# apply the same translation we applied to the object
|
# apply the same translation we applied to the object
|
||||||
if (($delta_x != 0.0) || ($delta_y != 0.0) || ($delta_z != 0.0)) {
|
if (($delta_x != 0.0) || ($delta_y != 0.0) || ($delta_z != 0.0)) {
|
||||||
$new_volume->mesh->translate($delta_x, $delta_y, $delta_z);
|
$new_volume->mesh->translate($delta_x, $delta_y, $delta_z);
|
||||||
|
$new_volume->convex_hull->translate($delta_x, $delta_y, $delta_z);
|
||||||
}
|
}
|
||||||
|
|
||||||
# set a default extruder value, since user can't add it manually
|
# set a default extruder value, since user can't add it manually
|
||||||
|
@ -973,6 +973,11 @@ const TriangleMesh& ModelVolume::get_convex_hull() const
|
|||||||
return m_convex_hull;
|
return m_convex_hull;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TriangleMesh& ModelVolume::get_convex_hull()
|
||||||
|
{
|
||||||
|
return m_convex_hull;
|
||||||
|
}
|
||||||
|
|
||||||
ModelVolume::Type ModelVolume::type_from_string(const std::string &s)
|
ModelVolume::Type ModelVolume::type_from_string(const std::string &s)
|
||||||
{
|
{
|
||||||
// Legacy support
|
// Legacy support
|
||||||
|
@ -195,6 +195,7 @@ public:
|
|||||||
|
|
||||||
void calculate_convex_hull();
|
void calculate_convex_hull();
|
||||||
const TriangleMesh& get_convex_hull() const;
|
const TriangleMesh& get_convex_hull() const;
|
||||||
|
TriangleMesh& get_convex_hull();
|
||||||
|
|
||||||
// Helpers for loading / storing into AMF / 3MF files.
|
// Helpers for loading / storing into AMF / 3MF files.
|
||||||
static Type type_from_string(const std::string &s);
|
static Type type_from_string(const std::string &s);
|
||||||
|
@ -338,6 +338,8 @@ ModelMaterial::attributes()
|
|||||||
%code%{ RETVAL = &THIS->config; %};
|
%code%{ RETVAL = &THIS->config; %};
|
||||||
Ref<TriangleMesh> mesh()
|
Ref<TriangleMesh> mesh()
|
||||||
%code%{ RETVAL = &THIS->mesh; %};
|
%code%{ RETVAL = &THIS->mesh; %};
|
||||||
|
Ref<TriangleMesh> convex_hull()
|
||||||
|
%code%{ RETVAL = &THIS->get_convex_hull(); %};
|
||||||
|
|
||||||
bool modifier()
|
bool modifier()
|
||||||
%code%{ RETVAL = THIS->is_modifier(); %};
|
%code%{ RETVAL = THIS->is_modifier(); %};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user