OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::SLAPrint::Steps Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SLAPrintSteps.hpp>

Collaboration diagram for Slic3r::SLAPrint::Steps:

Public Member Functions

 Steps (SLAPrint *print)
void hollow_model (SLAPrintObject &po)
void drill_holes (SLAPrintObject &po)
void slice_model (SLAPrintObject &po)
void support_points (SLAPrintObject &po)
void support_tree (SLAPrintObject &po)
void generate_pad (SLAPrintObject &po)
void slice_supports (SLAPrintObject &po)
void merge_slices_and_eval_stats ()
void rasterize ()
void execute (SLAPrintObjectStep step, SLAPrintObject &obj)
void execute (SLAPrintStep step)
double progressrange (SLAPrintObjectStep step) const
double progressrange (SLAPrintStep step) const

Static Public Member Functions

static std::string label (SLAPrintObjectStep step)
static std::string label (SLAPrintStep step)

Static Public Attributes

static const constexpr unsigned min_objstatus = 0
static const constexpr unsigned max_objstatus = 50

Private Member Functions

template<class... Args>
void report_status (Args &&...args)
double current_status () const
void throw_if_canceled () const
bool canceled () const
void initialize_printer_input ()
void apply_printer_corrections (SLAPrintObject &po, SliceOrigin o)

Private Attributes

SLAPrint * m_print = nullptr
std::mt19937 m_rng
const size_t objcount
const double ilhd
const float ilh
const coord_t ilhs
const double objectstep_scale

Detailed Description

Constructor & Destructor Documentation

◆ Steps()

Slic3r::SLAPrint::Steps::Steps ( SLAPrint * print)
explicit
105 : m_print{print}
106 , m_rng{std::random_device{}()}
107 , objcount{m_print->m_objects.size()}
108 , ilhd{m_print->m_material_config.initial_layer_height.getFloat()}
109 , ilh{float(ilhd)}
110 , ilhs{scaled(ilhd)}
112{}
SLAPrint * m_print
Definition SLAPrintSteps.hpp:17
const size_t objcount
Definition SLAPrintSteps.hpp:26
static const constexpr unsigned max_objstatus
Definition SLAPrintSteps.hpp:23
std::mt19937 m_rng
Definition SLAPrintSteps.hpp:18
static const constexpr unsigned min_objstatus
Definition SLAPrintSteps.hpp:22
const coord_t ilhs
Definition SLAPrintSteps.hpp:31
const double objectstep_scale
Definition SLAPrintSteps.hpp:35
const double ilhd
Definition SLAPrintSteps.hpp:29
const float ilh
Definition SLAPrintSteps.hpp:30
BoundingBox scaled(const BoundingBoxf &bb)
Definition BoundingBox.hpp:284

References Slic3r::SLAPrint::SLAPrint(), ilh, ilhd, ilhs, Slic3r::SLAPrint::m_material_config, Slic3r::SLAPrint::m_objects, m_print, m_rng, max_objstatus, min_objstatus, objcount, objectstep_scale, and Slic3r::scaled().

Here is the call graph for this function:

Member Function Documentation

◆ apply_printer_corrections()

void Slic3r::SLAPrint::Steps::apply_printer_corrections ( SLAPrintObject & po,
SliceOrigin o )
private
115{
116 if (o == soSupport && !po.m_supportdata) return;
117
118 auto faded_lyrs = size_t(po.m_config.faded_layers.getInt());
119 double min_w = m_print->m_printer_config.elefant_foot_min_width.getFloat() / 2.;
120 double start_efc = m_print->m_printer_config.elefant_foot_compensation.getFloat();
121
122 double doffs = m_print->m_printer_config.absolute_correction.getFloat();
123 coord_t clpr_offs = scaled(doffs);
124
125 faded_lyrs = std::min(po.m_slice_index.size(), faded_lyrs);
126 size_t faded_lyrs_efc = std::max(size_t(1), faded_lyrs - 1);
127
128 auto efc = [start_efc, faded_lyrs_efc](size_t pos) {
129 return (faded_lyrs_efc - pos) * start_efc / faded_lyrs_efc;
130 };
131
132 std::vector<ExPolygons> &slices = o == soModel ?
133 po.m_model_slices :
134 po.m_supportdata->support_slices;
135
136 if (clpr_offs != 0) for (size_t i = 0; i < po.m_slice_index.size(); ++i) {
137 size_t idx = po.m_slice_index[i].get_slice_idx(o);
138 if (idx < slices.size())
139 slices[idx] = offset_ex(slices[idx], float(clpr_offs));
140 }
141
142 if (start_efc > 0.) for (size_t i = 0; i < faded_lyrs; ++i) {
143 size_t idx = po.m_slice_index[i].get_slice_idx(o);
144 if (idx < slices.size())
145 slices[idx] = elephant_foot_compensation(slices[idx], min_w, efc(i));
146 }
147}
int64_t coord_t
Definition libslic3r.h:48
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:16
Slic3r::ExPolygons offset_ex(const Slic3r::Polygons &polygons, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:605
ExPolygon elephant_foot_compensation(const ExPolygon &input_expoly, double min_contour_width, const double compensation)
Definition ElephantFootCompensation.cpp:551
@ soModel
Definition SLAPrint.hpp:63
@ soSupport
Definition SLAPrint.hpp:63

References Slic3r::elephant_foot_compensation(), Slic3r::SLAPrintObject::m_config, Slic3r::SLAPrintObject::m_model_slices, m_print, Slic3r::SLAPrintObject::m_slice_index, Slic3r::SLAPrintObject::m_supportdata, Slic3r::offset_ex(), Slic3r::scaled(), Slic3r::SLAPrint::SLAPrintObject, Slic3r::soModel, and Slic3r::soSupport.

Referenced by slice_model(), and slice_supports().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ canceled()

bool Slic3r::SLAPrint::Steps::canceled ( ) const
inlineprivate
44{ return m_print->canceled(); }

References m_print.

◆ current_status()

double Slic3r::SLAPrint::Steps::current_status ( ) const
inlineprivate
42{ return m_print->m_report_status.status(); }

References m_print.

Referenced by rasterize(), support_points(), and support_tree().

Here is the caller graph for this function:

◆ drill_holes()

void Slic3r::SLAPrint::Steps::drill_holes ( SLAPrintObject & po)
366{
367 /*
368 bool needs_drilling = ! po.m_model_object->sla_drain_holes.empty();
369 bool is_hollowed =
370 (po.m_hollowing_data && po.m_hollowing_data->interior &&
371 !sla::get_mesh(*po.m_hollowing_data->interior).empty());
372
373 if (! is_hollowed && ! needs_drilling) {
374 // In this case we can dump any data that might have been
375 // generated on previous runs.
376 po.m_hollowing_data.reset();
377 return;
378 }
379
380 if (! po.m_hollowing_data)
381 po.m_hollowing_data.reset(new SLAPrintObject::HollowingData());
382
383 // Hollowing and/or drilling is active, m_hollowing_data is valid.
384
385 // Regenerate hollowed mesh, even if it was there already. It may contain
386 // holes that are no longer on the frontend.
387 TriangleMesh &hollowed_mesh = po.m_hollowing_data->hollow_mesh_with_holes;
388 hollowed_mesh = po.transformed_mesh();
389 if (is_hollowed)
390 sla::hollow_mesh(hollowed_mesh, *po.m_hollowing_data->interior);
391
392 TriangleMesh &mesh_view = po.m_hollowing_data->hollow_mesh_with_holes_trimmed;
393
394 if (! needs_drilling) {
395 mesh_view = po.transformed_mesh();
396
397 if (is_hollowed)
398 sla::hollow_mesh(mesh_view, *po.m_hollowing_data->interior,
399 sla::hfRemoveInsideTriangles);
400
401 BOOST_LOG_TRIVIAL(info) << "Drilling skipped (no holes).";
402 return;
403 }
404
405 BOOST_LOG_TRIVIAL(info) << "Drilling drainage holes.";
406 sla::DrainHoles drainholes = po.transformed_drainhole_points();
407
408 auto tree = AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set(
409 hollowed_mesh.its.vertices,
410 hollowed_mesh.its.indices
411 );
412
413 std::uniform_real_distribution<float> dist(0., float(EPSILON));
414 auto holes_mesh_cgal = MeshBoolean::cgal::triangle_mesh_to_cgal({}, {});
415 indexed_triangle_set part_to_drill = hollowed_mesh.its;
416
417 bool hole_fail = false;
418 for (size_t i = 0; i < drainholes.size(); ++i) {
419 sla::DrainHole holept = drainholes[i];
420
421 holept.normal += Vec3f{dist(m_rng), dist(m_rng), dist(m_rng)};
422 holept.normal.normalize();
423 holept.pos += Vec3f{dist(m_rng), dist(m_rng), dist(m_rng)};
424 indexed_triangle_set m = holept.to_mesh();
425
426 part_to_drill.indices.clear();
427 auto bb = bounding_box(m);
428 Eigen::AlignedBox<float, 3> ebb{bb.min.cast<float>(),
429 bb.max.cast<float>()};
430 //BBS
431 //AABBTreeIndirect::traverse(
432 // tree,
433 // AABBTreeIndirect::intersecting(ebb),
434 // [&part_to_drill, &hollowed_mesh](size_t faceid)
435 //{
436 // part_to_drill.indices.emplace_back(hollowed_mesh.its.indices[faceid]);
437 //});
438
439 auto cgal_meshpart = MeshBoolean::cgal::triangle_mesh_to_cgal(
440 remove_unconnected_vertices(part_to_drill));
441
442 if (MeshBoolean::cgal::does_self_intersect(*cgal_meshpart)) {
443 BOOST_LOG_TRIVIAL(error) << "Failed to drill hole";
444
445 hole_fail = drainholes[i].failed =
446 po.model_object()->sla_drain_holes[i].failed = true;
447
448 continue;
449 }
450
451 auto cgal_hole = MeshBoolean::cgal::triangle_mesh_to_cgal(m);
452 MeshBoolean::cgal::plus(*holes_mesh_cgal, *cgal_hole);
453 }
454
455 if (MeshBoolean::cgal::does_self_intersect(*holes_mesh_cgal))
456 throw Slic3r::SlicingError(L("Too many overlapping holes."));
457
458 auto hollowed_mesh_cgal = MeshBoolean::cgal::triangle_mesh_to_cgal(hollowed_mesh);
459
460 if (!MeshBoolean::cgal::does_bound_a_volume(*hollowed_mesh_cgal)) {
461 po.active_step_add_warning(
462 PrintStateBase::WarningLevel::NON_CRITICAL,
463 L("Mesh to be hollowed is not suitable for hollowing (does not "
464 "bound a volume)."));
465 }
466
467 if (!MeshBoolean::cgal::empty(*holes_mesh_cgal)
468 && !MeshBoolean::cgal::does_bound_a_volume(*holes_mesh_cgal)) {
469 po.active_step_add_warning(
470 PrintStateBase::WarningLevel::NON_CRITICAL,
471 L("Unable to drill the current configuration of holes into the "
472 "model."));
473 }
474
475 try {
476 if (!MeshBoolean::cgal::empty(*holes_mesh_cgal))
477 MeshBoolean::cgal::minus(*hollowed_mesh_cgal, *holes_mesh_cgal);
478
479 hollowed_mesh = MeshBoolean::cgal::cgal_to_triangle_mesh(*hollowed_mesh_cgal);
480 mesh_view = hollowed_mesh;
481
482 if (is_hollowed) {
483 auto &interior = *po.m_hollowing_data->interior;
484 std::vector<bool> exclude_mask =
485 create_exclude_mask(mesh_view.its, interior, drainholes);
486
487 sla::remove_inside_triangles(mesh_view, interior, exclude_mask);
488 }
489 } catch (const Slic3r::RuntimeError &) {
490 throw Slic3r::SlicingError(L(
491 "Drilling holes into the mesh failed. "
492 "This is usually caused by broken model. Try to fix it first."));
493 }
494
495 if (hole_fail)
496 po.active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL,
497 L("Failed to drill some holes into the model"));
498 */
499}

References Slic3r::SLAPrint::SLAPrintObject.

Referenced by execute().

Here is the caller graph for this function:

◆ execute() [1/2]

void Slic3r::SLAPrint::Steps::execute ( SLAPrintObjectStep step,
SLAPrintObject & obj )
1150{
1151 switch(step) {
1152 case slaposHollowing: hollow_model(obj); break;
1153 case slaposDrillHoles: drill_holes(obj); break;
1154 case slaposObjectSlice: slice_model(obj); break;
1155 case slaposSupportPoints: support_points(obj); break;
1156 case slaposSupportTree: support_tree(obj); break;
1157 case slaposPad: generate_pad(obj); break;
1158 case slaposSliceSupports: slice_supports(obj); break;
1159 case slaposCount: assert(false);
1160 }
1161}
void drill_holes(SLAPrintObject &po)
Definition SLAPrintSteps.cpp:365
void support_points(SLAPrintObject &po)
Definition SLAPrintSteps.cpp:601
void slice_model(SLAPrintObject &po)
Definition SLAPrintSteps.cpp:509
void slice_supports(SLAPrintObject &po)
Definition SLAPrintSteps.cpp:768
void support_tree(SLAPrintObject &po)
Definition SLAPrintSteps.cpp:672
void generate_pad(SLAPrintObject &po)
Definition SLAPrintSteps.cpp:727
void hollow_model(SLAPrintObject &po)
Definition SLAPrintSteps.cpp:149
@ slaposCount
Definition SLAPrint.hpp:50
@ slaposPad
Definition SLAPrint.hpp:48
@ slaposObjectSlice
Definition SLAPrint.hpp:45
@ slaposHollowing
Definition SLAPrint.hpp:43
@ slaposSupportPoints
Definition SLAPrint.hpp:46
@ slaposDrillHoles
Definition SLAPrint.hpp:44
@ slaposSupportTree
Definition SLAPrint.hpp:47
@ slaposSliceSupports
Definition SLAPrint.hpp:49

References drill_holes(), generate_pad(), hollow_model(), Slic3r::slaposCount, Slic3r::slaposDrillHoles, Slic3r::slaposHollowing, Slic3r::slaposObjectSlice, Slic3r::slaposPad, Slic3r::slaposSliceSupports, Slic3r::slaposSupportPoints, Slic3r::slaposSupportTree, Slic3r::SLAPrint::SLAPrintObject, slice_model(), slice_supports(), support_points(), and support_tree().

Referenced by Slic3r::SLAPrint::process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute() [2/2]

void Slic3r::SLAPrint::Steps::execute ( SLAPrintStep step)
1164{
1165 switch (step) {
1167 case slapsRasterize: rasterize(); break;
1168 case slapsCount: assert(false);
1169 }
1170}
void rasterize()
Definition SLAPrintSteps.cpp:1078
void merge_slices_and_eval_stats()
Definition SLAPrintSteps.cpp:902
@ slapsCount
Definition SLAPrint.hpp:39
@ slapsRasterize
Definition SLAPrint.hpp:38
@ slapsMergeSlicesAndEval
Definition SLAPrint.hpp:37

References merge_slices_and_eval_stats(), rasterize(), Slic3r::slapsCount, Slic3r::slapsMergeSlicesAndEval, and Slic3r::slapsRasterize.

Here is the call graph for this function:

◆ generate_pad()

void Slic3r::SLAPrint::Steps::generate_pad ( SLAPrintObject & po)
727 {
728 // this step can only go after the support tree has been created
729 // and before the supports had been sliced. (or the slicing has to be
730 // repeated)
731
732 if(po.m_config.pad_enable.getBool()) {
733 // Get the distilled pad configuration from the config
734 sla::PadConfig pcfg = make_pad_cfg(po.m_config);
735
736 ExPolygons bp; // This will store the base plate of the pad.
737 double pad_h = pcfg.full_height();
738 const TriangleMesh &trmesh = po.transformed_mesh();
739
740 if (!po.m_config.supports_enable.getBool() || pcfg.embed_object) {
741 // No support (thus no elevation) or zero elevation mode
742 // we sometimes call it "builtin pad" is enabled so we will
743 // get a sample from the bottom of the mesh and use it for pad
744 // creation.
745 sla::pad_blueprint(trmesh.its, bp, float(pad_h),
746 float(po.m_config.layer_height.getFloat()),
747 [this](){ throw_if_canceled(); });
748 }
749
750 po.m_supportdata->create_pad(bp, pcfg);
751
752 if (!validate_pad(po.m_supportdata->support_tree_ptr->retrieve_mesh(sla::MeshType::Pad), pcfg))
753 throw Slic3r::SlicingError(
754 L("No pad can be generated for this model with the "
755 "current configuration"));
756
757 } else if(po.m_supportdata && po.m_supportdata->support_tree_ptr) {
758 po.m_supportdata->support_tree_ptr->remove_pad();
759 }
760
762 report_status(-1, L("Visualizing supports"), SlicingStatus::RELOAD_SCENE);
763}
#define L(s)
Definition ExtrusionEntity.cpp:25
void throw_if_canceled() const
Definition SLAPrintSteps.hpp:43
void report_status(Args &&...args)
Definition SLAPrintSteps.hpp:37
void pad_blueprint(const indexed_triangle_set &mesh, ExPolygons &output, const std::vector< float > &heights, ThrowOnCancel thrfn)
Calculate the polygon representing the silhouette.
Definition Pad.cpp:470
@ Pad
Definition SupportTree.hpp:117
std::vector< ExPolygon > ExPolygons
Definition ExPolygon.hpp:20
bool validate_pad(const indexed_triangle_set &pad, const sla::PadConfig &pcfg)
Definition SLAPrint.cpp:136
sla::PadConfig make_pad_cfg(const SLAPrintObjectConfig &c)
Definition SLAPrint.cpp:119

References Slic3r::sla::PadConfig::embed_object, Slic3r::sla::PadConfig::full_height(), Slic3r::TriangleMesh::its, L, Slic3r::SLAPrintObject::m_config, Slic3r::SLAPrintObject::m_supportdata, Slic3r::make_pad_cfg(), Slic3r::sla::Pad, Slic3r::sla::pad_blueprint(), report_status(), Slic3r::SLAPrint::SLAPrintObject, Slic3r::PrintBaseWithState< SLAPrintStep, slapsCount >::throw_if_canceled(), Slic3r::SLAPrintObject::transformed_mesh(), and Slic3r::validate_pad().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hollow_model()

void Slic3r::SLAPrint::Steps::hollow_model ( SLAPrintObject & po)
150{
151 po.m_hollowing_data.reset();
152
153 if (! po.m_config.hollowing_enable.getBool()) {
154 BOOST_LOG_TRIVIAL(info) << "Skipping hollowing step!";
155 return;
156 }
157
158 BOOST_LOG_TRIVIAL(info) << "Performing hollowing step!";
159
160 double thickness = po.m_config.hollowing_min_thickness.getFloat();
161 double quality = po.m_config.hollowing_quality.getFloat();
162 double closing_d = po.m_config.hollowing_closing_distance.getFloat();
163 sla::HollowingConfig hlwcfg{thickness, quality, closing_d};
164
165 sla::InteriorPtr interior = generate_interior(po.transformed_mesh(), hlwcfg);
166
167 if (!interior || sla::get_mesh(*interior).empty())
168 BOOST_LOG_TRIVIAL(warning) << "Hollowed interior is empty!";
169 else {
170 po.m_hollowing_data.reset(new SLAPrintObject::HollowingData());
171 po.m_hollowing_data->interior = std::move(interior);
172 }
173}
indexed_triangle_set & get_mesh(Interior &interior)
Definition Hollowing.cpp:69
InteriorPtr generate_interior(const TriangleMesh &mesh, const HollowingConfig &hc, const JobController &ctl)
Definition Hollowing.cpp:130
std::unique_ptr< Interior, InteriorDeleter > InteriorPtr
Definition Hollowing.hpp:34

References Slic3r::sla::get_mesh(), Slic3r::SLAPrintObject::m_config, Slic3r::SLAPrintObject::m_hollowing_data, Slic3r::SLAPrint::SLAPrintObject, and Slic3r::SLAPrintObject::transformed_mesh().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize_printer_input()

void Slic3r::SLAPrint::Steps::initialize_printer_input ( )
private
857{
858 auto &printer_input = m_print->m_printer_input;
859
860 // clear the rasterizer input
861 printer_input.clear();
862
863 size_t mx = 0;
864 for(SLAPrintObject * o : m_print->m_objects) {
865 if(auto m = o->get_slice_index().size() > mx) mx = m;
866 }
867
868 printer_input.reserve(mx);
869
870 auto eps = coord_t(SCALED_EPSILON);
871
872 for(SLAPrintObject * o : m_print->m_objects) {
873 coord_t gndlvl = o->get_slice_index().front().print_level() - ilhs;
874
875 for(const SliceRecord& slicerecord : o->get_slice_index()) {
876 if (!slicerecord.is_valid())
877 throw Slic3r::SlicingError(
878 L("There are unprintable objects. Try to "
879 "adjust support settings to make the "
880 "objects printable."));
881
882 coord_t lvlid = slicerecord.print_level() - gndlvl;
883
884 // Neat trick to round the layer levels to the grid.
885 lvlid = eps * (lvlid / eps);
886
887 auto it = std::lower_bound(printer_input.begin(),
888 printer_input.end(),
889 PrintLayer(lvlid));
890
891 if(it == printer_input.end() || it->level() != lvlid)
892 it = printer_input.insert(it, PrintLayer(lvlid));
893
894
895 it->add(slicerecord);
896 }
897 }
898}
friend SLAPrintObject
Definition SLAPrint.hpp:598
#define SCALED_EPSILON
Definition libslic3r.h:109
SLAPrintObject::SliceRecord SliceRecord
Definition SLAPrint.hpp:376

References Slic3r::SLAPrintObject::get_slice_index(), ilhs, L, m_print, SCALED_EPSILON, and Slic3r::SLAPrint::SLAPrintObject.

Referenced by merge_slices_and_eval_stats().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ label() [1/2]

std::string Slic3r::SLAPrint::Steps::label ( SLAPrintObjectStep step)
static
1130{
1131 return OBJ_STEP_LABELS(step);
1132}
std::string OBJ_STEP_LABELS(size_t idx)
Definition SLAPrintSteps.cpp:71

Referenced by Slic3r::SLAPrint::process().

Here is the caller graph for this function:

◆ label() [2/2]

std::string Slic3r::SLAPrint::Steps::label ( SLAPrintStep step)
static
1135{
1136 return PRINT_STEP_LABELS(step);
1137}
std::string PRINT_STEP_LABELS(size_t idx)
Definition SLAPrintSteps.cpp:92

◆ merge_slices_and_eval_stats()

void Slic3r::SLAPrint::Steps::merge_slices_and_eval_stats ( )
902 {
903
905
906 auto &print_statistics = m_print->m_print_statistics;
907 auto &printer_config = m_print->m_printer_config;
908 auto &material_config = m_print->m_material_config;
909 auto &printer_input = m_print->m_printer_input;
910
912
913 const double area_fill = printer_config.area_fill.getFloat()*0.01;// 0.5 (50%);
914 const double fast_tilt = printer_config.fast_tilt_time.getFloat();// 5.0;
915 const double slow_tilt = printer_config.slow_tilt_time.getFloat();// 8.0;
916
917 const double init_exp_time = material_config.initial_exposure_time.getFloat();
918 const double exp_time = material_config.exposure_time.getFloat();
919
920 const int fade_layers_cnt = m_print->m_default_object_config.faded_layers.getInt();// 10 // [3;20]
921
922 const auto width = scaled<double>(printer_config.display_width.getFloat());
923 const auto height = scaled<double>(printer_config.display_height.getFloat());
924 const double display_area = width*height;
925
926 double supports_volume(0.0);
927 double models_volume(0.0);
928
929 double estim_time(0.0);
930 std::vector<double> layers_times;
931 layers_times.reserve(printer_input.size());
932
933 size_t slow_layers = 0;
934 size_t fast_layers = 0;
935
936 const double delta_fade_time = (init_exp_time - exp_time) / (fade_layers_cnt + 1);
937 double fade_layer_time = init_exp_time;
938
939 sla::ccr::SpinningMutex mutex;
940 using Lock = std::lock_guard<sla::ccr::SpinningMutex>;
941
942 // Going to parallel:
943 auto printlayerfn = [this,
944 // functions and read only vars
945 area_fill, display_area, exp_time, init_exp_time, fast_tilt, slow_tilt, delta_fade_time,
946
947 // write vars
948 &mutex, &models_volume, &supports_volume, &estim_time, &slow_layers,
949 &fast_layers, &fade_layer_time, &layers_times](size_t sliced_layer_cnt)
950 {
951 PrintLayer &layer = m_print->m_printer_input[sliced_layer_cnt];
952
953 // vector of slice record references
954 auto& slicerecord_references = layer.slices();
955
956 if(slicerecord_references.empty()) return;
957
958 // Layer height should match for all object slices for a given level.
959 const auto l_height = double(slicerecord_references.front().get().layer_height());
960
961 // Calculation of the consumed material
962
963 ExPolygons model_polygons;
964 ExPolygons supports_polygons;
965
966 size_t c = std::accumulate(layer.slices().begin(),
967 layer.slices().end(),
968 size_t(0),
969 [](size_t a, const SliceRecord &sr) {
970 return a + sr.get_slice(soModel).size();
971 });
972
973 model_polygons.reserve(c);
974
975 c = std::accumulate(layer.slices().begin(),
976 layer.slices().end(),
977 size_t(0),
978 [](size_t a, const SliceRecord &sr) {
979 return a + sr.get_slice(soModel).size();
980 });
981
982 supports_polygons.reserve(c);
983
984 for(const SliceRecord& record : layer.slices()) {
985
986 ExPolygons modelslices = get_all_polygons(record, soModel);
987 for(ExPolygon& p_tmp : modelslices) model_polygons.emplace_back(std::move(p_tmp));
988
989 ExPolygons supportslices = get_all_polygons(record, soSupport);
990 for(ExPolygon& p_tmp : supportslices) supports_polygons.emplace_back(std::move(p_tmp));
991
992 }
993
994 model_polygons = union_ex(model_polygons);
995 double layer_model_area = 0;
996 for (const ExPolygon& polygon : model_polygons)
997 layer_model_area += area(polygon);
998
999 if (layer_model_area < 0 || layer_model_area > 0) {
1000 Lock lck(mutex); models_volume += layer_model_area * l_height;
1001 }
1002
1003 if(!supports_polygons.empty()) {
1004 if(model_polygons.empty()) supports_polygons = union_ex(supports_polygons);
1005 else supports_polygons = diff_ex(supports_polygons, model_polygons);
1006 // allegedly, union of subject is done withing the diff according to the pftPositive polyFillType
1007 }
1008
1009 double layer_support_area = 0;
1010 for (const ExPolygon& polygon : supports_polygons)
1011 layer_support_area += area(polygon);
1012
1013 if (layer_support_area < 0 || layer_support_area > 0) {
1014 Lock lck(mutex); supports_volume += layer_support_area * l_height;
1015 }
1016
1017 // Here we can save the expensively calculated polygons for printing
1018 ExPolygons trslices;
1019 trslices.reserve(model_polygons.size() + supports_polygons.size());
1020 for(ExPolygon& poly : model_polygons) trslices.emplace_back(std::move(poly));
1021 for(ExPolygon& poly : supports_polygons) trslices.emplace_back(std::move(poly));
1022
1023 layer.transformed_slices(union_ex(trslices));
1024
1025 // Calculation of the slow and fast layers to the future controlling those values on FW
1026
1027 const bool is_fast_layer = (layer_model_area + layer_support_area) <= display_area*area_fill;
1028 const double tilt_time = is_fast_layer ? fast_tilt : slow_tilt;
1029
1030 { Lock lck(mutex);
1031 if (is_fast_layer)
1032 fast_layers++;
1033 else
1034 slow_layers++;
1035
1036 // Calculation of the printing time
1037
1038 double layer_times = 0.0;
1039 if (sliced_layer_cnt < 3)
1040 layer_times += init_exp_time;
1041 else if (fade_layer_time > exp_time) {
1042 fade_layer_time -= delta_fade_time;
1043 layer_times += fade_layer_time;
1044 }
1045 else
1046 layer_times += exp_time;
1047 layer_times += tilt_time;
1048
1049 layers_times.push_back(layer_times);
1050 estim_time += layer_times;
1051 }
1052 };
1053
1054 // sequential version for debugging:
1055 // for(size_t i = 0; i < m_printer_input.size(); ++i) printlayerfn(i);
1056 sla::ccr::for_each(size_t(0), printer_input.size(), printlayerfn);
1057
1058 auto SCALING2 = SCALING_FACTOR * SCALING_FACTOR;
1059 print_statistics.support_used_material = supports_volume * SCALING2;
1060 print_statistics.objects_used_material = models_volume * SCALING2;
1061
1062 // Estimated printing time
1063 // A layers count o the highest object
1064 if (printer_input.size() == 0)
1066 else {
1068 print_statistics.layers_times = layers_times;
1069 }
1070
1071 print_statistics.fast_layers_count = fast_layers;
1072 print_statistics.slow_layers_count = slow_layers;
1073
1074 report_status(-2, "", SlicingStatus::RELOAD_SLA_PREVIEW);
1075}
void initialize_printer_input()
Definition SLAPrintSteps.cpp:856
const SLAMaterialConfig & material_config() const
Definition SLAPrint.hpp:498
const SLAPrinterConfig & printer_config() const
Definition SLAPrint.hpp:497
const SLAPrintStatistics & print_statistics() const
Definition SLAPrint.hpp:509
double SCALING_FACTOR
Definition libslic3r.cpp:3
coord_t width(const BoundingBox &box)
Definition Arrange.cpp:1184
coord_t height(const BoundingBox &box)
Definition Arrange.cpp:1185
area_fill((ConfigOptionFloat, min_exposure_time))((ConfigOptionFloat
Slic3r::ExPolygons diff_ex(const Slic3r::Polygons &subject, const Slic3r::Polygons &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:831
static ExPolygons get_all_polygons(const SliceRecord &record, SliceOrigin o)
Definition SLAPrintSteps.cpp:797
double area(const ExPolygon &poly)
Definition ExPolygon.hpp:511
Slic3r::ExPolygons union_ex(const Slic3r::Polygons &subject, PolyFillType fill_type)
Definition ClipperUtils.cpp:1011
double support_used_material
Definition SLAPrint.hpp:385
size_t slow_layers_count
Definition SLAPrint.hpp:386
std::vector< double > layers_times
Definition SLAPrint.hpp:390
void clear()
Definition SLAPrint.hpp:399
double estimated_print_time
Definition SLAPrint.hpp:383
size_t fast_layers_count
Definition SLAPrint.hpp:387
double objects_used_material
Definition SLAPrint.hpp:384

References Slic3r::area(), Slic3r::area_fill(), Slic3r::diff_ex(), Slic3r::get_all_polygons(), initialize_printer_input(), m_print, Slic3r::SLAPrint::material_config(), Slic3r::SLAPrint::print_statistics(), Slic3r::SLAPrint::printer_config(), report_status(), Slic3r::scaled(), SCALING_FACTOR, Slic3r::SLAPrint::PrintLayer::slices(), Slic3r::soModel, Slic3r::soSupport, Slic3r::SLAPrint::PrintLayer::transformed_slices(), and Slic3r::union_ex().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ progressrange() [1/2]

double Slic3r::SLAPrint::Steps::progressrange ( SLAPrintObjectStep step) const
1140{
1142}
const std::array< unsigned, slaposCount > OBJ_STEP_LEVELS
Definition SLAPrintSteps.cpp:61
void step(Coord &crd, const Dir d, const long n=1)
Definition MarchingSquares.hpp:213

References objectstep_scale.

Referenced by Slic3r::SLAPrint::process().

Here is the caller graph for this function:

◆ progressrange() [2/2]

double Slic3r::SLAPrint::Steps::progressrange ( SLAPrintStep step) const
1145{
1146 return PRINT_STEP_LEVELS[step] * (100 - max_objstatus) / 100.0;
1147}
const std::array< unsigned, slapsCount > PRINT_STEP_LEVELS
Definition SLAPrintSteps.cpp:87

References max_objstatus.

◆ rasterize()

void Slic3r::SLAPrint::Steps::rasterize ( )
1079{
1080 if(canceled() || !m_print->m_printer) return;
1081
1082 // coefficient to map the rasterization state (0-99) to the allocated
1083 // portion (slot) of the process state
1084 double sd = (100 - max_objstatus) / 100.0;
1085
1086 // slot is the portion of 100% that is realted to rasterization
1087 unsigned slot = PRINT_STEP_LEVELS[slapsRasterize];
1088
1089 // pst: previous state
1090 double pst = current_status();
1091
1092 double increment = (slot * sd) / m_print->m_printer_input.size();
1093 double dstatus = current_status();
1094
1095 sla::ccr::SpinningMutex slck;
1096 using Lock = std::lock_guard<sla::ccr::SpinningMutex>;
1097
1098 // procedure to process one height level. This will run in parallel
1099 auto lvlfn =
1100 [this, &slck, increment, &dstatus, &pst]
1101 (sla::RasterBase& raster, size_t idx)
1102 {
1103 PrintLayer& printlayer = m_print->m_printer_input[idx];
1104 if(canceled()) return;
1105
1106 for (const ExPolygon& poly : printlayer.transformed_slices())
1107 raster.draw(poly);
1108
1109 // Status indication guarded with the spinlock
1110 {
1111 Lock lck(slck);
1112 dstatus += increment;
1113 double st = std::round(dstatus);
1114 if(st > pst) {
1116 pst = st;
1117 }
1118 }
1119 };
1120
1121 // last minute escape
1122 if(canceled()) return;
1123
1124 // Print all the layers in parallel
1125 m_print->m_printer->draw_layers(m_print->m_printer_input.size(), lvlfn,
1126 [this]() { return canceled(); }, ex_tbb);
1127}
bool canceled() const
Definition SLAPrintSteps.hpp:44
double current_status() const
Definition SLAPrintSteps.hpp:42
static constexpr ExecutionTBB ex_tbb
Definition ExecutionTBB.hpp:22

References Slic3r::PrintBaseWithState< SLAPrintStep, slapsCount >::canceled(), current_status(), Slic3r::ex_tbb, m_print, max_objstatus, report_status(), Slic3r::slapsRasterize, and Slic3r::SLAPrint::PrintLayer::transformed_slices().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_status()

template<class... Args>
void Slic3r::SLAPrint::Steps::report_status ( Args &&... args)
inlineprivate
38 {
39 m_print->m_report_status(*m_print, std::forward<Args>(args)...);
40 }

References m_print.

Referenced by generate_pad(), merge_slices_and_eval_stats(), rasterize(), slice_supports(), support_points(), and support_tree().

Here is the caller graph for this function:

◆ slice_model()

void Slic3r::SLAPrint::Steps::slice_model ( SLAPrintObject & po)
510{
511 const TriangleMesh &mesh = po.get_mesh_to_slice();
512
513 // We need to prepare the slice index...
514
515 double lhd = m_print->m_objects.front()->m_config.layer_height.getFloat();
516 float lh = float(lhd);
517 coord_t lhs = scaled(lhd);
518 auto && bb3d = mesh.bounding_box();
519 double minZ = bb3d.min(Z) - po.get_elevation();
520 double maxZ = bb3d.max(Z);
521 auto minZf = float(minZ);
522 coord_t minZs = scaled(minZ);
523 coord_t maxZs = scaled(maxZ);
524
525 po.m_slice_index.clear();
526
527 size_t cap = size_t(1 + (maxZs - minZs - ilhs) / lhs);
528 po.m_slice_index.reserve(cap);
529
530 po.m_slice_index.emplace_back(minZs + ilhs, minZf + ilh / 2.f, ilh);
531
532 for(coord_t h = minZs + ilhs + lhs; h <= maxZs; h += lhs)
533 po.m_slice_index.emplace_back(h, unscaled<float>(h) - lh / 2.f, lh);
534
535 // Just get the first record that is from the model:
536 auto slindex_it =
537 po.closest_slice_record(po.m_slice_index, float(bb3d.min(Z)));
538
539 if(slindex_it == po.m_slice_index.end())
540 //TRN To be shown at the status bar on SLA slicing error.
541 throw Slic3r::RuntimeError(
542 L("Slicing had to be stopped due to an internal error: "
543 "Inconsistent slice index."));
544
545 po.m_model_height_levels.clear();
546 po.m_model_height_levels.reserve(po.m_slice_index.size());
547 for(auto it = slindex_it; it != po.m_slice_index.end(); ++it)
548 po.m_model_height_levels.emplace_back(it->slice_level());
549
550 po.m_model_slices.clear();
551 MeshSlicingParamsEx params;
552 params.closing_radius = float(po.config().slice_closing_radius.value);
553 //BBS: always regular mode
554 //switch (po.config().slicing_mode.value) {
555 //case SlicingMode::Regular: params.mode = MeshSlicingParams::SlicingMode::Regular; break;
556 //case SlicingMode::EvenOdd: params.mode = MeshSlicingParams::SlicingMode::EvenOdd; break;
557 //case SlicingMode::CloseHoles: params.mode = MeshSlicingParams::SlicingMode::Positive; break;
558 //}
560 auto thr = [this]() { m_print->throw_if_canceled(); };
561 auto &slice_grid = po.m_model_height_levels;
562 po.m_model_slices = slice_mesh_ex(mesh.its, slice_grid, params, thr);
563
564 sla::Interior *interior = po.m_hollowing_data ?
565 po.m_hollowing_data->interior.get() :
566 nullptr;
567
568 if (interior && ! sla::get_mesh(*interior).empty()) {
569 indexed_triangle_set interiormesh = sla::get_mesh(*interior);
570 sla::swap_normals(interiormesh);
572
573 std::vector<ExPolygons> interior_slices = slice_mesh_ex(interiormesh, slice_grid, params, thr);
574
575 sla::ccr::for_each(size_t(0), interior_slices.size(),
576 [&po, &interior_slices] (size_t i) {
577 const ExPolygons &slice = interior_slices[i];
578 po.m_model_slices[i] =
579 diff_ex(po.m_model_slices[i], slice);
580 });
581 }
582
583 auto mit = slindex_it;
584 for (size_t id = 0;
585 id < po.m_model_slices.size() && mit != po.m_slice_index.end();
586 id++) {
587 mit->set_model_slice_idx(po, id); ++mit;
588 }
589
590 // We apply the printer correction offset here.
592
593 if(po.m_config.supports_enable.getBool() || po.m_config.pad_enable.getBool())
594 {
595 po.m_supportdata.reset(new SLAPrintObject::SupportData(po.get_mesh_to_print()));
596 }
597}
void apply_printer_corrections(SLAPrintObject &po, SliceOrigin o)
Definition SLAPrintSteps.cpp:114
void swap_normals(indexed_triangle_set &its)
Definition Hollowing.hpp:105
constexpr Eigen::Matrix< Tout, 2, EigenArgs... > unscaled(const Slic3r::Point &v) noexcept
Definition Arrange.cpp:81
@ Z
Definition libslic3r.h:143
std::vector< ExPolygons > slice_mesh_ex(const indexed_triangle_set &mesh, const std::vector< float > &zs, const MeshSlicingParamsEx &params, std::function< void()> throw_on_cancel)
Definition TriangleMeshSlicer.cpp:2142
@ Regular
Definition TriangleMeshSlicer.hpp:22

References apply_printer_corrections(), Slic3r::TriangleMesh::bounding_box(), Slic3r::SLAPrintObject::closest_slice_record(), Slic3r::MeshSlicingParamsEx::closing_radius, Slic3r::SLAPrintObject::config(), Slic3r::SLAPrintObject::get_elevation(), Slic3r::sla::get_mesh(), Slic3r::SLAPrintObject::get_mesh_to_print(), Slic3r::SLAPrintObject::get_mesh_to_slice(), ilh, ilhs, Slic3r::TriangleMesh::its, L, Slic3r::SLAPrintObject::m_config, Slic3r::SLAPrintObject::m_hollowing_data, Slic3r::SLAPrintObject::m_model_height_levels, Slic3r::SLAPrintObject::m_model_slices, m_print, Slic3r::SLAPrintObject::m_slice_index, Slic3r::SLAPrintObject::m_supportdata, Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::min, Slic3r::MeshSlicingParams::mode, Slic3r::MeshSlicingParams::Regular, Slic3r::scaled(), Slic3r::SLAPrint::SLAPrintObject, Slic3r::slice_mesh_ex(), Slic3r::soModel, Slic3r::sla::swap_normals(), Slic3r::unscaled(), and Slic3r::Z.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ slice_supports()

void Slic3r::SLAPrint::Steps::slice_supports ( SLAPrintObject & po)
768 {
769 auto& sd = po.m_supportdata;
770
771 if(sd) sd->support_slices.clear();
772
773 // Don't bother if no supports and no pad is present.
774 if (!po.m_config.supports_enable.getBool() && !po.m_config.pad_enable.getBool())
775 return;
776
777 if(sd && sd->support_tree_ptr) {
778 auto heights = reserve_vector<float>(po.m_slice_index.size());
779
780 for(auto& rec : po.m_slice_index) heights.emplace_back(rec.slice_level());
781
782 sd->support_slices = sd->support_tree_ptr->slice(
783 heights, float(po.config().slice_closing_radius.value));
784 }
785
786 for (size_t i = 0; i < sd->support_slices.size() && i < po.m_slice_index.size(); ++i)
787 po.m_slice_index[i].set_support_slice_idx(po, i);
788
790
791 // Using RELOAD_SLA_PREVIEW to tell the Plater to pass the update
792 // status to the 3D preview to load the SLA slices.
793 report_status(-2, "", SlicingStatus::RELOAD_SLA_PREVIEW);
794}
IntegerOnly< I, std::vector< T, Args... > > reserve_vector(I capacity)
Definition libslic3r.h:370

References apply_printer_corrections(), Slic3r::SLAPrintObject::config(), Slic3r::SLAPrintObject::m_config, Slic3r::SLAPrintObject::m_slice_index, Slic3r::SLAPrintObject::m_supportdata, report_status(), Slic3r::reserve_vector(), Slic3r::SLAPrint::SLAPrintObject, and Slic3r::soSupport.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ support_points()

void Slic3r::SLAPrint::Steps::support_points ( SLAPrintObject & po)
602{
603 // If supports are disabled, we can skip the model scan.
604 if(!po.m_config.supports_enable.getBool()) return;
605
606 if (!po.m_supportdata)
607 po.m_supportdata.reset(new SLAPrintObject::SupportData(po.get_mesh_to_print()));
608
609 const ModelObject& mo = *po.m_model_object;
610
611 BOOST_LOG_TRIVIAL(debug) << "Support point count "
612 << mo.sla_support_points.size();
613
614 // Unless the user modified the points or we already did the calculation,
615 // we will do the autoplacement. Otherwise we will just blindly copy the
616 // frontend data into the backend cache.
617 if (mo.sla_points_status != sla::PointsStatus::UserModified) {
618
619 // calculate heights of slices (slices are calculated already)
620 const std::vector<float>& heights = po.m_model_height_levels;
621
622 // Tell the mesh where drain holes are. Although the points are
623 // calculated on slices, the algorithm then raycasts the points
624 // so they actually lie on the mesh.
625// po.m_supportdata->emesh.load_holes(po.transformed_drainhole_points());
626
628 sla::SupportPointGenerator::Config config;
629 const SLAPrintObjectConfig& cfg = po.config();
630
631 // the density config value is in percents:
632 config.density_relative = float(cfg.support_points_density_relative / 100.f);
633 config.minimal_distance = float(cfg.support_points_minimal_distance);
634 config.head_diameter = float(cfg.support_head_front_diameter);
635
636 // scaling for the sub operations
638 double init = current_status();
639
640 auto statuscb = [this, d, init](unsigned st)
641 {
642 double current = init + st * d;
643 if(std::round(current_status()) < std::round(current))
645 };
646
647 // Construction of this object does the calculation.
649 sla::SupportPointGenerator auto_supports(
650 po.m_supportdata->emesh, po.get_model_slices(), heights, config,
651 [this]() { throw_if_canceled(); }, statuscb);
652
653 // Now let's extract the result.
654 const std::vector<sla::SupportPoint>& points = auto_supports.output();
656 po.m_supportdata->pts = points;
657
658 BOOST_LOG_TRIVIAL(debug) << "Automatic support points: "
659 << po.m_supportdata->pts.size();
660
661 // Using RELOAD_SLA_SUPPORT_POINTS to tell the Plater to pass
662 // the update status to GLGizmoSlaSupports
663 report_status(-1, L("Generating support points"),
664 SlicingStatus::RELOAD_SLA_SUPPORT_POINTS);
665 } else {
666 // There are either some points on the front-end, or the user
667 // removed them on purpose. No calculation will be done.
668 po.m_supportdata->pts = po.transformed_support_points();
669 }
670}
std::tuple< TriangleInfos, VertexInfos, EdgeInfos, Errors > init(const indexed_triangle_set &its, ThrowOnCancel &throw_on_cancel, StatusFn &status_fn)
Definition QuadricEdgeCollapse.cpp:455
@ UserModified
Definition SupportPoint.hpp:17

References Slic3r::SLAPrintObject::config(), current_status(), Slic3r::sla::SupportPointGenerator::Config::density_relative, Slic3r::SLAPrintObject::get_mesh_to_print(), Slic3r::SLAPrintObject::get_model_slices(), Slic3r::sla::SupportPointGenerator::Config::head_diameter, L, Slic3r::SLAPrintObject::m_config, Slic3r::SLAPrintObject::m_model_height_levels, Slic3r::PrintObjectBase::m_model_object, Slic3r::SLAPrintObject::m_supportdata, Slic3r::sla::SupportPointGenerator::Config::minimal_distance, objectstep_scale, Slic3r::sla::SupportPointGenerator::output(), report_status(), Slic3r::ModelObject::sla_points_status, Slic3r::ModelObject::sla_support_points, Slic3r::slaposSupportPoints, Slic3r::SLAPrint::SLAPrintObject, Slic3r::PrintBaseWithState< SLAPrintStep, slapsCount >::throw_if_canceled(), Slic3r::SLAPrintObject::transformed_support_points(), and Slic3r::sla::UserModified.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ support_tree()

void Slic3r::SLAPrint::Steps::support_tree ( SLAPrintObject & po)
673{
674 if(!po.m_supportdata) return;
675
676 sla::PadConfig pcfg = make_pad_cfg(po.m_config);
677
678 if (pcfg.embed_object)
679 po.m_supportdata->emesh.ground_level_offset(pcfg.wall_thickness_mm);
680
681 // If the zero elevation mode is engaged, we have to filter out all the
682 // points that are on the bottom of the object
683 if (is_zero_elevation(po.config())) {
684 remove_bottom_points(po.m_supportdata->pts,
685 float(po.m_supportdata->emesh.ground_level() + EPSILON));
686 }
687
688 po.m_supportdata->cfg = make_support_cfg(po.m_config);
689// po.m_supportdata->emesh.load_holes(po.transformed_drainhole_points());
690
691 // scaling for the sub operations
693 double init = current_status();
694 sla::JobController ctl;
695
696 ctl.statuscb = [this, d, init](unsigned st, const std::string &logmsg) {
697 double current = init + st * d;
698 if (std::round(current_status()) < std::round(current))
700 SlicingStatus::DEFAULT, logmsg);
701 };
702 ctl.stopcondition = [this]() { return canceled(); };
703 ctl.cancelfn = [this]() { throw_if_canceled(); };
704
705 po.m_supportdata->create_support_tree(ctl);
706
707 if (!po.m_config.supports_enable.getBool()) return;
708
710
711 // Create the unified mesh
712 auto rc = SlicingStatus::RELOAD_SCENE;
713
714 // This is to prevent "Done." being displayed during merged_mesh()
715 report_status(-1, L("Visualizing supports"));
716
717 BOOST_LOG_TRIVIAL(debug) << "Processed support point count "
718 << po.m_supportdata->pts.size();
719
720 // Check the mesh for later troubleshooting.
721 if(po.support_mesh().empty())
722 BOOST_LOG_TRIVIAL(warning) << "Support mesh is empty";
723
724 report_status(-1, L("Visualizing supports"), rc);
725}
#define EPSILON
Definition ColorUtils.cpp:64
void remove_bottom_points(std::vector< SupportPoint > &pts, float lvl)
Definition SupportPointGenerator.cpp:641
sla::SupportTreeConfig make_support_cfg(const SLAPrintObjectConfig &c)
Definition SLAPrint.cpp:63
bool is_zero_elevation(const SLAPrintObjectConfig &c)
Definition SLAPrint.cpp:57

References Slic3r::PrintBaseWithState< SLAPrintStep, slapsCount >::canceled(), Slic3r::sla::JobController::cancelfn, Slic3r::SLAPrintObject::config(), current_status(), Slic3r::sla::PadConfig::embed_object, Slic3r::TriangleMesh::empty(), EPSILON, Slic3r::is_zero_elevation(), L, Slic3r::SLAPrintObject::m_config, Slic3r::SLAPrintObject::m_supportdata, Slic3r::make_pad_cfg(), Slic3r::make_support_cfg(), objectstep_scale, report_status(), Slic3r::slaposSupportTree, Slic3r::SLAPrint::SLAPrintObject, Slic3r::sla::JobController::statuscb, Slic3r::sla::JobController::stopcondition, Slic3r::SLAPrintObject::support_mesh(), Slic3r::PrintBaseWithState< SLAPrintStep, slapsCount >::throw_if_canceled(), and Slic3r::sla::PadConfig::wall_thickness_mm.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ throw_if_canceled()

void Slic3r::SLAPrint::Steps::throw_if_canceled ( ) const
inlineprivate
43{ m_print->throw_if_canceled(); }

References m_print.

Member Data Documentation

◆ ilh

const float Slic3r::SLAPrint::Steps::ilh
private

Referenced by Steps(), and slice_model().

◆ ilhd

const double Slic3r::SLAPrint::Steps::ilhd
private

Referenced by Steps().

◆ ilhs

const coord_t Slic3r::SLAPrint::Steps::ilhs
private

◆ m_print

◆ m_rng

std::mt19937 Slic3r::SLAPrint::Steps::m_rng
private

Referenced by Steps().

◆ max_objstatus

const constexpr unsigned Slic3r::SLAPrint::Steps::max_objstatus = 50
staticconstexpr

◆ min_objstatus

const constexpr unsigned Slic3r::SLAPrint::Steps::min_objstatus = 0
staticconstexpr

Referenced by Steps(), and Slic3r::SLAPrint::process().

◆ objcount

const size_t Slic3r::SLAPrint::Steps::objcount
private

Referenced by Steps().

◆ objectstep_scale

const double Slic3r::SLAPrint::Steps::objectstep_scale
private

The documentation for this class was generated from the following files: