mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-27 18:51:11 -06:00
Removed the x(), y(), z() Point/Pointf/Point3/Pointf3 accessors.
This commit is contained in:
parent
1ba64da3fe
commit
65011f9382
60 changed files with 1083 additions and 1111 deletions
|
|
@ -1352,8 +1352,8 @@ namespace Slic3r {
|
|||
double angle_z = (rotation.axis() == Eigen::Vector3d::UnitZ()) ? rotation.angle() : -rotation.angle();
|
||||
#endif
|
||||
|
||||
instance.offset.x() = offset_x;
|
||||
instance.offset.y() = offset_y;
|
||||
instance.offset(0) = offset_x;
|
||||
instance.offset(1) = offset_y;
|
||||
instance.scaling_factor = sx;
|
||||
instance.rotation = angle_z;
|
||||
}
|
||||
|
|
@ -1801,7 +1801,7 @@ namespace Slic3r {
|
|||
}
|
||||
|
||||
Eigen::Affine3f transform;
|
||||
transform = Eigen::Translation3f((float)instance->offset.x(), (float)instance->offset.y(), 0.0f) * Eigen::AngleAxisf((float)instance->rotation, Eigen::Vector3f::UnitZ()) * Eigen::Scaling((float)instance->scaling_factor);
|
||||
transform = Eigen::Translation3f((float)instance->offset(0), (float)instance->offset(1), 0.0f) * Eigen::AngleAxisf((float)instance->rotation, Eigen::Vector3f::UnitZ()) * Eigen::Scaling((float)instance->scaling_factor);
|
||||
build_items.emplace_back(instance_id, transform.matrix());
|
||||
|
||||
stream << " </" << OBJECT_TAG << ">\n";
|
||||
|
|
|
|||
|
|
@ -496,8 +496,8 @@ void AMFParserContext::endDocument()
|
|||
for (const Instance &instance : object.second.instances)
|
||||
if (instance.deltax_set && instance.deltay_set) {
|
||||
ModelInstance *mi = m_model.objects[object.second.idx]->add_instance();
|
||||
mi->offset.x() = instance.deltax;
|
||||
mi->offset.y() = instance.deltay;
|
||||
mi->offset(0) = instance.deltax;
|
||||
mi->offset(1) = instance.deltay;
|
||||
mi->rotation = instance.rz_set ? instance.rz : 0.f;
|
||||
mi->scaling_factor = instance.scale_set ? instance.scale : 1.f;
|
||||
}
|
||||
|
|
@ -829,8 +829,8 @@ bool store_amf(const char *path, Model *model, Print* print, bool export_print_c
|
|||
" <scale>%lf</scale>\n"
|
||||
" </instance>\n",
|
||||
object_id,
|
||||
instance->offset.x(),
|
||||
instance->offset.y(),
|
||||
instance->offset(0),
|
||||
instance->offset(1),
|
||||
instance->rotation,
|
||||
instance->scaling_factor);
|
||||
//FIXME missing instance->scaling_factor
|
||||
|
|
|
|||
|
|
@ -207,8 +207,8 @@ bool load_prus(const char *path, Model *model)
|
|||
for (size_t c = 0; c < 3; ++ c)
|
||||
trafo[r][c] += mat_trafo(r, c);
|
||||
}
|
||||
instance_offset.x() = position[0] - zero[0];
|
||||
instance_offset.y() = position[1] - zero[1];
|
||||
instance_offset(0) = position[0] - zero[0];
|
||||
instance_offset(1) = position[1] - zero[1];
|
||||
trafo[2][3] = position[2] / instance_scaling_factor;
|
||||
trafo_set = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue