Skip to content

Commit bfbd3a2

Browse files
committed
Restore random infill start
CURA-12250
1 parent 8bbc2ad commit bfbd3a2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/feature_generation/MeshInfillGenerator.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,6 @@ void MeshInfillGenerator::generateFeatures(
200200
}
201201

202202
extruder_plan_infill->appendFeatureExtrusion(feature_extrusion);
203-
204-
#warning Handle infill_randomize_start_location in scheduler
205-
// if (settings.get<bool>("infill_randomize_start_location"))
206203
}
207204
}
208205
}

src/operation_transformation/FeatureExtrusionScheduler.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,21 @@ std::shared_ptr<ZSeamConfig> FeatureExtrusionScheduler::getZSeamConfig(const Fea
393393
case PrintFeatureType::Roof:
394394
case PrintFeatureType::Support:
395395
case PrintFeatureType::SkirtBrim:
396-
case PrintFeatureType::Infill:
397396
case PrintFeatureType::SupportInfill:
398397
case PrintFeatureType::SupportInterface:
399398
return std::make_shared<ZSeamConfig>(EZSeamType::SHORTEST);
400399

400+
case PrintFeatureType::Infill:
401+
{
402+
const auto mesh_feature_extrusion = std::dynamic_pointer_cast<MeshFeatureExtrusion>(feature_extrusion);
403+
assert(mesh_feature_extrusion && "The infill feature extrusion is not a MeshFeatureExtrusion instance");
404+
if (mesh_feature_extrusion->getMesh()->settings.get<bool>("infill_randomize_start_location"))
405+
{
406+
return std::make_shared<ZSeamConfig>(EZSeamType::RANDOM);
407+
}
408+
break;
409+
}
410+
401411
case PrintFeatureType::MoveCombing:
402412
case PrintFeatureType::MoveRetraction:
403413
case PrintFeatureType::PrimeTower:

0 commit comments

Comments
 (0)