Example #1
0
    def test_applyTorsion02(self):
        """applyTorsion     -- return correct coords torsion=1, angle=90."""
        ko = Kinematics(self.known_points, self.torTree, tolist=0)
        result = ko.applyTorsion(ko.torsions[1], 90.)[:, :3]

        self.known_points[0] = [1., -1., 1.]
        self.known_points[2] = [1., 0., 2.]
        self.assertArrayEqual(self.known_points, result)
    def test_applyTorsion02(self):
        """applyTorsion     -- return correct coords torsion=1, angle=90."""
        ko = Kinematics(self.known_points, self.torTree, tolist=0)
        result = ko.applyTorsion(ko.torsions[1], 90.)[:,:3]

        self.known_points[0] = [1., -1., 1.]
        self.known_points[2] = [1., 0., 2.]
        self.assertArrayEqual(self.known_points, result)
Example #3
0
    def test_applyTorsion02(self):
        """applyTorsion     -- apply torsions in any order"""
        ko1 = Kinematics(self.known_points, self.torTree, tolist=0)
        ko1.applyTorsion(ko1.torsions[0], 90.)
        result1 = ko1.applyTorsion(ko1.torsions[1], -90.)

        ko2 = Kinematics(self.known_points, self.torTree, tolist=0)
        ko2.applyTorsion(ko2.torsions[1], -90.)
        result2 = ko2.applyTorsion(ko2.torsions[0], 90.)
        self.assertArrayEqual(result1, result2)
    def test_applyTorsion02(self):
        """applyTorsion     -- apply torsions in any order"""
        ko1 = Kinematics(self.known_points, self.torTree, tolist=0)
        ko1.applyTorsion(ko1.torsions[0], 90.)
        result1 = ko1.applyTorsion(ko1.torsions[1], -90.)

        ko2 = Kinematics(self.known_points, self.torTree, tolist=0)
        ko2.applyTorsion(ko2.torsions[1], -90.)
        result2 = ko2.applyTorsion(ko2.torsions[0], 90.)
        self.assertArrayEqual(result1, result2)
Example #5
0
 def test_applyTorsion01(self):
     """applyTorsion     -- return correct coords torsion=0, angle=0."""
     ko = Kinematics(self.known_points, self.torTree, tolist=1)
     self.assertEqual(self.known_points,
                      ko.applyTorsion(ko.torsions[0], 0.))
 def test_applyTorsion01(self):
     """applyTorsion     -- return correct coords torsion=0, angle=0."""
     ko = Kinematics(self.known_points, self.torTree, tolist=1)
     self.assertEqual(self.known_points, ko.applyTorsion( ko.torsions[0], 0.) )