==== 基本コード ==== rs.TransformObject(object_id, matrix, copy=False) # 1つのオブジェクトを対象 rs.TransformObjects(object_ids, matrix, copy=False) # 複数のオブジェクトを対象 *API [[https://developer.rhino3d.com/api/RhinoScriptSyntax/#object-TransformObjects|TransformObjects]] *API [[https://developer.rhino3d.com/api/RhinoScriptSyntax/#object-TransformObject|TransformObject]] 移動方法を4x4の行列で指定する。\\ 単純な平行移動であれば、次のXformTranslation関数で取得した行列を渡してあげればよい rs.XformTranslation([dx, dy, dz]) ==== サンプルコード ==== 次のコードでは、[0,0,0]の位置に生成した球を、TransformObject関数でx軸方向に100だけ移動している\\ 移動方向の指定に必要なmatrixはXformTranslation関数で生成している import rhinoscriptsyntax as rs a = [] sphere = rs.AddSphere([0,0,0],10) rs.TransformObject(sphere, rs.XformTranslation([100,0,0])) a.append(sphere) 実行結果(原点からx軸方向へ移動した位置に球が生成されていることを確認) {{:trans.png?direct|}}