mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-09 23:05:04 -06:00
1st installment of ModelInstance 3D scale components
This commit is contained in:
parent
e3d44b07fe
commit
0e1843a871
26 changed files with 558 additions and 9 deletions
|
@ -371,8 +371,13 @@ ModelMaterial::attributes()
|
|||
double rotation()
|
||||
%code%{ RETVAL = THIS->rotation; %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
#if ENABLE_MODELINSTANCE_3D_SCALE
|
||||
Vec3d* scaling_factor()
|
||||
%code%{ RETVAL = new Vec3d(THIS->get_scaling_factor(X), THIS->get_scaling_factor(Y), THIS->get_scaling_factor(Z)); %};
|
||||
#else
|
||||
double scaling_factor()
|
||||
%code%{ RETVAL = THIS->scaling_factor; %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_SCALE
|
||||
#if ENABLE_MODELINSTANCE_3D_OFFSET
|
||||
Vec2d* offset()
|
||||
%code%{ RETVAL = new Vec2d(THIS->get_offset(X), THIS->get_offset(Y)); %};
|
||||
|
@ -387,13 +392,20 @@ ModelMaterial::attributes()
|
|||
|
||||
void set_rotations(Vec3d *rotation)
|
||||
%code%{ THIS->set_rotation(*rotation); THIS->get_object()->invalidate_bounding_box(); %};
|
||||
|
||||
#else
|
||||
void set_rotation(double val)
|
||||
%code%{ THIS->rotation = val; THIS->get_object()->invalidate_bounding_box(); %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
#if ENABLE_MODELINSTANCE_3D_SCALE
|
||||
void set_scaling_factor(double val)
|
||||
%code%{ THIS->set_scaling_factor(X, val); THIS->set_scaling_factor(Y, val); THIS->set_scaling_factor(Z, val); THIS->get_object()->invalidate_bounding_box(); %};
|
||||
|
||||
void set_scaling_factors(Vec3d *scale)
|
||||
%code%{ THIS->set_scaling_factor(*scale); THIS->get_object()->invalidate_bounding_box(); %};
|
||||
#else
|
||||
void set_scaling_factor(double val)
|
||||
%code%{ THIS->scaling_factor = val; THIS->get_object()->invalidate_bounding_box(); %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_SCALE
|
||||
#if ENABLE_MODELINSTANCE_3D_OFFSET
|
||||
void set_offset(Vec2d *offset)
|
||||
%code%{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue