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

Typedefs

using CGALMeshPtr

Functions

void perform_csg (CSGType op, CGALMeshPtr &dst, CGALMeshPtr &src)
template<class Ex, class It>
std::vector< CGALMeshPtr > get_cgalptrs (Ex policy, const Range< It > &csgrange)

Typedef Documentation

◆ CGALMeshPtr

Function Documentation

◆ get_cgalptrs()

template<class Ex, class It>
std::vector< CGALMeshPtr > Slic3r::csg::detail_cgal::get_cgalptrs ( Ex policy,
const Range< It > & csgrange )
104{
105 std::vector<CGALMeshPtr> ret(csgrange.size());
106 execution::for_each(policy, size_t(0), csgrange.size(),
107 [&csgrange, &ret](size_t i) {
108 auto it = csgrange.begin();
109 std::advance(it, i);
110 auto &csgpart = *it;
111 ret[i] = get_cgalmesh(csgpart);
112 });
113
114 return ret;
115}
size_t size() const
Definition libslic3r.h:401
void for_each(const EP &ep, It from, It to, Fn &&fn, size_t granularity=1)
Definition Execution.hpp:46

References Slic3r::execution::for_each(), and Slic3r::Range< It >::size().

Here is the call graph for this function:

◆ perform_csg()

void Slic3r::csg::detail_cgal::perform_csg ( CSGType op,
CGALMeshPtr & dst,
CGALMeshPtr & src )
inline
80{
81 if (!dst && op == CSGType::Union && src) {
82 dst = std::move(src);
83 return;
84 }
85
86 if (!dst || !src)
87 return;
88
89 switch (op) {
90 case CSGType::Union:
91 MeshBoolean::cgal::plus(*dst, *src);
92 break;
94 MeshBoolean::cgal::minus(*dst, *src);
95 break;
98 break;
99 }
100}
void intersect(CGALMesh &A, CGALMesh &B)
Definition MeshBoolean.cpp:477
void plus(CGALMesh &A, CGALMesh &B)
Definition MeshBoolean.cpp:476
void minus(CGALMesh &A, CGALMesh &B)
Definition MeshBoolean.cpp:475
@ Difference
Definition CSGMesh.hpp:24
@ Intersection
Definition CSGMesh.hpp:24
@ Union
Definition CSGMesh.hpp:24

References Slic3r::csg::Difference, Slic3r::MeshBoolean::cgal::intersect(), Slic3r::csg::Intersection, Slic3r::MeshBoolean::cgal::minus(), Slic3r::MeshBoolean::cgal::plus(), and Slic3r::csg::Union.

Here is the call graph for this function: