#include <Model.hpp>
A single instance of a ModelObject. Knows the affine transformation of an object.
◆ get_object()
ModelObject* Slic3r::ModelInstance::get_object |
( |
| ) |
const |
|
inline |
◆ transform_bounding_box()
Transform an external bounding box.
- Parameters
-
bbox | BoundingBoxf3 the bounding box to be transformed |
dont_translate | bool whether to translate the bounding box or not |
- Returns
- BoundingBoxf3 the bounding box after transformation
◆ transform_mesh()
void Slic3r::ModelInstance::transform_mesh |
( |
TriangleMesh * |
mesh, |
|
|
bool |
dont_translate = false |
|
) |
| const |
Transform an external TriangleMesh object
- Parameters
-
mesh | TriangleMesh* pointer to the the mesh |
dont_translate | bool whether to translate the mesh or not |
◆ transform_mesh_bounding_box()
BoundingBoxf3 Slic3r::ModelInstance::transform_mesh_bounding_box |
( |
const TriangleMesh * |
mesh, |
|
|
bool |
dont_translate = false |
|
) |
| const |
Calculate a bounding box of a transformed mesh. To be called on an external mesh.
- Parameters
-
mesh | TriangleMesh* pointer to the the mesh |
dont_translate | bool whether to translate the bounding box or not |
- Returns
- BoundingBoxf3 the bounding box after transformation
◆ transform_polygon()
void Slic3r::ModelInstance::transform_polygon |
( |
Polygon * |
polygon | ) |
const |
Rotate or scale an external polygon. It does not translate the polygon.
- Parameters
-
polygon | Polygon* a pointer to the Polygon |
◆ ModelObject
◆ offset
Pointf Slic3r::ModelInstance::offset |
offset in unscaled coordinates.
◆ rotation
double Slic3r::ModelInstance::rotation |
Rotation around the Z axis, in radians around mesh center point.
◆ scaling_factor
double Slic3r::ModelInstance::scaling_factor |
◆ scaling_vector
Pointf3 Slic3r::ModelInstance::scaling_vector |
scaling vector. Specific to 3MF format.
◆ x_rotation
double Slic3r::ModelInstance::x_rotation |
Rotation around the X axis, in radians around mesh center point. Specific to 3MF format.
◆ y_rotation
double Slic3r::ModelInstance::y_rotation |
Rotation around the Y axis, in radians around mesh center point. Specific to 3MF format.
◆ z_translation
double Slic3r::ModelInstance::z_translation |
translation in z axis. Specific to 3MF format. It's not used anywhere in Slic3r except at writing/reading 3mf.
The documentation for this class was generated from the following files: