Skip to content

Commit

Permalink
Apparent fix to cant twist angle problem
Browse files Browse the repository at this point in the history
  • Loading branch information
RickBrice committed Apr 15, 2024
1 parent 969b738 commit 4ab9f2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ifcgeom/mapping/IfcCurveSegment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ class cant_adjuster : public GEOMETRY_ADJUSTER {
double cant = parent_curve_point.col(3)(1);
auto tilt = -atan2(fabs(h), cant);

// Create a transformation matrix
// Create a transformation matrix for twist about the RefDirection (x-axis)
Eigen::Matrix4d m = Eigen::Matrix4d::Identity();
m.col(2)(1) = cos(tilt);
m.col(2)(2) = sin(tilt);
m.col(2)(2) = cos(tilt);
m.col(2)(3) = sin(tilt);

// apply cant tilt to the parent curve point
Eigen::Matrix4d p = m * parent_curve_point;
Expand Down

0 comments on commit 4ab9f2c

Please sign in to comment.