OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::sla::RotfinderBoilerplate< MAX_ITER > Struct Template Reference
Collaboration diagram for Slic3r::sla::RotfinderBoilerplate< MAX_ITER >:

Public Member Functions

 RotfinderBoilerplate (const ModelObject &mo, const RotOptimizeParams &p)
void statusfn ()
bool stopcond ()

Static Public Member Functions

static TriangleMesh get_mesh_to_rotate (const ModelObject &mo)

Public Attributes

int status = 0
TriangleMesh mesh
unsigned max_tries
const RotOptimizeParams & params

Static Public Attributes

static constexpr unsigned MAX_TRIES = MAX_ITER

Detailed Description

template<unsigned MAX_ITER>
struct Slic3r::sla::RotfinderBoilerplate< MAX_ITER >

Constructor & Destructor Documentation

◆ RotfinderBoilerplate()

template<unsigned MAX_ITER>
Slic3r::sla::RotfinderBoilerplate< MAX_ITER >::RotfinderBoilerplate ( const ModelObject & mo,
const RotOptimizeParams & p )
inline
331 , params{p}
332 , max_tries(p.accuracy() * MAX_TRIES)
333 {
334
335 }
Definition Rotfinder.cpp:302
static TriangleMesh get_mesh_to_rotate(const ModelObject &mo)
Definition Rotfinder.cpp:312
static constexpr unsigned MAX_TRIES
Definition Rotfinder.cpp:303
TriangleMesh mesh
Definition Rotfinder.cpp:306
const RotOptimizeParams & params
Definition Rotfinder.cpp:308
unsigned max_tries
Definition Rotfinder.cpp:307

References get_mesh_to_rotate(), MAX_TRIES, max_tries, mesh, and params.

Here is the call graph for this function:

Member Function Documentation

◆ get_mesh_to_rotate()

template<unsigned MAX_ITER>
TriangleMesh Slic3r::sla::RotfinderBoilerplate< MAX_ITER >::get_mesh_to_rotate ( const ModelObject & mo)
inlinestatic
313 {
314 TriangleMesh mesh = mo.raw_mesh();
315
316 ModelInstance *mi = mo.instances[0];
317 auto rotation = Vec3d::Zero();
318 auto offset = Vec3d::Zero();
321 mi->get_scaling_factor(),
322 mi->get_mirror());
323
324 mesh.transform(trafo_instance);
325
326 return mesh;
327 }
void assemble_transform(Transform3d &transform, const Vec3d &translation, const Vec3d &rotation, const Vec3d &scale, const Vec3d &mirror)
Definition Geometry.cpp:319

References Slic3r::Geometry::assemble_transform(), Slic3r::ModelInstance::get_mirror(), Slic3r::ModelInstance::get_scaling_factor(), Slic3r::ModelObject::instances, mesh, Slic3r::offset(), and Slic3r::ModelObject::raw_mesh().

Referenced by RotfinderBoilerplate().

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

◆ statusfn()

template<unsigned MAX_ITER>
void Slic3r::sla::RotfinderBoilerplate< MAX_ITER >::statusfn ( )
inline
337{ params.statuscb()(++status * 100.0 / max_tries); }
int status
Definition Rotfinder.cpp:305

References max_tries, params, and status.

Referenced by Slic3r::sla::find_best_misalignment_rotation(), Slic3r::sla::find_least_supports_rotation(), and Slic3r::sla::find_min_z_height_rotation().

Here is the caller graph for this function:

◆ stopcond()

template<unsigned MAX_ITER>
bool Slic3r::sla::RotfinderBoilerplate< MAX_ITER >::stopcond ( )
inline
338{ return ! params.statuscb()(-1); }

References params.

Member Data Documentation

◆ MAX_TRIES

template<unsigned MAX_ITER>
unsigned Slic3r::sla::RotfinderBoilerplate< MAX_ITER >::MAX_TRIES = MAX_ITER
staticconstexpr

Referenced by RotfinderBoilerplate().

◆ max_tries

◆ mesh

◆ params

template<unsigned MAX_ITER>
const RotOptimizeParams& Slic3r::sla::RotfinderBoilerplate< MAX_ITER >::params

◆ status

template<unsigned MAX_ITER>
int Slic3r::sla::RotfinderBoilerplate< MAX_ITER >::status = 0

Referenced by statusfn().


The documentation for this struct was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SLA/Rotfinder.cpp