mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
Cut: Fix crashing in programming cut. Also fixes the cut z offset.
This commit is contained in:
parent
018b2744db
commit
28e2995a01
4 changed files with 7 additions and 24 deletions
|
@ -143,7 +143,9 @@ static void cut_model(Model &model, double z, ModelObjectCutAttributes attribute
|
|||
|
||||
auto* object = model.objects[0];
|
||||
|
||||
const auto new_objects = Cut::cut_horizontal(object, instance_idx, z, attributes);
|
||||
const Vec3d instance_offset = object->instances[instance_idx]->get_offset();
|
||||
Cut cut(object, instance_idx, Geometry::translation_transform(z * Vec3d::UnitZ() - instance_offset), attributes);
|
||||
const auto new_objects = cut.perform_with_plane();
|
||||
model.delete_object(obj_idx);
|
||||
|
||||
for (ModelObject *model_object : new_objects) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue