make generic transformation public

This commit is contained in:
Michael Kirsch 2019-07-09 20:49:58 +02:00 committed by Joseph Lenox
parent 5bce2597e7
commit 0b1f831f65
2 changed files with 5 additions and 3 deletions

View File

@ -411,6 +411,9 @@ class ModelObject
/// Get the accumulated collection of transformations since its reset
TransformationMatrix get_undo_trafo() const;
/// Apply transformation to all volumes
void apply_transformation(const TransformationMatrix & trafo);
/// Transform the current ModelObject by a certain ModelInstance attributes.
/// Inverse transformation is applied to all the ModelInstances, so that the final size/position/rotation of the transformed objects doesn't change.
/// \param instance ModelInstance the instance used to transform the current ModelObject
@ -459,9 +462,6 @@ class ModelObject
/// \param copy_volumes bool whether to also copy its volumes or not, by default = true
ModelObject(Model *model, const ModelObject &other, bool copy_volumes = true);
/// Apply transformation to all volumes
void apply_transformation(const TransformationMatrix & trafo);
/// Trafo to collect the transformation applied to all volumes over a series of manipulations
TransformationMatrix trafo_undo_stack;

View File

@ -232,6 +232,8 @@ ModelMaterial::attributes()
void rotate_vec_to_vec(Pointf3* origin, Pointf3* target)
%code{% THIS->rotate(*origin, *target); %};
void mirror(Axis axis);
void apply_transformation(TransformationMatrix* trafo)
%code{% THIS->apply_transformation(*trafo); %};
void reset_undo_trafo();
Clone<TransformationMatrix> get_undo_trafo()