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

Typedefs

using McutMeshPtr

Functions

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

Typedef Documentation

◆ McutMeshPtr

Function Documentation

◆ get_mcutptrs()

template<class Ex, class It>
std::vector< McutMeshPtr > Slic3r::csg::detail_mcut::get_mcutptrs ( Ex policy,
const Range< It > & csgrange )
148 {
149 std::vector<McutMeshPtr> ret(csgrange.size());
150 execution::for_each(policy, size_t(0), csgrange.size(),
151 [&csgrange, &ret](size_t i) {
152 auto it = csgrange.begin();
153 std::advance(it, i);
154 auto& csgpart = *it;
155 ret[i] = get_mcutmesh(csgpart);
156 });
157
158 return ret;
159 }
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_mcut::perform_csg ( CSGType op,
McutMeshPtr & dst,
McutMeshPtr & src )
inline
124 {
125 if (!dst && op == CSGType::Union && src) {
126 dst = std::move(src);
127 return;
128 }
129
130 if (!dst || !src)
131 return;
132
133 switch (op) {
134 case CSGType::Union:
135 MeshBoolean::mcut::do_boolean(*dst, *src,"UNION");
136 break;
138 MeshBoolean::mcut::do_boolean(*dst, *src,"A_NOT_B");
139 break;
141 MeshBoolean::mcut::do_boolean(*dst, *src,"INTERSECTION");
142 break;
143 }
144 }
void do_boolean(McutMesh &srcMesh, const McutMesh &cutMesh, const std::string &boolean_opts)
Definition MeshBoolean.cpp:942
@ Difference
Definition CSGMesh.hpp:24
@ Intersection
Definition CSGMesh.hpp:24
@ Union
Definition CSGMesh.hpp:24

References Slic3r::csg::Difference, Slic3r::MeshBoolean::mcut::do_boolean(), Slic3r::csg::Intersection, and Slic3r::csg::Union.

Here is the call graph for this function: