fix syntax of changed functions

This commit is contained in:
Michael Kirsch 2019-06-26 19:44:41 +02:00 committed by Joseph Lenox
parent 4c1e44702b
commit c6b70b99d2
2 changed files with 5 additions and 13 deletions

View File

@ -943,11 +943,11 @@ PrintObject::_slice_region(size_t region_id, std::vector<float> z, bool modifier
TransformationMatrix trafo = object.instances[0]->get_trafo_matrix(true); TransformationMatrix trafo = object.instances[0]->get_trafo_matrix(true);
// align mesh to Z = 0 (it should be already aligned actually) and apply XY shift // align mesh to Z = 0 (it should be already aligned actually) and apply XY shift
trafo.translate( trafo.applyLeft(TransformationMatrix::mat_translation(
-unscale(this->_copies_shift.x), -unscale(this->_copies_shift.x),
-unscale(this->_copies_shift.y), -unscale(this->_copies_shift.y),
-object.bounding_box().min.z -object.bounding_box().min.z
); ));
for (const auto& i : region_volumes) { for (const auto& i : region_volumes) {
@ -955,7 +955,7 @@ PrintObject::_slice_region(size_t region_id, std::vector<float> z, bool modifier
if (volume.modifier != modifier) continue; if (volume.modifier != modifier) continue;
mesh.merge(volume.get_transformed_mesh(&trafo)); mesh.merge(volume.get_transformed_mesh(trafo));
} }
if (mesh.facets_count() == 0) return layers; if (mesh.facets_count() == 0) return layers;

View File

@ -284,17 +284,12 @@ ModelMaterial::attributes()
Clone<BoundingBoxf3> bounding_box() Clone<BoundingBoxf3> bounding_box()
%code%{ %code%{
try { try {
RETVAL = THIS->get_transformed_bounding_box(NULL); RETVAL = THIS->bounding_box();
} catch (std::exception& e) { } catch (std::exception& e) {
croak("%s", e.what()); croak("%s", e.what());
} }
%}; %};
void translate(double x, double y, double z);
void scale_xyz(Pointf3* versor)
%code{% THIS->scale(*versor); %};
void rotate(double angle, Axis axis);
Ref<DynamicPrintConfig> config() Ref<DynamicPrintConfig> config()
%code%{ RETVAL = &THIS->config; %}; %code%{ RETVAL = &THIS->config; %};
@ -304,7 +299,7 @@ ModelMaterial::attributes()
Clone<TriangleMesh> get_transformed_mesh(ModelInstance * instance) Clone<TriangleMesh> get_transformed_mesh(ModelInstance * instance)
%code%{ %code%{
TransformationMatrix trafo = instance->get_trafo_matrix(false); TransformationMatrix trafo = instance->get_trafo_matrix(false);
RETVAL = THIS->get_transformed_mesh(&trafo); RETVAL = THIS->get_transformed_mesh(trafo);
%}; %};
bool modifier() bool modifier()
@ -342,9 +337,6 @@ ModelMaterial::attributes()
%code%{ THIS->scaling_factor = val; %}; %code%{ THIS->scaling_factor = val; %};
void set_offset(Pointf *offset) void set_offset(Pointf *offset)
%code%{ THIS->offset = *offset; %}; %code%{ THIS->offset = *offset; %};
void set_local_trafo_matrix(bool dont_translate);
void transform_mesh(TriangleMesh* mesh, bool dont_translate) const; void transform_mesh(TriangleMesh* mesh, bool dont_translate) const;
void transform_polygon(Polygon* polygon) const; void transform_polygon(Polygon* polygon) const;