本文整理汇总了C++中SliceDataStorage::getSettingAsPlatformAdhesion方法的典型用法代码示例。如果您正苦于以下问题:C++ SliceDataStorage::getSettingAsPlatformAdhesion方法的具体用法?C++ SliceDataStorage::getSettingAsPlatformAdhesion怎么用?C++ SliceDataStorage::getSettingAsPlatformAdhesion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SliceDataStorage
的用法示例。
在下文中一共展示了SliceDataStorage::getSettingAsPlatformAdhesion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getFillerLayerHeight
int Raft::getFillerLayerHeight(const SliceDataStorage& storage)
{
if (storage.getSettingAsPlatformAdhesion("adhesion_type") != EPlatformAdhesion::RAFT)
{
const int64_t normal_layer_height = storage.getSettingInMicrons("layer_height");
return normal_layer_height;
}
const unsigned int filler_layer_height = round_divide(getZdiffBetweenRaftAndLayer1(storage), getFillerLayerCount(storage));
return filler_layer_height;
}
示例2:
int Raft::getZdiffBetweenRaftAndLayer1(const SliceDataStorage& storage)
{
const ExtruderTrain& train = *storage.meshgroup->getExtruderTrain(storage.getSettingAsIndex("adhesion_extruder_nr"));
if (storage.getSettingAsPlatformAdhesion("adhesion_type") != EPlatformAdhesion::RAFT)
{
return 0;
}
const int64_t airgap = std::max((coord_t)0, train.getSettingInMicrons("raft_airgap"));
const int64_t layer_0_overlap = storage.getSettingInMicrons("layer_0_z_overlap");
const int64_t layer_height_0 = storage.getSettingInMicrons("layer_height_0");
const int64_t z_diff_raft_to_bottom_of_layer_1 = std::max(int64_t(0), airgap + layer_height_0 - layer_0_overlap);
return z_diff_raft_to_bottom_of_layer_1;
}
示例3: generatePaths_denseInfill
void PrimeTower::generatePaths_denseInfill(const SliceDataStorage& storage)
{
int n_patterns = 2; // alternating patterns between layers
int infill_overlap = 60; // so that it can't be zero; EDIT: wtf?
int extra_infill_shift = 0;
int64_t z = 0; // (TODO) because the prime tower stores the paths for each extruder for once instead of generating each layer, we don't know the z position
for (int extruder = 0; extruder < extruder_count; extruder++)
{
int line_width = storage.meshgroup->getExtruderTrain(extruder)->getSettingInMicrons("prime_tower_line_width");
patterns_per_extruder.emplace_back(n_patterns);
std::vector<ExtrusionMoves>& patterns = patterns_per_extruder.back();
patterns.resize(n_patterns);
for (int pattern_idx = 0; pattern_idx < n_patterns; pattern_idx++)
{
patterns[pattern_idx].polygons = ground_poly.offset(-line_width / 2);
Polygons& result_lines = patterns[pattern_idx].lines;
int outline_offset = -line_width;
int line_distance = line_width;
double fill_angle = 45 + pattern_idx * 90;
Polygons result_polygons; // should remain empty, since we generate lines pattern!
constexpr bool zig_zaggify_infill = false;
Infill infill_comp(EFillMethod::LINES, zig_zaggify_infill, ground_poly, outline_offset, line_width, line_distance, infill_overlap, fill_angle, z, extra_infill_shift);
infill_comp.generate(result_polygons, result_lines);
}
int line_width_layer0 = line_width;
if (storage.getSettingAsPlatformAdhesion("adhesion_type") != EPlatformAdhesion::RAFT)
{
line_width_layer0 *= storage.meshgroup->getExtruderTrain(extruder)->getSettingAsRatio("initial_layer_line_width_factor");
}
pattern_per_extruder_layer0.emplace_back();
ExtrusionMoves& pattern = pattern_per_extruder_layer0.back();
pattern.polygons = ground_poly.offset(-line_width_layer0 / 2);
int outline_offset = -line_width_layer0;
int line_distance = line_width_layer0;
double fill_angle = 45;
Polygons result_polygons;
constexpr bool zig_zaggify_infill = false;
Infill infill_comp(EFillMethod::LINES, zig_zaggify_infill, ground_poly, outline_offset, line_width_layer0, line_distance, infill_overlap, fill_angle, z, extra_infill_shift);
infill_comp.generate(result_polygons, pattern.lines);
}
}