コード例 #1
0
def test_from_list():
    numbers = [1, 0, 0, 3, 0, 1, 0, 4, 0, 0, 1, 5, 0, 0, 0, 1]
    T = Transformation.from_list(numbers)
    assert T.matrix == [[1.0, 0.0, 0.0, 3.0], [0.0, 1.0, 0.0, 4.0], [0.0, 0.0, 1.0, 5.0], [0.0, 0.0, 0.0, 1.0]]
コード例 #2
0
ファイル: path_planning.py プロジェクト: xarthurx/compas_fab
def _to_xform(m):
    m = m if len(m) == 16 else m + [0, 0, 0, 1]
    return xform_from_transformation(Transformation.from_list(m))