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

Functions

bool same_zone (const BoundingBoxf &a, const BoundingBoxf &b)
BoundingBox inset (BoundingBox box, const Point &by)
std::vector< BoundingBox > boxes_around (const BoundingBox &bed, const BoundingBox &zone)

Variables

constexpr const char * kFenceName = "IMEXOutsidePrimaryZone"
constexpr const char * kStripName = "IMEXCollisionZone"

Function Documentation

◆ boxes_around()

std::vector< BoundingBox > Slic3r::anonymous_namespace{IMEXArrange.cpp}::boxes_around ( const BoundingBox & bed,
const BoundingBox & zone )
48{
49 std::vector<BoundingBox> out;
50 auto add = [&out](coord_t x0, coord_t y0, coord_t x1, coord_t y1) {
51 if (x1 > x0 && y1 > y0)
52 out.emplace_back(Point(x0, y0), Point(x1, y1));
53 };
54 const coord_t x0 = std::max(zone.min.x(), bed.min.x());
55 const coord_t x1 = std::min(zone.max.x(), bed.max.x());
56 add(bed.min.x(), bed.min.y(), zone.min.x(), bed.max.y());
57 add(zone.max.x(), bed.min.y(), bed.max.x(), bed.max.y());
58 add(x0, bed.min.y(), x1, zone.min.y());
59 add(x0, zone.max.y(), x1, bed.max.y());
60 return out;
61}
PointType max
Definition BoundingBox.hpp:21
PointType min
Definition BoundingBox.hpp:20
Definition Point.hpp:199
int64_t coord_t
Definition libslic3r.h:48

References boxes_around(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, and Slic3r::BoundingBoxBase< PointType, APointsType >::min.

Referenced by boxes_around().

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

◆ inset()

BoundingBox Slic3r::anonymous_namespace{IMEXArrange.cpp}::inset ( BoundingBox box,
const Point & by )
39{
40 box.min += by;
41 box.max -= by;
42 return box;
43}

References inset(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, and Slic3r::BoundingBoxBase< PointType, APointsType >::min.

Referenced by inset().

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

◆ same_zone()

bool Slic3r::anonymous_namespace{IMEXArrange.cpp}::same_zone ( const BoundingBoxf & a,
const BoundingBoxf & b )
34{
35 return is_approx(a.min, b.min) && is_approx(a.max, b.max);
36}
constexpr bool is_approx(Number value, Number test_value, Number precision=EPSILON)
Definition libslic3r.h:320

References Slic3r::is_approx(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, and same_zone().

Referenced by same_zone().

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

Variable Documentation

◆ kFenceName

const char* Slic3r::anonymous_namespace{IMEXArrange.cpp}::kFenceName = "IMEXOutsidePrimaryZone"
constexpr

◆ kStripName

const char* Slic3r::anonymous_namespace{IMEXArrange.cpp}::kStripName = "IMEXCollisionZone"
constexpr