2 Replies Latest reply on Apr 10, 2014 11:14 AM by Mika Ihatsu

    How to create Coordinate system using Rotational matrix and Translation vector

    Mika Ihatsu

      Hi,

      I try to figure out how to create coordinate system using rotational matrix and transitional vector. I have been reading these two samples:

      http://help.solidworks.com/2013/English/api/sldworksapi/Create_Coordinate_System_Feature_Example_VB.htm

      http://help.solidworks.com/2013/English/api/sldworksapi/add_components_example_vb.htm

      In second one is introduced IMathTransform and I would like to make coordinate system using these variables

      ‘Add a rotational diagonal unit matrix (zero rotation) to the transformation matrix
      compXforms(0) = 1#
      compXforms(1) = 0#
      compXforms(2) = 0#
      compXforms(3) = 0#
      compXforms(4) = 1#
      compXforms(5) = 0#
      compXforms(6) = 0#
      compXforms(7) = 0#
      compXforms(8) = 1#

      ' Add a translation vector to the transformation matrix
      compXforms(9) = 0#
      compXforms(10) = 0#
      compXforms(11) = 0#

      Is it even possible to make coordinate system using these or do I need to make first point and lines and then use Set swFeat = swFeatMgr.CreateCoordinateSystem() ?


      Thank you

      Mike