#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/GCode/TimelapsePosPicker.hpp>
Public Member Functions | |
| TimelapsePosPicker ()=default | |
| ~TimelapsePosPicker ()=default | |
| Point | pick_pos (const PosPickCtx &ctx) |
| bool | get_is_clear_to_x0 (const PosPickCtx &ctx) |
| void | init (const Print *print, const Point &plate_offset) |
| void | reset () |
Private Member Functions | |
| void | construct_printable_area_by_printer () |
| Constructs the printable area based on printer configuration. | |
| Point | pick_pos_for_curr_layer (const PosPickCtx &ctx) |
| Point | pick_pos_for_all_layer (const PosPickCtx &ctx) |
| ExPolygons | collect_object_slices_data (const Layer *curr_layer, float height_range, const std::vector< const PrintObject * > &object_list, bool by_object) |
| Collects object slice data within a specified height range for a given layer. | |
| Polygons | collect_limit_areas_for_camera (const std::vector< const PrintObject * > &object_list) |
| Polygons | collect_limit_areas_for_rod (const std::vector< const PrintObject * > &object_list, const PosPickCtx &ctx) |
| Polygon | expand_object_projection (const Polygon &poly, bool by_object, bool higher_than_curr=true) |
| BoundingBoxf3 | expand_object_bbox (const BoundingBoxf3 &bbox, bool by_object) |
| Point | pick_nearest_object_center (const Point &curr_pos, const std::vector< const PrintObject * > &object_list) |
| Point | get_objects_center (const std::vector< const PrintObject * > &object_list) |
| Calculates the center of multiple objects. | |
| Polygon | get_limit_area_for_camera (const PrintObject *obj) |
| std::vector< const PrintObject * > | get_object_list (const std::optional< std::vector< const PrintObject * > > &printed_objects) |
| Retrieves a list of print objects based on the provided optional set of printed objects. | |
| double | get_raft_height (const PrintObject *obj) |
| BoundingBoxf3 | get_real_instance_bbox (const PrintInstance &instance) |
| Point | get_object_center (const PrintObject *obj) |
Private Attributes | |
| const Print * | print { nullptr } |
| std::vector< ExPolygons > | m_extruder_printable_area |
| Polygon | m_bed_polygon |
| Point | m_plate_offset |
| int | m_plate_height |
| int | m_plate_width |
| PrintSequence | m_print_seq |
| bool | m_based_on_all_layer |
| int | m_nozzle_height_to_rod |
| int | m_nozzle_clearance_radius |
| std::optional< int > | m_liftable_extruder_id |
| std::optional< int > | m_extruder_height_gap |
| std::unordered_map< const PrintInstance *, BoundingBoxf3 > | bbox_cache |
| std::optional< Point > | m_all_layer_pos |
|
default |
|
default |
References print.
|
private |
References get_limit_area_for_camera(), and Slic3r::union_().
Referenced by pick_pos_for_all_layer(), and pick_pos_for_curr_layer().
|
private |
References Slic3r::ByObject, Slic3r::PosPickCtx::curr_layer, Slic3r::PosPickCtx::curr_pos, expand_object_bbox(), get_real_instance_bbox(), m_bed_polygon, m_nozzle_height_to_rod, m_plate_height, m_plate_offset, m_plate_width, m_print_seq, Slic3r::Layer::print_z, Slic3r::PosPickCtx::printed_objects, scale_, and unscale_.
Referenced by pick_pos_for_curr_layer().
|
private |
Collects object slice data within a specified height range for a given layer.
| layer | The layer for which slices are being collected. |
| height_range | The height range to consider for collecting slices. |
| object_list | List of print objects to process. |
| by_object | Decides the expand length of polygon |
References Slic3r::ExPolygon::contour, expand_object_projection(), get_real_instance_bbox(), m_bed_polygon, Slic3r::Layer::object(), Slic3r::Layer::print_z, scale_, Slic3r::to_expolygons(), and Slic3r::union_ex().
Referenced by pick_pos_for_curr_layer().
|
private |
Constructs the printable area based on printer configuration.
This function initializes the bed polygon, excludes specific areas, accounts for wipe towers, and calculates the printable area for each extruder.
References Slic3r::ByObject, Slic3r::diff(), Slic3r::diff_ex(), expand_object_projection(), Slic3r::get_bed_excluded_area(), Slic3r::get_extents(), Slic3r::intersection_ex(), m_bed_polygon, m_extruder_printable_area, m_plate_height, m_plate_width, m_print_seq, Slic3r::MultiPoint::points, print, Slic3r::printable_area(), scale_, and unscale_.
Referenced by init().
|
private |
References Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::max, Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::min, and print.
Referenced by collect_limit_areas_for_rod().
|
private |
References Slic3r::offset(), print, and scale_.
Referenced by collect_object_slices_data(), construct_printable_area_by_printer(), get_is_clear_to_x0(), and pick_pos_for_all_layer().
| bool Slic3r::TimelapsePosPicker::get_is_clear_to_x0 | ( | const PosPickCtx & | ctx | ) |
References Slic3r::ByObject, Slic3r::ExPolygon::contour, Slic3r::PosPickCtx::curr_layer, Slic3r::PosPickCtx::curr_pos, expand_object_projection(), get_object_list(), get_real_instance_bbox(), m_plate_offset, m_print_seq, Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, Slic3r::Layer::print_z, Slic3r::PosPickCtx::printed_objects, and scale_.
|
private |
References Slic3r::DefaultCameraPos, get_real_instance_bbox(), Slic3r::PrintObject::instances(), m_nozzle_clearance_radius, and scale_.
Referenced by collect_limit_areas_for_camera().
|
private |
References get_real_instance_bbox(), Slic3r::PrintObject::instances(), and scale_.
Referenced by pick_nearest_object_center(), and pick_pos_for_curr_layer().
|
private |
Retrieves a list of print objects based on the provided optional set of printed objects.
If the optional set of printed objects is provided, it converts the set into a vector. Otherwise, it retrieves all objects from the print instance.
References print.
Referenced by get_is_clear_to_x0(), pick_pos_for_all_layer(), and pick_pos_for_curr_layer().
|
private |
Calculates the center of multiple objects.
This function computes the average center of all instances of the provided objects.
| object_list | A vector of pointers to PrintObject instances. |
References get_real_instance_bbox(), and scale_.
Referenced by pick_pos_for_all_layer(), and pick_pos_for_curr_layer().
|
private |
References Slic3r::SlicingParameters::base_raft_layers, Slic3r::PrintObject::config(), Slic3r::PrintObject::has_raft(), print, and Slic3r::PrintObject::slicing_parameters().
Referenced by get_real_instance_bbox().
|
private |
References bbox_cache, Slic3r::PrintInstance::get_bounding_box(), get_raft_height(), m_plate_offset, and Slic3r::PrintInstance::print_object.
Referenced by collect_limit_areas_for_rod(), collect_object_slices_data(), get_is_clear_to_x0(), get_limit_area_for_camera(), get_object_center(), get_objects_center(), and pick_pos_for_all_layer().
References Slic3r::Print::config(), construct_printable_area_by_printer(), m_based_on_all_layer, m_extruder_height_gap, m_liftable_extruder_id, m_nozzle_clearance_radius, m_nozzle_height_to_rod, m_plate_offset, m_print_seq, print, reset(), and Slic3r::tlSmooth.
|
private |
References Slic3r::cast(), Slic3r::Geometry::dist(), and get_object_center().
| Point Slic3r::TimelapsePosPicker::pick_pos | ( | const PosPickCtx & | ctx | ) |
References m_based_on_all_layer, pick_pos_for_all_layer(), pick_pos_for_curr_layer(), and unscale_.
|
private |
References Slic3r::ByObject, collect_limit_areas_for_camera(), Slic3r::PosPickCtx::curr_extruder_id, Slic3r::PosPickCtx::curr_layer, Slic3r::DefaultTimelapsePos, Slic3r::diff_ex(), expand_object_projection(), FILTER_THRESHOLD, get_object_list(), get_objects_center(), get_real_instance_bbox(), Slic3r::intersection_ex(), m_all_layer_pos, m_extruder_height_gap, m_extruder_printable_area, m_liftable_extruder_id, m_print_seq, Slic3r::opening_ex(), Slic3r::pick_pos_internal(), Slic3r::PosPickCtx::picture_extruder_id, Slic3r::Layer::print_z, scale_, and Slic3r::union_().
Referenced by pick_pos().
|
private |
References Slic3r::ByObject, collect_limit_areas_for_camera(), collect_limit_areas_for_rod(), collect_object_slices_data(), Slic3r::PosPickCtx::curr_extruder_id, Slic3r::PosPickCtx::curr_layer, Slic3r::diff_ex(), Slic3r::PosPickCtx::farthest_point, FILTER_THRESHOLD, get_object_center(), get_object_list(), get_objects_center(), m_extruder_height_gap, m_extruder_printable_area, m_liftable_extruder_id, m_print_seq, Slic3r::opening_ex(), Slic3r::pick_pos_internal(), Slic3r::PosPickCtx::picture_extruder_id, Slic3r::PosPickCtx::printed_objects, scale_, and Slic3r::union_ex().
Referenced by pick_pos().
| void Slic3r::TimelapsePosPicker::reset | ( | ) |
References bbox_cache, Slic3r::ByObject, m_all_layer_pos, m_based_on_all_layer, m_bed_polygon, m_extruder_height_gap, m_extruder_printable_area, m_liftable_extruder_id, m_nozzle_clearance_radius, m_nozzle_height_to_rod, m_print_seq, and print.
Referenced by init().
|
private |
Referenced by get_real_instance_bbox(), and reset().
|
private |
Referenced by pick_pos_for_all_layer(), and reset().
|
private |
Referenced by init(), pick_pos(), and reset().
|
private |
|
private |
Referenced by init(), pick_pos_for_all_layer(), pick_pos_for_curr_layer(), and reset().
|
private |
Referenced by construct_printable_area_by_printer(), pick_pos_for_all_layer(), pick_pos_for_curr_layer(), and reset().
|
private |
Referenced by init(), pick_pos_for_all_layer(), pick_pos_for_curr_layer(), and reset().
|
private |
Referenced by get_limit_area_for_camera(), init(), and reset().
|
private |
Referenced by collect_limit_areas_for_rod(), init(), and reset().
|
private |
Referenced by collect_limit_areas_for_rod(), and construct_printable_area_by_printer().
|
private |
Referenced by collect_limit_areas_for_rod(), get_is_clear_to_x0(), get_real_instance_bbox(), and init().
|
private |
Referenced by collect_limit_areas_for_rod(), and construct_printable_area_by_printer().
|
private |
Referenced by ~TimelapsePosPicker(), construct_printable_area_by_printer(), expand_object_bbox(), expand_object_projection(), get_object_list(), get_raft_height(), init(), and reset().