mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-20 09:22:13 +00:00
Avoid using auto as type of Eigen expressions. (#8577)
According to https://eigen.tuxfamily.org/dox/TopicPitfalls.html one should just avoid using `auto` as the type of an Eigen expression. This PR fixes most of them I could found in the project. There might be cases that I missed, and I might update those later if I noticed. This should prevent issues like #7741 and hopefully fix some mysterious crashes happened inside Eigen calls.
This commit is contained in:
@@ -3296,8 +3296,8 @@ void TreeSupport::generate_contact_points()
|
||||
int nSize = points.size();
|
||||
for (int i = 0; i < nSize; i++) {
|
||||
auto pt = points[i];
|
||||
auto v1 = (pt - points[(i - 1 + nSize) % nSize]).cast<double>().normalized();
|
||||
auto v2 = (pt - points[(i + 1) % nSize]).cast<double>().normalized();
|
||||
Vec2d v1 = (pt - points[(i - 1 + nSize) % nSize]).cast<double>().normalized();
|
||||
Vec2d v2 = (pt - points[(i + 1) % nSize]).cast<double>().normalized();
|
||||
if (v1.dot(v2) > -0.7) { // angle smaller than 135 degrees
|
||||
SupportNode *contact_node = insert_point(pt, overhang, radius, false, add_interface);
|
||||
if (contact_node) {
|
||||
|
||||
Reference in New Issue
Block a user