mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
Fixes bug computing cross slope
This commit is contained in:
committed by
Thomas Krijnen
parent
9169e8ed24
commit
54dd0b5448
@@ -491,11 +491,10 @@ class curve_segment_evaluator {
|
|||||||
// tilt angle in the plane of the cross section
|
// tilt angle in the plane of the cross section
|
||||||
auto cant = Cant(u);
|
auto cant = Cant(u);
|
||||||
auto tilt_angle = start_angle + delta_angle * (cant - start_cant) / delta_cant;
|
auto tilt_angle = start_angle + delta_angle * (cant - start_cant) / delta_cant;
|
||||||
Eigen::Vector4d z(0.0, cos(tilt_angle), sin(tilt_angle), 0.0);
|
Eigen::Vector4d axis(0.0, cos(tilt_angle), sin(tilt_angle), 0.0);
|
||||||
|
|
||||||
// compute axis direction
|
// compute cross slope direction
|
||||||
Eigen::Vector4d y = z.cross3(ref_dir);
|
Eigen::Vector4d y = axis.cross3(ref_dir);
|
||||||
Eigen::Vector4d axis = ref_dir.cross3(y);
|
|
||||||
|
|
||||||
Eigen::Matrix4d m = Eigen::Matrix4d::Identity();
|
Eigen::Matrix4d m = Eigen::Matrix4d::Identity();
|
||||||
m.col(0) = ref_dir;
|
m.col(0) = ref_dir;
|
||||||
|
|||||||
Reference in New Issue
Block a user