Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::SupportGridPattern Class Reference
+ Collaboration diagram for Slic3r::SupportGridPattern:

Public Member Functions

 SupportGridPattern (const Polygons *support_polygons, const Polygons *trimming_polygons, const SupportGridParams &params)
 
Polygons extract_support (const coord_t offset_in_grid, bool fill_holes)
 

Private Member Functions

 SupportGridPattern ()
 
SupportGridPatternoperator= (const SupportGridPattern &rhs)
 

Static Private Member Functions

static std::vector< unsigned char > dilate_trimming_region (const std::vector< unsigned char > &trimming, const Vec2i &grid_size)
 
static void seed_fill_block (std::vector< unsigned char > &grid, Vec2i grid_size, const std::vector< unsigned char > &trimming, const Vec2i &grid_blocks, int oversampling)
 
static Points island_samples (const ExPolygons &expolygons)
 

Private Attributes

SupportMaterialStyle m_style
 
const Polygonsm_support_polygons
 
const Polygonsm_trimming_polygons
 
Polygons m_support_polygons_rotated
 
Polygons m_trimming_polygons_rotated
 
coordf_t m_support_angle
 
coordf_t m_support_spacing
 
coordf_t m_extrusion_width
 
coordf_t m_support_material_closing_radius
 
Vec2i m_grid_size
 
double m_pixel_size
 
BoundingBox m_bbox
 
std::vector< unsigned char > m_grid2
 

Detailed Description

Constructor & Destructor Documentation

◆ SupportGridPattern() [1/2]

Slic3r::SupportGridPattern::SupportGridPattern ( const Polygons support_polygons,
const Polygons trimming_polygons,
const SupportGridParams params 
)
inline
501 :
502 m_style(params.style),
503 m_support_polygons(support_polygons), m_trimming_polygons(trimming_polygons),
504 m_support_spacing(params.grid_resolution), m_support_angle(params.support_angle),
505 m_extrusion_width(params.extrusion_width),
506 m_support_material_closing_radius(params.support_material_closing_radius)
507 {
508 switch (m_style) {
509 case smsGrid:
510 {
511 // Prepare the grid data, it will be reused when extracting support structures.
512 if (m_support_angle != 0.) {
513 // Create a copy of the rotated contours.
514 m_support_polygons_rotated = *support_polygons;
515 m_trimming_polygons_rotated = *trimming_polygons;
518 polygons_rotate(m_support_polygons_rotated, - params.support_angle);
519 polygons_rotate(m_trimming_polygons_rotated, - params.support_angle);
520 }
521
522 // Resolution of the sparse support grid.
523 coord_t grid_resolution = coord_t(scale_(m_support_spacing));
524 BoundingBox bbox = get_extents(*m_support_polygons);
525 bbox.offset(20);
526 // Align the bounding box with the sparse support grid.
527 bbox.align_to_grid(grid_resolution);
528
529 #ifdef SUPPORT_USE_AGG_RASTERIZER
530 m_bbox = bbox;
531 // Oversample the grid to avoid leaking of supports through or around the object walls.
532 int extrusion_width_scaled = scale_(params.extrusion_width);
533 int oversampling = std::clamp(int(scale_(m_support_spacing) / (extrusion_width_scaled + 100)), 1, 8);
534 m_pixel_size = std::max<double>(extrusion_width_scaled + 21, scale_(m_support_spacing / oversampling));
535 // Add one empty column / row boundaries.
537 // Grid size fitting the support polygons plus one pixel boundary around the polygons.
538 Vec2i grid_size_raw(int(ceil((m_bbox.max.x() - m_bbox.min.x()) / m_pixel_size)),
539 int(ceil((m_bbox.max.y() - m_bbox.min.y()) / m_pixel_size)));
540 // Overlay macro blocks of (oversampling x oversampling) over the grid.
541 Vec2i grid_blocks((grid_size_raw.x() + oversampling - 1 - 2) / oversampling,
542 (grid_size_raw.y() + oversampling - 1 - 2) / oversampling);
543 // and resize the grid to fit the macro blocks + one pixel boundary.
544 m_grid_size = grid_blocks * oversampling + Vec2i(2, 2);
545 assert(m_grid_size.x() >= grid_size_raw.x());
546 assert(m_grid_size.y() >= grid_size_raw.y());
548
551 grid_blocks, oversampling);
552
553 #ifdef SLIC3R_DEBUG
554 {
555 static int irun;
556 Slic3r::png::write_gray_to_file_scaled(debug_out_path("support-rasterizer-%d.png", irun++), m_grid_size.x(), m_grid_size.y(), m_grid2.data(), 4);
557 }
558 #endif // SLIC3R_DEBUG
559
560 #else // SUPPORT_USE_AGG_RASTERIZER
561 // Create an EdgeGrid, initialize it with projection, initialize signed distance field.
562 m_grid.set_bbox(bbox);
563 m_grid.create(*m_support_polygons, grid_resolution);
564 #if 0
565 if (m_grid.has_intersecting_edges()) {
566 // EdgeGrid fails to produce valid signed distance function for self-intersecting polygons.
569 m_grid.set_bbox(bbox);
570 m_grid.create(*m_support_polygons, grid_resolution);
571 // assert(! m_grid.has_intersecting_edges());
572 printf("SupportGridPattern: fixing polygons with intersection %s\n",
573 m_grid.has_intersecting_edges() ? "FAILED" : "SUCCEEDED");
574 }
575 #endif
576 m_grid.calculate_sdf();
577 #endif // SUPPORT_USE_AGG_RASTERIZER
578 break;
579 }
580
581 case smsSnug:
582 default:
583 // nothing to prepare
584 break;
585 }
586 }
EIGEN_DEVICE_FUNC const CeilReturnType ceil() const
Definition ArrayCwiseUnaryOps.h:402
PointType max
Definition BoundingBox.hpp:17
void offset(coordf_t delta)
Definition BoundingBox.cpp:175
PointType min
Definition BoundingBox.hpp:16
Polygons m_trimming_polygons_rotated
Definition SupportMaterial.cpp:949
static void seed_fill_block(std::vector< unsigned char > &grid, Vec2i grid_size, const std::vector< unsigned char > &trimming, const Vec2i &grid_blocks, int oversampling)
Definition SupportMaterial.cpp:849
Vec2i m_grid_size
Definition SupportMaterial.cpp:959
BoundingBox m_bbox
Definition SupportMaterial.cpp:961
const Polygons * m_trimming_polygons
Definition SupportMaterial.cpp:947
coordf_t m_support_spacing
Definition SupportMaterial.cpp:953
const Polygons * m_support_polygons
Definition SupportMaterial.cpp:946
std::vector< unsigned char > m_grid2
Definition SupportMaterial.cpp:962
coordf_t m_support_angle
Definition SupportMaterial.cpp:951
coordf_t m_extrusion_width
Definition SupportMaterial.cpp:954
double m_pixel_size
Definition SupportMaterial.cpp:960
SupportMaterialStyle m_style
Definition SupportMaterial.cpp:945
coordf_t m_support_material_closing_radius
Definition SupportMaterial.cpp:956
static std::vector< unsigned char > dilate_trimming_region(const std::vector< unsigned char > &trimming, const Vec2i &grid_size)
Definition SupportMaterial.cpp:828
Polygons m_support_polygons_rotated
Definition SupportMaterial.cpp:948
#define scale_(val)
Definition libslic3r.h:69
int32_t coord_t
Definition libslic3r.h:39
bool write_gray_to_file_scaled(const char *file_name_utf8, size_t width, size_t height, const uint8_t *data_gray, size_t scale)
Definition PNGReadWrite.cpp:259
std::string debug_out_path(const char *name,...)
Definition utils.cpp:218
Polygons simplify_polygons(const Polygons &subject)
Definition ClipperUtils.cpp:969
BoundingBox get_extents(const ExPolygon &expolygon)
Definition ExPolygon.cpp:352
Eigen::Matrix< int, 2, 1, Eigen::DontAlign > Vec2i
Definition Point.hpp:39
@ smsGrid
Definition PrintConfig.hpp:90
@ smsSnug
Definition PrintConfig.hpp:90
void polygons_rotate(Polygons &polys, double angle)
Definition Polygon.hpp:155
static std::vector< unsigned char > rasterize_polygons(const Vec2i &grid_size, const double pixel_size, const Point &left_bottom, const Polygons &polygons)
Definition SupportMaterial.cpp:69

References Slic3r::BoundingBox::align_to_grid(), ceil(), Slic3r::debug_out_path(), dilate_trimming_region(), Slic3r::SupportGridParams::extrusion_width, Slic3r::get_extents(), m_bbox, m_grid2, m_grid_size, m_pixel_size, m_style, m_support_angle, m_support_polygons, m_support_polygons_rotated, m_support_spacing, m_trimming_polygons, m_trimming_polygons_rotated, Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, Slic3r::BoundingBoxBase< PointType, APointsType >::offset(), Slic3r::polygons_rotate(), Slic3r::rasterize_polygons(), scale_, seed_fill_block(), Slic3r::simplify_polygons(), Slic3r::smsGrid, Slic3r::smsSnug, Slic3r::SupportGridParams::support_angle, and Slic3r::png::write_gray_to_file_scaled().

+ Here is the call graph for this function:

◆ SupportGridPattern() [2/2]

Slic3r::SupportGridPattern::SupportGridPattern ( )
inlineprivate
823{}

Member Function Documentation

◆ dilate_trimming_region()

static std::vector< unsigned char > Slic3r::SupportGridPattern::dilate_trimming_region ( const std::vector< unsigned char > &  trimming,
const Vec2i grid_size 
)
inlinestaticprivate
829 {
830 std::vector<unsigned char> dilated(trimming.size(), 0);
831 for (int r = 1; r + 1 < grid_size.y(); ++ r)
832 for (int c = 1; c + 1 < grid_size.x(); ++ c) {
833 //int addr = c + r * m_grid_size.x();
834 // 4-neighborhood is not sufficient.
835 // dilated[addr] = trimming[addr] != 0 && trimming[addr - 1] != 0 && trimming[addr + 1] != 0 && trimming[addr - m_grid_size.x()] != 0 && trimming[addr + m_grid_size.x()] != 0;
836 // 8-neighborhood
837 int addr = c + (r - 1) * grid_size.x();
838 bool b = trimming[addr - 1] != 0 && trimming[addr] != 0 && trimming[addr + 1] != 0;
839 addr += grid_size.x();
840 b = b && trimming[addr - 1] != 0 && trimming[addr] != 0 && trimming[addr + 1] != 0;
841 addr += grid_size.x();
842 b = b && trimming[addr - 1] != 0 && trimming[addr] != 0 && trimming[addr + 1] != 0;
843 dilated[addr - grid_size.x()] = b;
844 }
845 return dilated;
846 }

Referenced by SupportGridPattern().

+ Here is the caller graph for this function:

◆ extract_support()

Polygons Slic3r::SupportGridPattern::extract_support ( const coord_t  offset_in_grid,
bool  fill_holes 
)
inline
597 {
598 switch (m_style) {
599 case smsGrid:
600 {
601 #ifdef SUPPORT_USE_AGG_RASTERIZER
602 Polygons support_polygons_simplified = contours_simplified(m_grid_size, m_pixel_size, m_bbox.min, m_grid2, offset_in_grid, fill_holes);
603 #else // SUPPORT_USE_AGG_RASTERIZER
604 // Generate islands, so each island may be tested for overlap with island_samples.
605 assert(std::abs(2 * offset_in_grid) < m_grid.resolution());
606 Polygons support_polygons_simplified = m_grid.contours_simplified(offset_in_grid, fill_holes);
607 #endif // SUPPORT_USE_AGG_RASTERIZER
608
609 ExPolygons islands = diff_ex(support_polygons_simplified, *m_trimming_polygons);
610
611 // Extract polygons, which contain some of the island_samples.
612 Polygons out;
613
614 // Sample a single point per input support polygon, keep it as a reference to maintain corresponding
615 // polygons if ever these polygons get split into parts by the trimming polygons.
616 // As offset_in_grid may be negative, m_support_polygons may stick slightly outside of islands.
617 // Trim ti with islands.
618 Points samples = island_samples(
619 offset_in_grid > 0 ?
620 // Expanding, thus m_support_polygons are all inside islands.
622 // Shrinking, thus m_support_polygons may be trimmed a tiny bit by islands.
624
625 std::vector<std::pair<Point,bool>> samples_inside;
626 for (ExPolygon &island : islands) {
627 BoundingBox bbox = get_extents(island.contour);
628 // Samples are sorted lexicographically.
629 auto it_lower = std::lower_bound(samples.begin(), samples.end(), Point(bbox.min - Point(1, 1)));
630 auto it_upper = std::upper_bound(samples.begin(), samples.end(), Point(bbox.max + Point(1, 1)));
631 samples_inside.clear();
632 for (auto it = it_lower; it != it_upper; ++ it)
633 if (bbox.contains(*it))
634 samples_inside.push_back(std::make_pair(*it, false));
635 if (! samples_inside.empty()) {
636 // For all samples_inside count the boundary crossing.
637 for (size_t i_contour = 0; i_contour <= island.holes.size(); ++ i_contour) {
638 Polygon &contour = (i_contour == 0) ? island.contour : island.holes[i_contour - 1];
639 Points::const_iterator i = contour.points.begin();
640 Points::const_iterator j = contour.points.end() - 1;
641 for (; i != contour.points.end(); j = i ++) {
642 //FIXME this test is not numerically robust. Particularly, it does not handle horizontal segments at y == point(1) well.
643 // Does the ray with y == point(1) intersect this line segment?
644 for (auto &sample_inside : samples_inside) {
645 if (((*i)(1) > sample_inside.first(1)) != ((*j)(1) > sample_inside.first(1))) {
646 double x1 = (double)sample_inside.first(0);
647 double x2 = (double)(*i)(0) + (double)((*j)(0) - (*i)(0)) * (double)(sample_inside.first(1) - (*i)(1)) / (double)((*j)(1) - (*i)(1));
648 if (x1 < x2)
649 sample_inside.second = !sample_inside.second;
650 }
651 }
652 }
653 }
654 // If any of the sample is inside this island, add this island to the output.
655 for (auto &sample_inside : samples_inside)
656 if (sample_inside.second) {
657 polygons_append(out, std::move(island));
658 island.clear();
659 break;
660 }
661 }
662 }
663
664 #ifdef SLIC3R_DEBUG
665 BoundingBox bbox = get_extents(*m_trimming_polygons);
666 if (! islands.empty())
667 bbox.merge(get_extents(islands));
668 if (!out.empty())
669 bbox.merge(get_extents(out));
670 if (!support_polygons_simplified.empty())
671 bbox.merge(get_extents(support_polygons_simplified));
672 SVG svg(debug_out_path("extract_support_from_grid_trimmed-%s-%d-%d-%lf.svg", step_name, iRun, layer_id, print_z).c_str(), bbox);
673 svg.draw(union_ex(support_polygons_simplified), "gray", 0.25f);
674 svg.draw(islands, "red", 0.5f);
675 svg.draw(union_ex(out), "green", 0.5f);
676 svg.draw(union_ex(*m_support_polygons), "blue", 0.5f);
677 svg.draw_outline(islands, "red", "red", scale_(0.05));
678 svg.draw_outline(union_ex(out), "green", "green", scale_(0.05));
679 svg.draw_outline(union_ex(*m_support_polygons), "blue", "blue", scale_(0.05));
680 for (const Point &pt : samples)
681 svg.draw(pt, "black", coord_t(scale_(0.15)));
682 svg.Close();
683 #endif /* SLIC3R_DEBUG */
684
685 if (m_support_angle != 0.)
687 return out;
688 }
689 case smsTree:
690 case smsOrganic:
691// assert(false);
692 [[fallthrough]];
693 case smsSnug:
694 // Merge the support polygons by applying morphological closing and inwards smoothing.
695 auto closing_distance = scaled<float>(m_support_material_closing_radius);
696 auto smoothing_distance = scaled<float>(m_extrusion_width);
697#ifdef SLIC3R_DEBUG
698 SVG::export_expolygons(debug_out_path("extract_support_from_grid_trimmed-%s-%d-%d-%lf.svg", step_name, iRun, layer_id, print_z),
699 { { { diff_ex(expand(*m_support_polygons, closing_distance), closing(*m_support_polygons, closing_distance, SUPPORT_SURFACES_OFFSET_PARAMETERS)) }, { "closed", "blue", 0.5f } },
700 { { union_ex(smooth_outward(closing(*m_support_polygons, closing_distance, SUPPORT_SURFACES_OFFSET_PARAMETERS), smoothing_distance)) }, { "regularized", "red", "black", "", scaled<coord_t>(0.1f), 0.5f } },
701 { { union_ex(*m_support_polygons) }, { "src", "green", 0.5f } },
702 });
703#endif /* SLIC3R_DEBUG */
704 //FIXME do we want to trim with the object here? On one side the columns will be thinner, on the other side support interfaces may disappear for snug supports.
705 // return diff(smooth_outward(closing(*m_support_polygons, closing_distance, SUPPORT_SURFACES_OFFSET_PARAMETERS), smoothing_distance), *m_trimming_polygons);
706 return smooth_outward(closing(*m_support_polygons, closing_distance, SUPPORT_SURFACES_OFFSET_PARAMETERS), smoothing_distance);
707 }
708 assert(false);
709 return Polygons();
710 }
#define SUPPORT_SURFACES_OFFSET_PARAMETERS
Definition SupportCommon.cpp:41
Points points
Definition MultiPoint.hpp:18
static void export_expolygons(const char *path, const BoundingBox &bbox, const Slic3r::ExPolygons &expolygons, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0)
Definition SVG.cpp:309
static Points island_samples(const ExPolygons &expolygons)
Definition SupportMaterial.cpp:918
if(!(yy_init))
Definition lexer.c:1190
void draw(const IconManager::Icon &icon, const ImVec2 &size, const ImVec4 &tint_col, const ImVec4 &border_col)
Draw imgui image with icon.
Definition IconManager.cpp:164
std::vector< Polygon, PointsAllocator< Polygon > > Polygons
Definition Polygon.hpp:15
void smooth_outward(MutablePolygon &polygon, coord_t clip_dist_scaled)
Definition MutablePolygon.cpp:261
Slic3r::ExPolygons diff_ex(const Slic3r::Polygons &subject, const Slic3r::Polygons &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:726
Slic3r::Polygons expand(const Slic3r::Polygon &polygon, const float delta, ClipperLib::JoinType joinType=DefaultJoinType, double miterLimit=DefaultMiterLimit)
Definition ClipperUtils.hpp:363
Slic3r::ExPolygons union_ex(const Slic3r::Polygons &subject, ClipperLib::PolyFillType fill_type)
Definition ClipperUtils.cpp:774
std::vector< ExPolygon > ExPolygons
Definition ExPolygon.hpp:13
Slic3r::Polygons closing(const Slic3r::Polygons &polygons, const float delta1, const float delta2, ClipperLib::JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:587
Slic3r::ExPolygons intersection_ex(const Slic3r::Polygons &subject, const Slic3r::Polygons &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:755
void polygons_append(Polygons &dst, const ExPolygon &src)
Definition ExPolygon.hpp:375
@ smsOrganic
Definition PrintConfig.hpp:90
@ smsTree
Definition PrintConfig.hpp:90
static Polygons contours_simplified(const Vec2i &grid_size, const double pixel_size, Point left_bottom, const std::vector< unsigned char > &grid, coord_t offset, bool fill_holes)
Definition SupportMaterial.cpp:103
std::vector< Point, PointsAllocator< Point > > Points
Definition Point.hpp:58
const Polygon & contour(const ExPolygon &p)
Definition AGGRaster.hpp:21
const Polygons & holes(const ExPolygon &p)
Definition AGGRaster.hpp:22
Slic3r::Polygon Polygon
Definition Emboss.cpp:34
Kernel::Point_2 Point
Definition point_areas.cpp:20

References Slic3r::SVG::Close(), Slic3r::closing(), Slic3r::BoundingBoxBase< PointType, APointsType >::contains(), Slic3r::contour(), Slic3r::contours_simplified(), Slic3r::debug_out_path(), Slic3r::diff_ex(), Slic3r::SVG::draw(), Slic3r::SVG::draw_outline(), Slic3r::expand(), Slic3r::SVG::export_expolygons(), Slic3r::get_extents(), Slic3r::intersection_ex(), island_samples(), m_bbox, m_extrusion_width, m_grid2, m_grid_size, m_pixel_size, m_style, m_support_angle, m_support_material_closing_radius, m_support_polygons, m_trimming_polygons, Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::merge(), Slic3r::BoundingBoxBase< PointType, APointsType >::min, Slic3r::MultiPoint::points, Slic3r::polygons_append(), Slic3r::polygons_rotate(), scale_, Slic3r::smooth_outward(), Slic3r::smsGrid, Slic3r::smsOrganic, Slic3r::smsSnug, Slic3r::smsTree, SUPPORT_SURFACES_OFFSET_PARAMETERS, and Slic3r::union_ex().

Referenced by Slic3r::fill_contact_layer().

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

◆ island_samples()

static Points Slic3r::SupportGridPattern::island_samples ( const ExPolygons expolygons)
inlinestaticprivate
919 {
920 Points pts;
921 pts.reserve(expolygons.size());
922 for (const ExPolygon &expoly : expolygons)
923 if (expoly.contour.points.size() > 2) {
924 #if 0
925 pts.push_back(island_sample(expoly));
926 #else
927 Polygons polygons = offset(expoly, - 20.f);
928 for (const Polygon &poly : polygons)
929 if (! poly.points.empty()) {
930 // Take a small fixed number of samples of this polygon for robustness.
931 int num_points = int(poly.points.size());
932 int num_samples = std::min(num_points, 4);
933 int stride = num_points / num_samples;
934 for (int i = 0; i < num_points; i += stride)
935 pts.push_back(poly.points[i]);
936 break;
937 }
938 #endif
939 }
940 // Sort the points lexicographically, so a binary search could be used to locate points inside a bounding box.
941 std::sort(pts.begin(), pts.end());
942 return pts;
943 }
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, ClipperLib::JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:416
bool empty(const BoundingBoxBase< PointType, PointsType > &bb)
Definition BoundingBox.hpp:229
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183

References Slic3r::ExPolygon::contour, Slic3r::offset(), and Slic3r::MultiPoint::points.

Referenced by extract_support().

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

◆ operator=()

SupportGridPattern & Slic3r::SupportGridPattern::operator= ( const SupportGridPattern rhs)
private

◆ seed_fill_block()

static void Slic3r::SupportGridPattern::seed_fill_block ( std::vector< unsigned char > &  grid,
Vec2i  grid_size,
const std::vector< unsigned char > &  trimming,
const Vec2i grid_blocks,
int  oversampling 
)
inlinestaticprivate
850 {
851 int size = oversampling;
852 int stride = grid_size.x();
853 for (int block_r = 0; block_r < grid_blocks.y(); ++ block_r)
854 for (int block_c = 0; block_c < grid_blocks.x(); ++ block_c) {
855 // Propagate the support pixels over the macro cell up to the trimming mask.
856 int addr = block_c * size + 1 + (block_r * size + 1) * stride;
857 unsigned char *grid_data = grid.data() + addr;
858 const unsigned char *mask_data = trimming.data() + addr;
859 // Top to bottom propagation.
860 #define PROPAGATION_STEP(offset) \
861 do { \
862 int addr = r * stride + c; \
863 int addr2 = addr + offset; \
864 if (grid_data[addr2] && ! mask_data[addr] && ! mask_data[addr2]) \
865 grid_data[addr] = 1; \
866 } while (0);
867 for (int r = 0; r < size; ++ r) {
868 if (r > 0)
869 for (int c = 0; c < size; ++ c)
870 PROPAGATION_STEP(- stride);
871 for (int c = 1; c < size; ++ c)
872 PROPAGATION_STEP(- 1);
873 for (int c = size - 2; c >= 0; -- c)
874 PROPAGATION_STEP(+ 1);
875 }
876 // Bottom to top propagation.
877 for (int r = size - 2; r >= 0; -- r) {
878 for (int c = 0; c < size; ++ c)
879 PROPAGATION_STEP(+ stride);
880 for (int c = 1; c < size; ++ c)
881 PROPAGATION_STEP(- 1);
882 for (int c = size - 2; c >= 0; -- c)
883 PROPAGATION_STEP(+ 1);
884 }
885 #undef PROPAGATION_STEP
886 }
887 }
#define PROPAGATION_STEP(offset)
std::vector< ArithmeticOnly< T > > grid(const T &start, const T &stop, const T &stride)
A set of equidistant values starting from 'start' (inclusive), ending in the closest multiple of 'str...
Definition MTUtils.hpp:125

References Slic3r::grid(), and PROPAGATION_STEP.

Referenced by SupportGridPattern().

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

Member Data Documentation

◆ m_bbox

BoundingBox Slic3r::SupportGridPattern::m_bbox
private

◆ m_extrusion_width

coordf_t Slic3r::SupportGridPattern::m_extrusion_width
private

Referenced by extract_support().

◆ m_grid2

std::vector<unsigned char> Slic3r::SupportGridPattern::m_grid2
private

◆ m_grid_size

Vec2i Slic3r::SupportGridPattern::m_grid_size
private

◆ m_pixel_size

double Slic3r::SupportGridPattern::m_pixel_size
private

◆ m_style

SupportMaterialStyle Slic3r::SupportGridPattern::m_style
private

◆ m_support_angle

coordf_t Slic3r::SupportGridPattern::m_support_angle
private

◆ m_support_material_closing_radius

coordf_t Slic3r::SupportGridPattern::m_support_material_closing_radius
private

Referenced by extract_support().

◆ m_support_polygons

const Polygons* Slic3r::SupportGridPattern::m_support_polygons
private

◆ m_support_polygons_rotated

Polygons Slic3r::SupportGridPattern::m_support_polygons_rotated
private

Referenced by SupportGridPattern().

◆ m_support_spacing

coordf_t Slic3r::SupportGridPattern::m_support_spacing
private

Referenced by SupportGridPattern().

◆ m_trimming_polygons

const Polygons* Slic3r::SupportGridPattern::m_trimming_polygons
private

◆ m_trimming_polygons_rotated

Polygons Slic3r::SupportGridPattern::m_trimming_polygons_rotated
private

Referenced by SupportGridPattern().


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