Skip to content

Commit 5a20233

Browse files
committed
Fix marching squares
CURA-12580
1 parent 49cc4a1 commit 5a20233

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/MeshMaterialSplitter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ std::map<uint8_t, Mesh> makeMeshesFromVoxelsGrid(const VoxelGrid& voxel_grid, co
241241
}
242242
}
243243

244-
filled_values.insert(ignore_value);
245244
occupation_bits[occupation_bit_index] = ignore_value;
246245
};
247246

@@ -613,12 +612,11 @@ std::vector<Mesh> makeMaterialModifierMeshes(
613612
// Fill a first voxel grid by rasterizing the triangles of the mesh in 3D, and assign the extruders according to the texture. This way we can later evaluate which extruder
614613
// to assign any point in 3D space just by finding the closest outside point and see what extruder it is assigned to.
615614
spdlog::debug("Fill original voxels based on texture data");
616-
const auto resolution = settings.get<coord_t>("multi_material_paint_resolution");
617615
AABB3D bounding_box = mesh_data.bounding_box;
618-
bounding_box.expand(resolution * 8);
616+
bounding_box.expand(mesh_data.resolution * 8);
619617

620618
// Create the voxel grid and initially fill it with the rasterized mesh triangles, which will be used as spatial reference for the texture data
621-
VoxelGrid voxel_grid(bounding_box, resolution);
619+
VoxelGrid voxel_grid(bounding_box, mesh_data.resolution);
622620

623621
std::unordered_set<size_t> active_extruders;
624622
for (const ExtruderTrain& extruder : Application::getInstance().current_slice_->scene.extruders)

0 commit comments

Comments
 (0)