Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::sla::SupportTreeBuilder Class Reference

#include <src/libslic3r/SLA/SupportTreeBuilder.hpp>

+ Collaboration diagram for Slic3r::sla::SupportTreeBuilder:

Public Member Functions

 SupportTreeBuilder (const JobController &ctl={})
 
 SupportTreeBuilder (SupportTreeBuilder &&o)
 
 SupportTreeBuilder (const SupportTreeBuilder &o)
 
SupportTreeBuilderoperator= (SupportTreeBuilder &&o)
 
SupportTreeBuilderoperator= (const SupportTreeBuilder &o)
 
const JobControllerctl () const
 
template<class... Args>
Headadd_head (unsigned id, Args &&... args)
 
long add_pillar (long headid, double length)
 
void add_pillar_base (long pid, double baseheight=3, double radius=2)
 
template<class... Args>
const Anchoradd_anchor (Args &&...args)
 
void increment_bridges (const Pillar &pillar)
 
void increment_links (const Pillar &pillar)
 
unsigned bridgecount (const Pillar &pillar) const
 
template<class... Args>
long add_pillar (Args &&...args)
 
template<class... Args>
const Junctionadd_junction (Args &&... args)
 
const Bridgeadd_bridge (const Vec3d &s, const Vec3d &e, double r)
 
const Bridgeadd_bridge (long headid, const Vec3d &endp)
 
template<class... Args>
const Bridgeadd_crossbridge (Args &&... args)
 
template<class... Args>
const DiffBridgeadd_diffbridge (Args &&... args)
 
Headhead (unsigned id)
 
size_t pillarcount () const
 
const std::vector< Pillar > & pillars () const
 
const std::vector< Head > & heads () const
 
const std::vector< Bridge > & bridges () const
 
const std::vector< Bridge > & crossbridges () const
 
template<class T >
IntegerOnly< T, const Pillar & > pillar (T id) const
 
template<class T >
IntegerOnly< T, Pillar & > pillar (T id)
 
const indexed_triangle_setmerged_mesh (size_t steps=45) const
 
const indexed_triangle_setmerge_and_cleanup ()
 
const indexed_triangle_setretrieve_mesh (MeshType meshtype=MeshType::Support) const
 
void retrieve_full_mesh (indexed_triangle_set &outmesh) const
 

Private Types

using Mutex = tbb::spin_mutex
 

Private Member Functions

template<class BridgeT , class... Args>
const BridgeT & _add_bridge (std::vector< BridgeT > &br, Args &&... args)
 

Private Attributes

std::vector< Headm_heads
 
std::vector< size_t > m_head_indices
 
std::vector< Pillarm_pillars
 
std::vector< Junctionm_junctions
 
std::vector< Bridgem_bridges
 
std::vector< Bridgem_crossbridges
 
std::vector< DiffBridgem_diffbridges
 
std::vector< Pedestalm_pedestals
 
std::vector< Anchorm_anchors
 
JobController m_ctl
 
indexed_triangle_set m_meshcache
 
Mutex m_mutex
 
bool m_meshcache_valid = false
 
double m_model_height = 0
 

Detailed Description

Member Typedef Documentation

◆ Mutex

using Slic3r::sla::SupportTreeBuilder::Mutex = tbb::spin_mutex
private

Constructor & Destructor Documentation

◆ SupportTreeBuilder() [1/3]

Slic3r::sla::SupportTreeBuilder::SupportTreeBuilder ( const JobController ctl = {})
inlineexplicit
250{}) : m_ctl{ctl} {}
const JobController & ctl() const
Definition SupportTreeBuilder.hpp:256
JobController m_ctl
Definition SupportTreeBuilder.hpp:229

◆ SupportTreeBuilder() [2/3]

Slic3r::sla::SupportTreeBuilder::SupportTreeBuilder ( SupportTreeBuilder &&  o)
27 : m_heads(std::move(o.m_heads))
28 , m_head_indices{std::move(o.m_head_indices)}
29 , m_pillars{std::move(o.m_pillars)}
30 , m_bridges{std::move(o.m_bridges)}
31 , m_crossbridges{std::move(o.m_crossbridges)}
32 , m_meshcache{std::move(o.m_meshcache)}
33 , m_meshcache_valid{o.m_meshcache_valid}
34 , m_model_height{o.m_model_height}
35{}
std::vector< Bridge > m_crossbridges
Definition SupportTreeBuilder.hpp:224
double m_model_height
Definition SupportTreeBuilder.hpp:236
indexed_triangle_set m_meshcache
Definition SupportTreeBuilder.hpp:233
std::vector< Bridge > m_bridges
Definition SupportTreeBuilder.hpp:223
std::vector< Head > m_heads
Definition SupportTreeBuilder.hpp:219
std::vector< Pillar > m_pillars
Definition SupportTreeBuilder.hpp:221
std::vector< size_t > m_head_indices
Definition SupportTreeBuilder.hpp:220
bool m_meshcache_valid
Definition SupportTreeBuilder.hpp:235

◆ SupportTreeBuilder() [3/3]

Slic3r::sla::SupportTreeBuilder::SupportTreeBuilder ( const SupportTreeBuilder o)
38 : m_heads(o.m_heads)
39 , m_head_indices{o.m_head_indices}
40 , m_pillars{o.m_pillars}
41 , m_bridges{o.m_bridges}
42 , m_crossbridges{o.m_crossbridges}
43 , m_meshcache{o.m_meshcache}
44 , m_meshcache_valid{o.m_meshcache_valid}
45 , m_model_height{o.m_model_height}
46{}

Member Function Documentation

◆ _add_bridge()

template<class BridgeT , class... Args>
const BridgeT & Slic3r::sla::SupportTreeBuilder::_add_bridge ( std::vector< BridgeT > &  br,
Args &&...  args 
)
inlineprivate
240 {
241 std::lock_guard<Mutex> lk(m_mutex);
242 br.emplace_back(std::forward<Args>(args)...);
243 br.back().id = long(br.size() - 1);
244 m_meshcache_valid = false;
245 return br.back();
246 }
Mutex m_mutex
Definition SupportTreeBuilder.hpp:234
wchar_t const wchar_t unsigned long
Definition windows.hpp:29

References long, m_meshcache_valid, and m_mutex.

Referenced by add_bridge(), add_crossbridge(), and add_diffbridge().

+ Here is the caller graph for this function:

◆ add_anchor()

template<class... Args>
const Anchor & Slic3r::sla::SupportTreeBuilder::add_anchor ( Args &&...  args)
inline
296 {
297 std::lock_guard<Mutex> lk(m_mutex);
298 m_anchors.emplace_back(std::forward<Args>(args)...);
299 m_anchors.back().id = long(m_junctions.size() - 1);
300 m_meshcache_valid = false;
301 return m_anchors.back();
302 }
std::vector< Junction > m_junctions
Definition SupportTreeBuilder.hpp:222
std::vector< Anchor > m_anchors
Definition SupportTreeBuilder.hpp:227

References long, m_anchors, m_junctions, m_meshcache_valid, and m_mutex.

Referenced by Slic3r::sla::BranchingTreeBuilder::add_mesh_bridge(), and Slic3r::sla::DefaultSupportTree::connect_to_model_body().

+ Here is the caller graph for this function:

◆ add_bridge() [1/2]

const Bridge & Slic3r::sla::SupportTreeBuilder::add_bridge ( const Vec3d s,
const Vec3d e,
double  r 
)
inline
352 {
353 return _add_bridge(m_bridges, s, e, r);
354 }
const BridgeT & _add_bridge(std::vector< BridgeT > &br, Args &&... args)
Definition SupportTreeBuilder.hpp:239

References _add_bridge(), and m_bridges.

Referenced by Slic3r::sla::connect_to_ground(), Slic3r::sla::DefaultSupportTree::connect_to_nearpillar(), and Slic3r::sla::create_ground_pillar().

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

◆ add_bridge() [2/2]

const Bridge & Slic3r::sla::SupportTreeBuilder::add_bridge ( long  headid,
const Vec3d endp 
)
inline
357 {
358 std::lock_guard<Mutex> lk(m_mutex);
359 assert(headid >= 0 && size_t(headid) < m_head_indices.size());
360
361 Head &h = m_heads[m_head_indices[size_t(headid)]];
362 m_bridges.emplace_back(h.junction_point(), endp, h.r_back_mm);
363 m_bridges.back().id = long(m_bridges.size() - 1);
364
365 h.bridge_id = m_bridges.back().id;
366 m_meshcache_valid = false;
367 return m_bridges.back();
368 }

References Slic3r::sla::Head::bridge_id, Slic3r::sla::Head::junction_point(), long, m_bridges, m_head_indices, m_heads, m_meshcache_valid, m_mutex, and Slic3r::sla::Head::r_back_mm.

+ Here is the call graph for this function:

◆ add_crossbridge()

template<class... Args>
const Bridge & Slic3r::sla::SupportTreeBuilder::add_crossbridge ( Args &&...  args)
inline
371 {
372 return _add_bridge(m_crossbridges, std::forward<Args>(args)...);
373 }

References _add_bridge(), and m_crossbridges.

Referenced by Slic3r::sla::DefaultSupportTree::interconnect().

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

◆ add_diffbridge()

template<class... Args>
const DiffBridge & Slic3r::sla::SupportTreeBuilder::add_diffbridge ( Args &&...  args)
inline
376 {
377 return _add_bridge(m_diffbridges, std::forward<Args>(args)...);
378 }
std::vector< DiffBridge > m_diffbridges
Definition SupportTreeBuilder.hpp:225

References _add_bridge(), and m_diffbridges.

Referenced by Slic3r::sla::BranchingTreeBuilder::add_mesh_bridge(), Slic3r::sla::build_ground_connection(), Slic3r::sla::BranchingTreeBuilder::build_subtree(), and Slic3r::sla::create_ground_pillar().

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

◆ add_head()

template<class... Args>
Head & Slic3r::sla::SupportTreeBuilder::add_head ( unsigned  id,
Args &&...  args 
)
inline
259 {
260 std::lock_guard<Mutex> lk(m_mutex);
261 m_heads.emplace_back(std::forward<Args>(args)...);
262 m_heads.back().id = id;
263
264 if (id >= m_head_indices.size()) m_head_indices.resize(id + 1);
265 m_head_indices[id] = m_heads.size() - 1;
266
267 m_meshcache_valid = false;
268 return m_heads.back();
269 }

References m_head_indices, m_heads, m_meshcache_valid, and m_mutex.

Referenced by Slic3r::sla::DefaultSupportTree::add_pinheads(), and Slic3r::sla::create_branching_tree().

+ Here is the caller graph for this function:

◆ add_junction()

template<class... Args>
const Junction & Slic3r::sla::SupportTreeBuilder::add_junction ( Args &&...  args)
inline
343 {
344 std::lock_guard<Mutex> lk(m_mutex);
345 m_junctions.emplace_back(std::forward<Args>(args)...);
346 m_junctions.back().id = long(m_junctions.size() - 1);
347 m_meshcache_valid = false;
348 return m_junctions.back();
349 }

References long, m_junctions, m_meshcache_valid, and m_mutex.

Referenced by Slic3r::sla::build_ground_connection(), Slic3r::sla::BranchingTreeBuilder::build_subtree(), Slic3r::sla::connect_to_ground(), Slic3r::sla::DefaultSupportTree::connect_to_nearpillar(), and Slic3r::sla::create_ground_pillar().

+ Here is the caller graph for this function:

◆ add_pillar() [1/2]

template<class... Args>
long Slic3r::sla::SupportTreeBuilder::add_pillar ( Args &&...  args)
inline
329 {
330 std::lock_guard<Mutex> lk(m_mutex);
331 if (m_pillars.capacity() < m_heads.size())
332 m_pillars.reserve(m_heads.size() * 10);
333
334 m_pillars.emplace_back(std::forward<Args>(args)...);
335 Pillar& pillar = m_pillars.back();
336 pillar.id = long(m_pillars.size() - 1);
337 pillar.starts_from_head = false;
338 m_meshcache_valid = false;
339 return pillar.id;
340 }
IntegerOnly< T, const Pillar & > pillar(T id) const
Definition SupportTreeBuilder.hpp:399

References long, m_heads, m_meshcache_valid, m_mutex, m_pillars, and pillar().

+ Here is the call graph for this function:

◆ add_pillar() [2/2]

long Slic3r::sla::SupportTreeBuilder::add_pillar ( long  headid,
double  length 
)
inline
272 {
273 std::lock_guard<Mutex> lk(m_mutex);
274 if (m_pillars.capacity() < m_heads.size())
275 m_pillars.reserve(m_heads.size() * 10);
276
277 assert(headid >= 0 && size_t(headid) < m_head_indices.size());
278 Head &head = m_heads[m_head_indices[size_t(headid)]];
279
280 Vec3d hjp = head.junction_point() - Vec3d{0, 0, length};
281 m_pillars.emplace_back(hjp, length, head.r_back_mm);
282
283 Pillar& pillar = m_pillars.back();
284 pillar.id = long(m_pillars.size() - 1);
285 head.pillar_id = pillar.id;
286 pillar.start_junction_id = head.id;
287 pillar.starts_from_head = true;
288
289 m_meshcache_valid = false;
290 return pillar.id;
291 }
Head & head(unsigned id)
Definition SupportTreeBuilder.hpp:380
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition SpatIndex.hpp:15
double length(const Points &pts)
Definition MultiPoint.hpp:116
Vec3d junction_point() const
Definition SupportTreeBuilder.hpp:122
long pillar_id
Definition SupportTreeBuilder.hpp:89
double r_back_mm
Definition SupportTreeBuilder.hpp:83
long id
Definition SupportTreeBuilder.hpp:67

References head(), Slic3r::sla::SupportTreeNode::id, Slic3r::sla::Head::junction_point(), Slic3r::length(), long, m_head_indices, m_heads, m_meshcache_valid, m_mutex, m_pillars, pillar(), Slic3r::sla::Head::pillar_id, and Slic3r::sla::Head::r_back_mm.

Referenced by Slic3r::sla::build_ground_connection(), Slic3r::sla::DefaultSupportTree::connect_to_model_body(), Slic3r::sla::DefaultSupportTree::connect_to_nearpillar(), and Slic3r::sla::create_ground_pillar().

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

◆ add_pillar_base()

void Slic3r::sla::SupportTreeBuilder::add_pillar_base ( long  pid,
double  baseheight = 3,
double  radius = 2 
)
75{
76 std::lock_guard<Mutex> lk(m_mutex);
77 assert(pid >= 0 && size_t(pid) < m_pillars.size());
78 Pillar& pll = m_pillars[size_t(pid)];
79 m_pedestals.emplace_back(pll.endpt, std::min(baseheight, pll.height),
80 std::max(radius, pll.r_start), pll.r_start);
81
82 m_pedestals.back().id = m_pedestals.size() - 1;
83 m_meshcache_valid = false;
84}
std::vector< Pedestal > m_pedestals
Definition SupportTreeBuilder.hpp:226

References Slic3r::sla::Pillar::endpt, Slic3r::sla::Pillar::height, m_meshcache_valid, m_mutex, m_pedestals, m_pillars, and Slic3r::sla::Pillar::r_start.

Referenced by Slic3r::sla::DefaultSupportTree::add_pillar_base(), Slic3r::sla::build_ground_connection(), and Slic3r::sla::create_ground_pillar().

+ Here is the caller graph for this function:

◆ bridgecount()

unsigned Slic3r::sla::SupportTreeBuilder::bridgecount ( const Pillar pillar) const
inline
322 {
323 std::lock_guard<Mutex> lk(m_mutex);
324 assert(pillar.id >= 0 && size_t(pillar.id) < m_pillars.size());
325 return pillar.bridges;
326 }

References m_mutex, m_pillars, and pillar().

Referenced by Slic3r::sla::DefaultSupportTree::connect_to_nearpillar().

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

◆ bridges()

const std::vector< Bridge > & Slic3r::sla::SupportTreeBuilder::bridges ( ) const
inline
396{ return m_bridges; }

References m_bridges.

◆ crossbridges()

const std::vector< Bridge > & Slic3r::sla::SupportTreeBuilder::crossbridges ( ) const
inline
397{ return m_crossbridges; }

References m_crossbridges.

◆ ctl()

const JobController & Slic3r::sla::SupportTreeBuilder::ctl ( ) const
inline
256{ return m_ctl; }

References m_ctl.

Referenced by Slic3r::sla::create_branching_tree(), Slic3r::sla::DefaultSupportTree::execute(), Slic3r::sla::Anchor::Head(), Slic3r::sla::BranchingTreeBuilder::is_valid(), and merged_mesh().

+ Here is the caller graph for this function:

◆ head()

Head & Slic3r::sla::SupportTreeBuilder::head ( unsigned  id)
inline
381 {
382 std::lock_guard<Mutex> lk(m_mutex);
383 assert(id < m_head_indices.size());
384
385 m_meshcache_valid = false;
386 return m_heads[m_head_indices[id]];
387 }

References m_head_indices, m_heads, m_meshcache_valid, and m_mutex.

Referenced by add_pillar(), Slic3r::sla::DefaultSupportTree::classify(), Slic3r::sla::create_branching_tree(), Slic3r::sla::create_ground_pillar(), merged_mesh(), and Slic3r::sla::DefaultSupportTree::routing_to_ground().

+ Here is the caller graph for this function:

◆ heads()

const std::vector< Head > & Slic3r::sla::SupportTreeBuilder::heads ( ) const
inline
395{ return m_heads; }

References m_heads.

◆ increment_bridges()

void Slic3r::sla::SupportTreeBuilder::increment_bridges ( const Pillar pillar)
inline
305 {
306 std::lock_guard<Mutex> lk(m_mutex);
307 assert(pillar.id >= 0 && size_t(pillar.id) < m_pillars.size());
308
309 if(pillar.id >= 0 && size_t(pillar.id) < m_pillars.size())
310 m_pillars[size_t(pillar.id)].bridges++;
311 }

References m_mutex, m_pillars, and pillar().

Referenced by Slic3r::sla::DefaultSupportTree::connect_to_nearpillar().

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

◆ increment_links()

void Slic3r::sla::SupportTreeBuilder::increment_links ( const Pillar pillar)
inline
314 {
315 std::lock_guard<Mutex> lk(m_mutex);
316 assert(pillar.id >= 0 && size_t(pillar.id) < m_pillars.size());
317
318 if(pillar.id >= 0 && size_t(pillar.id) < m_pillars.size())
319 m_pillars[size_t(pillar.id)].links++;
320 }

References m_mutex, m_pillars, and pillar().

+ Here is the call graph for this function:

◆ merge_and_cleanup()

const indexed_triangle_set & Slic3r::sla::SupportTreeBuilder::merge_and_cleanup ( )
152{
153 // in case the mesh is not generated, it should be...
154 auto &ret = merged_mesh();
155
156 // Doing clear() does not garantee to release the memory.
162
163 return ret;
164}
const indexed_triangle_set & merged_mesh(size_t steps=45) const
Definition SupportTreeBuilder.cpp:86
void clear_and_shrink(std::vector< T, Args... > &vec)
Definition libslic3r.h:134

References Slic3r::clear_and_shrink(), m_bridges, m_head_indices, m_heads, m_junctions, m_pillars, and merged_mesh().

+ Here is the call graph for this function:

◆ merged_mesh()

const indexed_triangle_set & Slic3r::sla::SupportTreeBuilder::merged_mesh ( size_t  steps = 45) const
87{
89
91
92 for (auto &head : m_heads) {
93 if (ctl().stopcondition()) break;
94 if (head.is_valid()) its_merge(merged, get_mesh(head, steps));
95 }
96
97 for (auto &pill : m_pillars) {
98 if (ctl().stopcondition()) break;
99 its_merge(merged, get_mesh(pill, steps));
100 }
101
102 for (auto &pedest : m_pedestals) {
103 if (ctl().stopcondition()) break;
104 its_merge(merged, get_mesh(pedest, steps));
105 }
106
107 for (auto &j : m_junctions) {
108 if (ctl().stopcondition()) break;
109 its_merge(merged, get_mesh(j, steps));
110 }
111
112 for (auto &bs : m_bridges) {
113 if (ctl().stopcondition()) break;
114 its_merge(merged, get_mesh(bs, steps));
115 }
116
117 for (auto &bs : m_crossbridges) {
118 if (ctl().stopcondition()) break;
119 its_merge(merged, get_mesh(bs, steps));
120 }
121
122 for (auto &bs : m_diffbridges) {
123 if (ctl().stopcondition()) break;
124 its_merge(merged, get_mesh(bs, steps));
125 }
126
127 for (auto &anch : m_anchors) {
128 if (ctl().stopcondition()) break;
129 its_merge(merged, get_mesh(anch, steps));
130 }
131
132 if (ctl().stopcondition()) {
133 // In case of failure we have to return an empty mesh
134 m_meshcache = {};
135 return m_meshcache;
136 }
137
138 m_meshcache = std::move(merged);
139
140 // The mesh will be passed by const-pointer to TriangleMeshSlicer,
141 // which will need this.
143
144 BoundingBoxf3 bb = bounding_box(m_meshcache);
145 m_model_height = bb.max(Z) - bb.min(Z);
146
147 m_meshcache_valid = true;
148 return m_meshcache;
149}
indexed_triangle_set & get_mesh(Interior &interior)
Definition Hollowing.cpp:50
int its_merge_vertices(indexed_triangle_set &its, bool shrink_to_fit)
Definition TriangleMesh.cpp:675
BoundingBoxf3 bounding_box(const TriangleMesh &m)
Definition TriangleMesh.hpp:340
@ Z
Definition libslic3r.h:100
void its_merge(indexed_triangle_set &its, indexed_triangle_set &&its_add)
Merge one triangle mesh to another Added triangle set will be consumed.
Definition TriangleMesh.cpp:1355
bool is_valid() const
Definition SupportTreeBuilder.hpp:94
Definition stl.h:157

References ctl(), Slic3r::sla::get_mesh(), head(), Slic3r::sla::Head::is_valid(), Slic3r::its_merge(), m_heads, m_meshcache, m_meshcache_valid, and Slic3r::sla::JobController::stopcondition.

Referenced by merge_and_cleanup(), Slic3r::sla::DefaultSupportTree::merge_result(), and retrieve_mesh().

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

◆ operator=() [1/2]

SupportTreeBuilder & Slic3r::sla::SupportTreeBuilder::operator= ( const SupportTreeBuilder o)
62{
63 m_heads = o.m_heads;
64 m_head_indices = o.m_head_indices;
65 m_pillars = o.m_pillars;
66 m_bridges = o.m_bridges;
67 m_crossbridges = o.m_crossbridges;
68 m_meshcache = o.m_meshcache;
69 m_meshcache_valid = o.m_meshcache_valid;
70 m_model_height = o.m_model_height;
71 return *this;
72}

References m_bridges, m_crossbridges, m_head_indices, m_heads, m_meshcache, m_meshcache_valid, m_model_height, and m_pillars.

◆ operator=() [2/2]

SupportTreeBuilder & Slic3r::sla::SupportTreeBuilder::operator= ( SupportTreeBuilder &&  o)
49{
50 m_heads = std::move(o.m_heads);
51 m_head_indices = std::move(o.m_head_indices);
52 m_pillars = std::move(o.m_pillars);
53 m_bridges = std::move(o.m_bridges);
54 m_crossbridges = std::move(o.m_crossbridges);
55 m_meshcache = std::move(o.m_meshcache);
56 m_meshcache_valid = o.m_meshcache_valid;
57 m_model_height = o.m_model_height;
58 return *this;
59}

References m_bridges, m_crossbridges, m_head_indices, m_heads, m_meshcache, m_meshcache_valid, m_model_height, and m_pillars.

◆ pillar() [1/2]

template<class T >
IntegerOnly< T, Pillar & > Slic3r::sla::SupportTreeBuilder::pillar ( id)
inline
409 {
410 std::lock_guard<Mutex> lk(m_mutex);
411 assert(id >= 0 && size_t(id) < m_pillars.size() &&
412 size_t(id) < std::numeric_limits<size_t>::max());
413
414 return m_pillars[size_t(id)];
415 }

References m_mutex, and m_pillars.

◆ pillar() [2/2]

template<class T >
IntegerOnly< T, const Pillar & > Slic3r::sla::SupportTreeBuilder::pillar ( id) const
inline
400 {
401 std::lock_guard<Mutex> lk(m_mutex);
402 assert(id >= 0 && size_t(id) < m_pillars.size() &&
403 size_t(id) < std::numeric_limits<size_t>::max());
404
405 return m_pillars[size_t(id)];
406 }

References m_mutex, and m_pillars.

Referenced by add_pillar(), add_pillar(), bridgecount(), Slic3r::sla::DefaultSupportTree::connect_to_ground(), Slic3r::sla::DefaultSupportTree::connect_to_model_body(), Slic3r::sla::DefaultSupportTree::connect_to_nearpillar(), Slic3r::sla::DefaultSupportTree::create_ground_pillar(), increment_bridges(), increment_links(), and Slic3r::sla::DefaultSupportTree::search_pillar_and_connect().

+ Here is the caller graph for this function:

◆ pillarcount()

size_t Slic3r::sla::SupportTreeBuilder::pillarcount ( ) const
inline
389 {
390 std::lock_guard<Mutex> lk(m_mutex);
391 return m_pillars.size();
392 }

References m_mutex, and m_pillars.

Referenced by Slic3r::sla::DefaultSupportTree::search_pillar_and_connect().

+ Here is the caller graph for this function:

◆ pillars()

const std::vector< Pillar > & Slic3r::sla::SupportTreeBuilder::pillars ( ) const
inline
394{ return m_pillars; }

References m_pillars.

◆ retrieve_full_mesh()

void Slic3r::sla::SupportTreeBuilder::retrieve_full_mesh ( indexed_triangle_set outmesh) const
inline
427 {
430 }
const indexed_triangle_set & retrieve_mesh(MeshType meshtype=MeshType::Support) const
Definition SupportTreeBuilder.cpp:166

References Slic3r::its_merge(), Slic3r::sla::Pad, retrieve_mesh(), and Slic3r::sla::Support.

+ Here is the call graph for this function:

◆ retrieve_mesh()

const indexed_triangle_set & Slic3r::sla::SupportTreeBuilder::retrieve_mesh ( MeshType  meshtype = MeshType::Support) const
167{
168 static const indexed_triangle_set EMPTY_MESH;
169
170 switch(meshtype) {
171 case MeshType::Support: return merged_mesh();
172 case MeshType::Pad: return EMPTY_MESH; //pad().tmesh;
173 }
174
175 return m_meshcache;
176}
const TriangleMesh EMPTY_MESH
Definition SLAPrint.cpp:1025

References m_meshcache, merged_mesh(), Slic3r::sla::Pad, and Slic3r::sla::Support.

Referenced by retrieve_full_mesh().

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

Member Data Documentation

◆ m_anchors

std::vector<Anchor> Slic3r::sla::SupportTreeBuilder::m_anchors
private

Referenced by add_anchor().

◆ m_bridges

std::vector<Bridge> Slic3r::sla::SupportTreeBuilder::m_bridges
private

◆ m_crossbridges

std::vector<Bridge> Slic3r::sla::SupportTreeBuilder::m_crossbridges
private

◆ m_ctl

JobController Slic3r::sla::SupportTreeBuilder::m_ctl
private

Referenced by ctl().

◆ m_diffbridges

std::vector<DiffBridge> Slic3r::sla::SupportTreeBuilder::m_diffbridges
private

Referenced by add_diffbridge().

◆ m_head_indices

std::vector<size_t> Slic3r::sla::SupportTreeBuilder::m_head_indices
private

◆ m_heads

std::vector<Head> Slic3r::sla::SupportTreeBuilder::m_heads
private

◆ m_junctions

std::vector<Junction> Slic3r::sla::SupportTreeBuilder::m_junctions
private

◆ m_meshcache

indexed_triangle_set Slic3r::sla::SupportTreeBuilder::m_meshcache
mutableprivate

◆ m_meshcache_valid

bool Slic3r::sla::SupportTreeBuilder::m_meshcache_valid = false
mutableprivate

◆ m_model_height

double Slic3r::sla::SupportTreeBuilder::m_model_height = 0
mutableprivate

Referenced by operator=(), and operator=().

◆ m_mutex

◆ m_pedestals

std::vector<Pedestal> Slic3r::sla::SupportTreeBuilder::m_pedestals
private

Referenced by add_pillar_base().

◆ m_pillars


The documentation for this class was generated from the following files: