OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{ExclusionVolumeGeometry.cpp} Namespace Reference

Functions

void append_active_footprints (Polygons &out, const std::vector< BedExcludeRegion > &regions, const double z_min, const double z_max, const Point &translation)
ExPolygons union_active_footprints (Polygons footprints, const coord_t clearance)

Variables

constexpr double Z_EPSILON_MM = 1e-6

Function Documentation

◆ append_active_footprints()

void Slic3r::anonymous_namespace{ExclusionVolumeGeometry.cpp}::append_active_footprints ( Polygons & out,
const std::vector< BedExcludeRegion > & regions,
const double z_min,
const double z_max,
const Point & translation )
32{
33 for (const BedExcludeRegion &region : regions) {
34 if (region.polygon.points.size() < 3 || region.z_max < region.z_min ||
35 !bed_exclusion_z_ranges_overlap(z_min, z_max, region.z_min, region.z_max))
36 continue;
37
38 Polygon footprint = region.polygon;
39 footprint.translate(translation);
40 out.emplace_back(std::move(footprint));
41 }
42}
void translate(double x, double y)
Definition MultiPoint.hpp:38
Definition Polygon.hpp:31
bool bed_exclusion_z_ranges_overlap(double first_min, double first_max, double second_min, double second_max)
Definition ExclusionVolumeGeometry.cpp:57
Definition PrintConfig.hpp:2545

References append_active_footprints(), Slic3r::bed_exclusion_z_ranges_overlap(), and Slic3r::MultiPoint::translate().

Referenced by append_active_footprints().

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

◆ union_active_footprints()

ExPolygons Slic3r::anonymous_namespace{ExclusionVolumeGeometry.cpp}::union_active_footprints ( Polygons footprints,
const coord_t clearance )
45{
46 if (footprints.empty())
47 return {};
48
49 ExPolygons result = union_ex(footprints);
50 if (clearance > 0)
51 result = offset_ex(result, float(clearance));
52 return result;
53}
std::vector< ExPolygon > ExPolygons
Definition ExPolygon.hpp:20
Slic3r::ExPolygons offset_ex(const Slic3r::Polygons &polygons, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:605
Slic3r::ExPolygons union_ex(const Slic3r::Polygons &subject, PolyFillType fill_type)
Definition ClipperUtils.cpp:1011

References Slic3r::offset_ex(), union_active_footprints(), and Slic3r::union_ex().

Referenced by union_active_footprints().

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

Variable Documentation

◆ Z_EPSILON_MM

double Slic3r::anonymous_namespace{ExclusionVolumeGeometry.cpp}::Z_EPSILON_MM = 1e-6
constexpr