OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::sla::Pad Struct Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SLA/SupportTreeBuilder.hpp>

Collaboration diagram for Slic3r::sla::Pad:

Public Member Functions

 Pad ()=default
 Pad (const indexed_triangle_set &support_mesh, const ExPolygons &model_contours, double ground_level, const PadConfig &pcfg, ThrowOnCancel thr)
bool empty () const

Public Attributes

indexed_triangle_set tmesh
PadConfig cfg
double zlevel = 0

Detailed Description

Constructor & Destructor Documentation

◆ Pad() [1/2]

Slic3r::sla::Pad::Pad ( )
default

◆ Pad() [2/2]

Slic3r::sla::Pad::Pad ( const indexed_triangle_set & support_mesh,
const ExPolygons & model_contours,
double ground_level,
const PadConfig & pcfg,
ThrowOnCancel thr )
49 : cfg(pcfg)
50 , zlevel(ground_level + pcfg.full_height() - pcfg.required_elevation())
51{
52 thr();
53
54 ExPolygons sup_contours;
55
56 float zstart = float(zlevel);
57 float zend = zstart + float(pcfg.full_height() + EPSILON);
58
59 pad_blueprint(support_mesh, sup_contours, grid(zstart, zend, 0.1f), thr);
60 create_pad(sup_contours, model_contours, tmesh, pcfg);
61
62 Vec3f offs{.0f, .0f, float(zlevel)};
63 for (auto &p : tmesh.vertices) p += offs;
64
66}
#define EPSILON
Definition ColorUtils.cpp:64
void pad_blueprint(const indexed_triangle_set &mesh, ExPolygons &output, const std::vector< float > &heights, ThrowOnCancel thrfn)
Calculate the polygon representing the silhouette.
Definition Pad.cpp:470
void create_pad(const ExPolygons &sup_blueprint, const ExPolygons &model_blueprint, indexed_triangle_set &out, const PadConfig &cfg, ThrowOnCancel thr)
Definition Pad.cpp:510
int its_merge_vertices(indexed_triangle_set &its, bool shrink_to_fit)
Definition TriangleMesh.cpp:690
std::vector< ExPolygon > ExPolygons
Definition ExPolygon.hpp:20
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:65
std::vector< ArithmeticOnly< T > > grid(const T &start, const T &stop, const T &stride)
A set of equidistant values starting from 'start' (inclusive), ending in the closest multiple of 'str...
Definition MTUtils.hpp:127
PadConfig cfg
Definition SupportTreeBuilder.hpp:198
indexed_triangle_set tmesh
Definition SupportTreeBuilder.hpp:197
double zlevel
Definition SupportTreeBuilder.hpp:199

References cfg, Slic3r::sla::create_pad(), EPSILON, Slic3r::sla::PadConfig::full_height(), Slic3r::grid(), Slic3r::its_merge_vertices(), Slic3r::sla::pad_blueprint(), tmesh, and zlevel.

Here is the call graph for this function:

Member Function Documentation

◆ empty()

bool Slic3r::sla::Pad::empty ( ) const
inline
209{ return tmesh.indices.size() == 0; }

References tmesh.

Member Data Documentation

◆ cfg

PadConfig Slic3r::sla::Pad::cfg

◆ tmesh

indexed_triangle_set Slic3r::sla::Pad::tmesh

◆ zlevel

double Slic3r::sla::Pad::zlevel = 0

Referenced by Pad().


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