mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-10 19:47:35 +00:00
step one: post-process analysis
This commit is contained in:
committed by
harrierpigeon
parent
b61ba98183
commit
8f6802fff8
@@ -7,8 +7,9 @@ namespace Slic3r {
|
||||
|
||||
bool MachineFrameTransform::init_from_config(const PrintConfig &config)
|
||||
{
|
||||
m_active = false;
|
||||
m_transform = Transform3d::Identity();
|
||||
m_active = false;
|
||||
m_transform = Transform3d::Identity();
|
||||
m_transform_inverse = Transform3d::Identity();
|
||||
|
||||
if (!config.belt_printer.value)
|
||||
return false;
|
||||
@@ -59,8 +60,9 @@ bool MachineFrameTransform::init_from_config(const PrintConfig &config)
|
||||
if (combined.isApprox(Transform3d::Identity()))
|
||||
return false;
|
||||
|
||||
m_transform = combined;
|
||||
m_active = true;
|
||||
m_transform = combined;
|
||||
m_transform_inverse = combined.inverse();
|
||||
m_active = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -71,4 +73,11 @@ Vec3d MachineFrameTransform::apply(const Vec3d &pos) const
|
||||
return m_transform * pos;
|
||||
}
|
||||
|
||||
Vec3d MachineFrameTransform::apply_inverse(const Vec3d &pos) const
|
||||
{
|
||||
if (!m_active)
|
||||
return pos;
|
||||
return m_transform_inverse * pos;
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
Reference in New Issue
Block a user