OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::csg::detail Namespace Reference

Functions

void merge_slices (csg::CSGType op, size_t i, std::vector< ExPolygons > &target, std::vector< ExPolygons > &source)
void collect_nonempty_indices (csg::CSGType op, const std::vector< float > &slicegrid, const std::vector< ExPolygons > &slices, std::vector< size_t > &indices)

Function Documentation

◆ collect_nonempty_indices()

void Slic3r::csg::detail::collect_nonempty_indices ( csg::CSGType op,
const std::vector< float > & slicegrid,
const std::vector< ExPolygons > & slices,
std::vector< size_t > & indices )
inline
46{
47 indices.clear();
48 for (size_t i = 0; i < slicegrid.size(); ++i) {
49 if (op == CSGType::Intersection || !slices[i].empty())
50 indices.emplace_back(i);
51 }
52}
@ Intersection
Definition CSGMesh.hpp:24
bool empty(const BoundingBoxBase< PointType, PointsType > &bb)
Definition BoundingBox.hpp:273

References Slic3r::empty(), and Slic3r::csg::Intersection.

Here is the call graph for this function:

◆ merge_slices()

void Slic3r::csg::detail::merge_slices ( csg::CSGType op,
size_t i,
std::vector< ExPolygons > & target,
std::vector< ExPolygons > & source )
inline
27{
28 switch(op) {
29 case CSGType::Union:
30 for (ExPolygon &expoly : source[i])
31 target[i].emplace_back(std::move(expoly));
32 break;
34 target[i] = diff_ex(target[i], source[i]);
35 break;
37 target[i] = intersection_ex(target[i], source[i]);
38 break;
39 }
40}
Definition ExPolygon.hpp:23
@ Difference
Definition CSGMesh.hpp:24
@ Union
Definition CSGMesh.hpp:24
Slic3r::ExPolygons diff_ex(const Slic3r::Polygons &subject, const Slic3r::Polygons &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:831
Slic3r::ExPolygons intersection_ex(const Slic3r::Polygons &subject, const Slic3r::Polygons &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:878

References Slic3r::diff_ex(), Slic3r::csg::Difference, Slic3r::csg::Intersection, Slic3r::intersection_ex(), and Slic3r::csg::Union.

Here is the call graph for this function: