Skip to content

Commit

Permalink
Fix sign error in interpreting openscad rotate_extrude
Browse files Browse the repository at this point in the history
  • Loading branch information
arnholm committed Dec 24, 2020
1 parent bd822bb commit 6d024f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions csg_parser/csg_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,12 +648,12 @@ cf_xmlNode csg_node::to_xcsg(cf_xmlNode& parent)
auto iangle = m_par.find("angle");
xml_this.add_property("angle",iangle->second->to_double()*pi/180);

// special +90 deg rotate around x applied here since
// openscad's rotate_extrude implies +90 deg rotate around x after extrusion
// special -90 deg rotate around x applied here since
// openscad's rotate_extrude implies -90 deg rotate around x after extrusion
csg_matrix<4,4> rotx;
rotx(1,1)=0;
rotx(1,2)=-1;
rotx(2,1)=1;
rotx(1,2)=1;
rotx(2,1)=-1;
rotx(2,2)=0;
if(m_has_matrix) m_matrix = csg_matrix_mult<4,4,4>(rotx,m_matrix);
else m_matrix = rotx;
Expand Down

0 comments on commit 6d024f8

Please sign in to comment.