OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::anonymous_namespace{GLGizmoAlignment.cpp} Namespace Reference

Functions

Transform3d world_to_frame (const Matrix3d &basis)
BoundingBoxf3 instance_box_in_frame (const ModelObject &object, const ModelInstance &instance, const Transform3d &to_frame, bool convex_hull)
BoundingBoxf3 volume_box_in_frame (const GLVolume &volume, const Matrix3d &basis)

Function Documentation

◆ instance_box_in_frame()

BoundingBoxf3 Slic3r::GUI::anonymous_namespace{GLGizmoAlignment.cpp}::instance_box_in_frame ( const ModelObject & object,
const ModelInstance & instance,
const Transform3d & to_frame,
bool convex_hull )
34{
35 BoundingBoxf3 box;
36 const Transform3d inst_matrix = to_frame * instance.get_transformation().get_matrix();
37 for (const ModelVolume *v : object.volumes) {
38 if (!v->is_model_part())
39 continue;
40 const Transform3d matrix = inst_matrix * v->get_matrix();
41 box.merge(convex_hull ? v->get_convex_hull().transformed_bounding_box(matrix) : v->mesh().transformed_bounding_box(matrix));
42 }
43 return box;
44}
void merge(const PointType &point)
Definition BoundingBox.cpp:139
Definition BoundingBox.hpp:265
const Transform3d & get_matrix() const
Definition Geometry.hpp:477
const Geometry::Transformation & get_transformation() const
Definition Model.hpp:1447
Definition Model.hpp:832
Polygon convex_hull(Points pts)
Definition ConvexHull.cpp:21
Eigen::Transform< double, 3, Eigen::Affine, Eigen::DontAlign > Transform3d
Definition Point.hpp:96

References Slic3r::Geometry::convex_hull(), Slic3r::Geometry::Transformation::get_matrix(), Slic3r::ModelInstance::get_transformation(), instance_box_in_frame(), and Slic3r::BoundingBox3Base< PointType >::merge().

Referenced by instance_box_in_frame().

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

◆ volume_box_in_frame()

BoundingBoxf3 Slic3r::GUI::anonymous_namespace{GLGizmoAlignment.cpp}::volume_box_in_frame ( const GLVolume & volume,
const Matrix3d & basis )
47{
49}
Transform3d world_matrix() const
Definition 3DScene.cpp:447
BoundingBoxf3 transformed_convex_hull_bounding_box(const Transform3d &trafo) const
Definition 3DScene.cpp:486
Transform3d world_to_frame(const Matrix3d &basis)
Definition GLGizmoAlignment.cpp:25

References Slic3r::GLVolume::transformed_convex_hull_bounding_box(), volume_box_in_frame(), Slic3r::GLVolume::world_matrix(), and world_to_frame().

Referenced by volume_box_in_frame().

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

◆ world_to_frame()

Transform3d Slic3r::GUI::anonymous_namespace{GLGizmoAlignment.cpp}::world_to_frame ( const Matrix3d & basis)
26{
27 Transform3d trafo = Transform3d::Identity();
28 trafo.linear() = basis.transpose();
29 return trafo;
30}

References world_to_frame().

Referenced by volume_box_in_frame(), and world_to_frame().

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