Using Z axis of mate connector error once transformed

Lee_Hesketh
Lee_Hesketh Member, Developers Posts: 148 ✭✭✭
Hello, I am working on a feature that imports a part with a mate connector. I am then rotating that part using the mate connectors Z axis. I also have a boolean which if true, it will rotate about the mate connectors X axis first. The error occurs when I then want to rotate about the mate connectors Z axis. I would think the mate connectors local Z axis would now be perpendicular to the global Z axis. But it is parallel i.e. the part has rotated, but the mate connector hasn't. What is peculiar is it looks like it has in the part studio, but debugging reveals it is (0,0,-1), not (0,1,0). Why is this?

There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!

Comments

  • NeilCooke
    NeilCooke Moderator, Onshape Employees Posts: 6,126 image
    You also need to transform the mate connector.
    Senior Director, Technical Services, EMEA
  • Lee_Hesketh
    Lee_Hesketh Member, Developers Posts: 148 ✭✭✭
    The problem is that I am using that mate connector to call line() for use as the axis. I have called evMateConnector(). If I use the evaluation in opTransform(), it throws an error. By the picture I posted, hasn't it already been transformed?
    Document:https://cad.onshape.com/documents/6ca70d535fb4f9822b343214/w/028f50d7a2a757243c7bcc3d/e/8fd9a3be9e398d391a60eda5
    There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!
  • Lee_Hesketh
    Lee_Hesketh Member, Developers Posts: 148 ✭✭✭
    I fixed it, I had to call evMateConnector() after the initial transform.
    There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!