OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::TreeSupport3D::InterfacePlacer Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Support/TreeSupportCommon.hpp>

Inheritance diagram for Slic3r::TreeSupport3D::InterfacePlacer:
Collaboration diagram for Slic3r::TreeSupport3D::InterfacePlacer:

Public Member Functions

 InterfacePlacer (const SlicingParameters &slicing_parameters, const SupportParameters &support_parameters, const TreeSupportSettings &config, SupportGeneratorLayerStorage &layer_storage, SupportGeneratorLayersPtr &top_contacts, SupportGeneratorLayersPtr &top_interfaces, SupportGeneratorLayersPtr &top_base_interfaces)
 InterfacePlacer (const InterfacePlacer &rhs)
SupportGeneratorLayersPtr & top_contacts_mutable ()
void add_roofs (std::vector< Polygons > &&new_roofs, const size_t insert_layer_idx)
void add_roof (Polygons &&new_roof, const size_t insert_layer_idx, const size_t dtt_tip)
void add_roof_build_plate (Polygons &&overhang_areas, size_t dtt_roof)
void add_roof_unguarded (Polygons &&new_roofs, const size_t insert_layer_idx, const size_t dtt_roof)

Public Attributes

const SlicingParameters & slicing_parameters
const SupportParameters & support_parameters
const TreeSupportSettings & config

Private Attributes

SupportGeneratorLayerStorage & layer_storage
SupportGeneratorLayersPtr & top_contacts
SupportGeneratorLayersPtr & top_interfaces
SupportGeneratorLayersPtr & top_base_interfaces
std::mutex m_mutex_layer_storage

Detailed Description

Constructor & Destructor Documentation

◆ InterfacePlacer() [1/2]

Slic3r::TreeSupport3D::InterfacePlacer::InterfacePlacer ( const SlicingParameters & slicing_parameters,
const SupportParameters & support_parameters,
const TreeSupportSettings & config,
SupportGeneratorLayerStorage & layer_storage,
SupportGeneratorLayersPtr & top_contacts,
SupportGeneratorLayersPtr & top_interfaces,
SupportGeneratorLayersPtr & top_base_interfaces )
inline
724 :
727 {}
const SlicingParameters & slicing_parameters
Definition TreeSupportCommon.hpp:733
SupportGeneratorLayersPtr & top_interfaces
Definition TreeSupportCommon.hpp:788
const SupportParameters & support_parameters
Definition TreeSupportCommon.hpp:734
SupportGeneratorLayersPtr & top_contacts
Definition TreeSupportCommon.hpp:787
SupportGeneratorLayerStorage & layer_storage
Definition TreeSupportCommon.hpp:786
const TreeSupportSettings & config
Definition TreeSupportCommon.hpp:735
SupportGeneratorLayersPtr & top_base_interfaces
Definition TreeSupportCommon.hpp:789

References config, layer_storage, slicing_parameters, support_parameters, top_base_interfaces, top_contacts, and top_interfaces.

Referenced by InterfacePlacer(), and Slic3r::TreeSupport3D::RichInterfacePlacer::RichInterfacePlacer().

Here is the caller graph for this function:

◆ InterfacePlacer() [2/2]

Slic3r::TreeSupport3D::InterfacePlacer::InterfacePlacer ( const InterfacePlacer & rhs)
inline
728 :
729 slicing_parameters(rhs.slicing_parameters), support_parameters(rhs.support_parameters), config(rhs.config),
730 layer_storage(rhs.layer_storage), top_contacts(rhs.top_contacts), top_interfaces(rhs.top_interfaces), top_base_interfaces(rhs.top_base_interfaces)
731 {}

References InterfacePlacer(), config, layer_storage, slicing_parameters, support_parameters, top_base_interfaces, top_contacts, and top_interfaces.

Here is the call graph for this function:

Member Function Documentation

◆ add_roof()

void Slic3r::TreeSupport3D::InterfacePlacer::add_roof ( Polygons && new_roof,
const size_t insert_layer_idx,
const size_t dtt_tip )
inline
751 {
752 std::lock_guard<std::mutex> lock(m_mutex_layer_storage);
753 add_roof_unguarded(std::move(new_roof), insert_layer_idx, dtt_tip);
754 }
void add_roof_unguarded(Polygons &&new_roofs, const size_t insert_layer_idx, const size_t dtt_roof)
Definition TreeSupportCommon.hpp:763
std::mutex m_mutex_layer_storage
Definition TreeSupportCommon.hpp:792
@ lock
Definition GLGizmoEmboss.cpp:209

References add_roof_unguarded(), and m_mutex_layer_storage.

Referenced by Slic3r::TreeSupport3D::RichInterfacePlacer::add_points_along_lines(), and Slic3r::TreeSupport3D::recover_pending_branch_roofs().

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

◆ add_roof_build_plate()

void Slic3r::TreeSupport3D::InterfacePlacer::add_roof_build_plate ( Polygons && overhang_areas,
size_t dtt_roof )
inline
758 {
759 std::lock_guard<std::mutex> lock(m_mutex_layer_storage);
760 this->add_roof_unguarded(std::move(overhang_areas), 0, std::min(dtt_roof, this->support_parameters.num_top_interface_layers));
761 }

References add_roof_unguarded(), m_mutex_layer_storage, and Slic3r::SupportParameters::num_top_interface_layers.

Referenced by Slic3r::TreeSupport3D::sample_overhang_area().

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

◆ add_roof_unguarded()

void Slic3r::TreeSupport3D::InterfacePlacer::add_roof_unguarded ( Polygons && new_roofs,
const size_t insert_layer_idx,
const size_t dtt_roof )
inline
764 {
765 assert(support_parameters.has_top_contacts);
766 assert(dtt_roof <= support_parameters.num_top_interface_layers);
767 // ORCA: Reserve one top interface layer but only when top base-interface layers exist.
768 // This prevents all interface layers from being classified as base-interface layers
769 // and preserves correct top contact and interface behavior.
770 size_t interface_threshold = support_parameters.num_top_interface_layers_only();
771 if (interface_threshold > 0 && support_parameters.num_top_base_interface_layers > 0)
772 --interface_threshold;
774 dtt_roof == 0 ? this->top_contacts :
775 dtt_roof <= interface_threshold ? this->top_interfaces : this->top_base_interfaces;
776 SupportGeneratorLayer*& l = layers[insert_layer_idx];
777 if (l == nullptr)
779 slicing_parameters, config, insert_layer_idx);
780 // will be unioned in finalize_interface_and_support_areas()
781 append(l->polygons, std::move(new_roofs));
782 }
SupportGeneratorLayer & layer_allocate_unguarded(SupportGeneratorLayerStorage &layer_storage, SupporLayerType layer_type, const SlicingParameters &slicing_params, const TreeSupportSettings &config, size_t layer_idx)
Definition TreeSupportCommon.hpp:691
@ TopInterface
Definition SupportLayer.hpp:34
@ TopContact
Definition SupportLayer.hpp:36
std::vector< SupportGeneratorLayer * > SupportGeneratorLayersPtr
Definition SupportLayer.hpp:146
void append(std::vector< T, Alloc > &dest, const std::vector< T, Alloc2 > &src)
Definition libslic3r.h:157

References Slic3r::append(), config, Slic3r::TreeSupport3D::layer_allocate_unguarded(), layer_storage, Slic3r::SupportGeneratorLayer::polygons, slicing_parameters, support_parameters, top_base_interfaces, top_contacts, top_interfaces, Slic3r::TopContact, and Slic3r::TopInterface.

Referenced by add_roof(), add_roof_build_plate(), add_roofs(), and Slic3r::TreeSupport3D::generate_raft_contact().

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

◆ add_roofs()

void Slic3r::TreeSupport3D::InterfacePlacer::add_roofs ( std::vector< Polygons > && new_roofs,
const size_t insert_layer_idx )
inline
741 {
742 if (! new_roofs.empty()) {
743 std::lock_guard<std::mutex> lock(m_mutex_layer_storage);
744 for (size_t idx = 0; idx < new_roofs.size(); ++ idx)
745 if (! new_roofs[idx].empty())
746 add_roof_unguarded(std::move(new_roofs[idx]), insert_layer_idx - idx, idx);
747 }
748 }
bool empty(const BoundingBoxBase< PointType, PointsType > &bb)
Definition BoundingBox.hpp:273

References add_roof_unguarded(), Slic3r::empty(), and m_mutex_layer_storage.

Referenced by Slic3r::TreeSupport3D::sample_overhang_area().

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

◆ top_contacts_mutable()

SupportGeneratorLayersPtr & Slic3r::TreeSupport3D::InterfacePlacer::top_contacts_mutable ( )
inline
736{ return this->top_contacts; }

References top_contacts.

Member Data Documentation

◆ config

◆ layer_storage

SupportGeneratorLayerStorage& Slic3r::TreeSupport3D::InterfacePlacer::layer_storage
private

◆ m_mutex_layer_storage

std::mutex Slic3r::TreeSupport3D::InterfacePlacer::m_mutex_layer_storage
private

◆ slicing_parameters

const SlicingParameters& Slic3r::TreeSupport3D::InterfacePlacer::slicing_parameters

◆ support_parameters

◆ top_base_interfaces

SupportGeneratorLayersPtr& Slic3r::TreeSupport3D::InterfacePlacer::top_base_interfaces
private

◆ top_contacts

SupportGeneratorLayersPtr& Slic3r::TreeSupport3D::InterfacePlacer::top_contacts
private

◆ top_interfaces

SupportGeneratorLayersPtr& Slic3r::TreeSupport3D::InterfacePlacer::top_interfaces
private

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