Cut: Fix crashing in programming cut. Also fixes the cut z offset.

This commit is contained in:
Noisyfox 2023-11-05 16:02:39 +08:00
parent 018b2744db
commit 28e2995a01
4 changed files with 7 additions and 24 deletions

View file

@ -653,11 +653,5 @@ const ModelObjectPtrs& Cut::perform_with_groove(const Groove& groove, const Tran
return m_model.objects;
}
ModelObjectPtrs Cut::cut_horizontal(const ModelObject *object, size_t instance_idx, double z, ModelObjectCutAttributes attributes)
{
Cut cut(object, instance_idx, Geometry::translation_transform(z * Vec3d::UnitZ()), attributes);
return cut.perform_with_plane();
}
} // namespace Slic3r