is3d separately

This commit is contained in:
dryuri92 2019-05-30 22:38:54 +03:00 committed by GitHub
parent 40b5c23aab
commit feac9c83a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -933,10 +933,6 @@ const
// y_l = y_g - (center + pitch_x*index_x + pitch_y*sin(30)*index_y)
r.y -= (center_.y + (i_xyz[1] - n_rings_ + 1) * pitch_[0]
+ (i_xyz[0] - n_rings_ + 1) * pitch_[0] / 2.0);
if (is_3d_) {
r.z -= center_.z - (0.5 * n_axial_ - i_xyz[2] - 0.5) * pitch_[1];
}
} else {
// x_l = x_g - (center + pitch_x*index_a + pitch_y*sin(30)*index_y)
r.x -= (center_.x + (i_xyz[0] - n_rings_ + 1) * pitch_[0]
@ -944,10 +940,11 @@ const
// y_l = y_g - (center + pitch_y*cos(30)*index_y)
r.y -= center_.y
+ std::sqrt(3.0)/2.0 * (i_xyz[1] - n_rings_ + 1) * pitch_[0];
if (is_3d_) {
}
if (is_3d_) {
r.z -= center_.z - (0.5 * n_axial_ - i_xyz[2] - 0.5) * pitch_[1];
}
}
return r;
}