{"id":7,"date":"2017-09-14T20:28:34","date_gmt":"2017-09-14T11:28:34","guid":{"rendered":"http:\/\/www.sciement.com\/tech-blog\/?p=7"},"modified":"2017-12-21T17:38:50","modified_gmt":"2017-12-21T08:38:50","slug":"getclosestpoint","status":"publish","type":"post","link":"https:\/\/www.sciement.com\/tech-blog\/maya\/getclosestpoint\/","title":{"rendered":"[Maya][Python]\u70b9\u304b\u3089\u30e1\u30c3\u30b7\u30e5\u8868\u9762\u306e\u6700\u3082\u8fd1\u3044\u70b9\u3092\u53d6\u5f97\u3059\u308b"},"content":{"rendered":"<p>Python\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u884c\u3044\u305f\u3044\u5834\u5408\u306e\u304a\u8a71\u3002<br \/>\n\u3061\u3087\u3063\u3068\u691c\u7d22\u3059\u308c\u3070getClosestPoint\u3092\u4f7f\u3046\u306e\u304c\u826f\u3044\u3068\u3059\u3050\u306b\u5206\u304b\u308a\u307e\u3059\u3002<br \/>\n\u304c\u3001\u305d\u306e\u305f\u3081\u306b\u306fMaya Python API\u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002<br \/>\n\u95a2\u9023\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3082\u691c\u7d22\u3059\u308c\u3070\u3044\u304f\u3064\u304b\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.djx.com.au\/blog\/2013\/07\/07\/get-closest-vertex-in-maya-using-python\/\" target=\"_blank\" rel=\"noopener\"><strong>djx blog \u00bb get closest vertex in maya using python<\/strong><\/a><\/p>\n<p><a href=\"http:\/\/rigglog.sakura.ne.jp\/db\/2015\/11\/23\/%E3%80%90openmaya%E3%80%91closestpoint%E3%81%AF%E5%A4%A7%E4%BA%8B%EF%BC%81\/\" target=\"_blank\" rel=\"noopener\"><strong>\u3010OpenMaya\u3011ClosestPoint\u306f\u5927\u4e8b\uff01 | \u30ea\u30b0\u30ed\u30b0\uff01<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/gist.github.com\/Tarachan\/98f2de1578d708f1cfd944062282a844\" target=\"_blank\" rel=\"noopener\"><strong>\u3010Maya Python API2.0\u3011 \u9078\u629e\u3057\u305f\u9802\u70b9\u306e\u53cd\u5bfe\u5074\u306e\u6700\u8fd1\u63a5\u9802\u70b9\u3092\u691c\u7d22\u3057\u3001\u5de6\u53f3\u5bfe\u79f0\u306b\u3059\u308b\u3002<\/strong><\/a><\/p>\n<p>\u3042\u308b1\u3064\u306e\u30e1\u30c3\u30b7\u30e5\u306b\u5bfe\u3057\u3066\u3001\u8907\u6570\u306e\u70b9\u3067\u305d\u308c\u305e\u308c\u3001\u30e1\u30c3\u30b7\u30e5\u306e\u6700\u8fd1\u70b9\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u3044\u3046\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u3001\u4eca\u56de\u306f\u30af\u30e9\u30b9\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"toolbar:1 expand:true lang:python decode:true\">import maya.api.OpenMaya as om\r\nimport numpy as np\r\n\r\n\r\nclass ClosestVertexOnMesh:\r\n    def __init__(self, target_polygon_name):\r\n        self.closest_point = None\r\n        self.closest_face_ID = None\r\n        self.closest_vertex_ID = None\r\n        self.closest_vertex_coordinate = None\r\n        self.closest_distance = float('inf')\r\n\r\n        selection_list = om.MSelectionList()\r\n        selection_list.add(target_polygon_name)\r\n\r\n        self.DAG_path = selection_list.getDagPath(0)\r\n        # self.DAG_path_to_shape = self.DAG_path.extendToShape()\r\n\r\n        self.target_shape = om.MFnMesh(self.DAG_path)\r\n\r\n        selection_list.clear()\r\n\r\n    def __get_vertices_id_and_Mcoordinate_from_face_id(self, face_ID):\r\n        mesh_face_iterator = om.MItMeshPolygon(self.DAG_path)\r\n        mesh_face_iterator.setIndex(face_ID)\r\n        face_vertices_ID = mesh_face_iterator.getVertices()\r\n        face_vertices_Mcoordinate = mesh_face_iterator.getPoints(om.MSpace.kWorld)\r\n        ID_to_Mcoordinate = {}\r\n        i = 0\r\n        for vertex_ID in face_vertices_ID:\r\n            ID_to_Mcoordinate[vertex_ID] = face_vertices_Mcoordinate[i]\r\n            i += 1\r\n        return ID_to_Mcoordinate\r\n\r\n    def calculate(self, target_coordinate):\r\n        target_MPoint = om.MPoint(target_coordinate[0], target_coordinate[1], target_coordinate[2])\r\n        closest_MPoint, self.closest_face_ID = self.target_shape.getClosestPoint(target_MPoint, om.MSpace.kWorld)\r\n        self.closest_point = np.array(list(closest_MPoint)[:3])\r\n\r\n        candidate_vertices_ID_and_Mcoordinate = self.__get_vertices_id_and_Mcoordinate_from_face_id(self.closest_face_ID)\r\n\r\n        for id, Mcoordinate in candidate_vertices_ID_and_Mcoordinate.items():\r\n            distance = target_MPoint.distanceTo(Mcoordinate)\r\n            if distance &lt; self.closest_distance:\r\n                self.closest_distance = distance\r\n                self.closest_vertex_ID = id\r\n                self.closest_vertex_coordinate = np.array(list(Mcoordinate)[:3])<\/pre>\n<p>getClosestPoint\u3092\u4f7f\u3046\u305f\u3081\u306b\u306f\u3001\u307e\u305aMFnMesh\u3068\u3044\u3046\u30af\u30e9\u30b9\u306b\u30e1\u30c3\u30b7\u30e5\u3092\u6307\u5b9a\u3057\u3066\u3042\u3052\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<span class=\"lang:python decode:true  crayon-inline \">target_shape = om.MFnMesh(&#8216;pSphere1Shape&#8217;)<\/span><br \/>\n\u3068\u51fa\u6765\u305f\u3089\u7c21\u5358\u306a\u306e\u3067\u3059\u304c\u3001API\u3092\u4f7f\u3046\u5834\u5408\u306f\u6b8b\u5ff5\u306a\u304c\u3089\u305d\u3046\u7c21\u5358\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n<a href=\"http:\/\/help.autodesk.com\/view\/MAYAUL\/2017\/ENU\/?guid=__py_ref_class_open_maya_1_1_m_fn_mesh_html\" target=\"_blank\" rel=\"noopener\">OpenMaya.MFnMesh Class Reference<\/a>\u3092\u898b\u3066\u307f\u308b\u3068\u3001MDagPath\u578b\u304bMObject\u578b\u3067\u6307\u5b9a\u3057\u308d\u3068\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u306a\u3093\u3060\u305d\u308c\uff1f\u3068\u306a\u308b\u308f\u3051\u3067\u3059\u304c\u30011\u30641\u3064\u4e01\u5be7\u306b\u9061\u3063\u3066\u3044\u3051\u3070\u89e3\u6c7a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"toolbar:1 start-line:13 expand:true lang:python decode:true\">        selection_list = om.MSelectionList()\r\n        selection_list.add(target_polygon_name)\r\n\r\n        self.DAG_path = selection_list.getDagPath(0)\r\n        # self.DAG_path_to_shape = self.DAG_path.extendToShape()\r\n\r\n        self.target_shape = om.MFnMesh(self.DAG_path)\r\n<\/pre>\n<p>\u3053\u308c\u3067\u4e0b\u6e96\u5099\u3057\u3066\u3084\u308a\u307e\u3059\u3002<br \/>\n<span class=\"lang:default decode:true  crayon-inline \">selection_list = om.MSelectionList(target_polygon_name)<\/span><br \/>\n\u3068\u66f8\u304d\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u304c\u3001MSelectionList\u306f\u5f15\u6570\u306a\u3057\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u304b\u30b3\u30d4\u30fc\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3057\u304b\u7121\u3044\u3068\u306e\u3053\u3068\u3067\uff08<a href=\"http:\/\/help.autodesk.com\/view\/MAYAUL\/2017\/ENU\/?guid=__py_ref_class_open_maya_1_1_m_selection_list_html\" target=\"_blank\" rel=\"noopener\">OpenMaya.MSelectionList Class Reference<\/a>\uff09\u30012\u884c\u306b\u5206\u3051\u3066\u66f8\u304d\u307e\u3059\u3002\u9069\u5b9cAPI\u306eReference\u3092\u898b\u306a\u304c\u3089\u3084\u308b\u3068\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3002<br \/>\nMDagPath\u306f\u3053\u306e\u3088\u3046\u306bMSelectionList\u3092\u901a\u3057\u3066\u5f97\u308b\u306e\u304c\u826f\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u308c\u3060\u3068Transform\u30ce\u30fc\u30c9\u306eMDagPath\u304c\u53d6\u5f97\u3055\u308c\u3001mesh\u30ce\u30fc\u30c9\uff08shape\u30ce\u30fc\u30c9\uff09\u306b\u306f\u306a\u3089\u305a\u3001<br \/>\n<a href=\"http:\/\/area.autodesk.jp\/column\/tutorial\/maya_atoz\/attribute_plug\/\" target=\"_blank\" rel=\"noopener\">\u7b2c68\u56de\uff1aAttribute\u3068Plug\u306b\u3064\u3044\u3066\u8a9e\u308b | \u8aad\u3093\u3067\u89e6\u3063\u3066\u3088\u304f\u308f\u304b\u308b\uff01Maya\u3092\u4f7f\u3044\u3053\u306a\u3059\u70ba\u306eAtoZ | AREA JAPAN<\/a><br \/>\n\u3092\u8aad\u3080\u3068<br \/>\n<span class=\"lang:default decode:true  crayon-inline \">.extendToShape()<\/span><br \/>\n\u3067mesh\u30ce\u30fc\u30c9\u306e\u30d1\u30b9\u3092\u53d6\u5f97\u51fa\u6765\u308b\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001Transform\u30ce\u30fc\u30c9\u3078\u306e\u30d1\u30b9\u3067\u3082\u554f\u984c\u306a\u304f\u51fa\u6765\u307e\u3057\u305f\u3002<\/p>\n<p>\u5ea7\u6a19\u306e\u6307\u5b9a\u306b\u306fMPoint\u3068\u3044\u3046\u578b\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308b\u305d\u3046\u3067\u3001<\/p>\n<pre class=\"toolbar:1 start-line:36 expand:true lang:python decode:true\">        target_MPoint = om.MPoint(target_coordinate[0], target_coordinate[1], target_coordinate[2])\r\n        closest_MPoint, self.closest_face_ID = self.target_shape.getClosestPoint(target_MPoint, om.MSpace.kWorld)\r\n        self.closest_point = np.array(list(closest_MPoint)[:3])<\/pre>\n<p>\u3067target_coordinate\u3092MPoint\u578b\u306b\u5909\u63db\u3057\u3066\u304b\u3089\u3001getClosestPoint\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\nAPI Reference\u306b\u306f<\/p>\n<blockquote><p>getClosestPoint(MPoint, space=MSpace.kObject) -&gt; (MPoint, int)<br \/>\nReturns a tuple containing the closest point on the mesh to the<br \/>\ngiven point and the ID of the face in which that closest point lies.<\/p><\/blockquote>\n<p>\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u901a\u308a\u66f8\u3051\u3070OK\u3067\u3059\u3002MSpace.kObject\u3068\u3044\u3046\u306e\u3082API Reference\u3092\u8aad\u3081\u3070\u308f\u304b\u308a\u307e\u3059\u3002\u3069\u306e\u5ea7\u6a19\u7cfb\u3092\u4f7f\u3046\u304b\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u5b9a\u6570\u3067\u3001\u30ef\u30fc\u30eb\u30c9\u5ea7\u6a19\u304c\u6b32\u3057\u3051\u308c\u3070om.MSpace.kWorld\uff08\u305f\u3060\u306e\u5b9a\u6570\u5024\uff09\u3068\u6307\u5b9a\u3059\u308c\u3070\u826f\u3044\u3067\u3059\u3002<br \/>\n\u6700\u5f8c\u306e<br \/>\n<span class=\"lang:default decode:true  crayon-inline \"> self.closest_point = np.array(list(closest_MPoint)[:3])<\/span><br \/>\n\u306f\u3001MPoint\u578b\u3092NumPy\u7528\u306b\u5909\u63db\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002[:3]\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u5ea7\u6a19\u5024\u3068\u3057\u3066x, y, z, w\u306e4\u3064\u304c\u8fd4\u3063\u3066\u304f\u308b\u304b\u3089\u3067\u3059\u3002w\u306f\u30a2\u30d5\u30a3\u30f3\u5909\u63db\u7528\u306e1\u306a\u306e\u3060\u3068\u601d\u3046\u306e\u3067\u304c\u3001\u81ea\u4fe1\u304c\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u3044\u305a\u308c\u306b\u3057\u3066\u3082\u5fc5\u8981\u306a\u306e\u306fw\u3092\u9664\u3044\u305f\u6700\u521d\u306e3\u3064\u3067\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u6ce8\u610f\u3059\u3079\u304d\u306f\u3001\u6700\u521d\u3001getClosestPoint\u306f\u4e00\u756a\u8fd1\u3044\u9802\u70b9\u306e\u5ea7\u6a19\u3092\u8fd4\u3057\u3066\u304f\u308b\u3082\u306e\u3060\u3068\u601d\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u9802\u70b9\u3067\u306f\u306a\u304f\u3001\u30e1\u30c3\u30b7\u30e5\u4e0a\u3067\u672c\u5f53\u306b\u4e00\u756a\u8fd1\u3044\u70b9\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<br \/>\n\u305d\u308c\u306b\u52a0\u3048\u3066\u3001\u305d\u306e\u70b9\u304c\u4e57\u3063\u3066\u3044\u308b\u30dd\u30ea\u30b4\u30f3\u306eindex\u3082\u53d6\u5f97\u51fa\u6765\u307e\u3059\uff08\u4e00\u756a\u8fd1\u3044\u70b9\u304c\u3061\u3087\u3046\u3069\u9802\u70b9\u306b\u3074\u3063\u305f\u308a\u4e00\u81f4\u3057\u305f\u5834\u5408\u306b\u306f\u8907\u6570\u306e\u30dd\u30ea\u30b4\u30f3\u304c\u8a72\u5f53\u3059\u308b\u6c17\u304c\u3057\u307e\u3059\u304c\u3001\u305d\u3093\u306a\u3053\u3068\u306f\u6ec5\u591a\u306b\u306a\u3044\u306e\u3060\u3068\u601d\u3044\u307e\u3059\uff09\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u6700\u3082\u8fd1\u3044\u9802\u70b9\u3092\u53d6\u5f97\u3057\u305f\u3051\u308c\u3070\u3001\u30dd\u30ea\u30b4\u30f3\u306eindex\u304b\u3089\u3001\u305d\u306e\u30dd\u30ea\u30b4\u30f3\u3092\u751f\u6210\u3057\u3066\u3044\u308b\u9802\u70b9\u3092\u53d6\u5f97\u3057\u3066\u3001\u9577\u3055\u3092\u6e2c\u308c\u3070\u826f\u3044\u308f\u3051\u3067\u3059\u3002<br \/>\n\u9802\u70b9\u306e\u53d6\u5f97\u51e6\u7406\u3092<br \/>\n<span class=\"lang:default decode:true  crayon-inline \">__get_vertices_id_and_Mcoordinate_from_face_id<\/span><br \/>\n\u306b\u307e\u3068\u3081\u307e\u3057\u305f\u3002<br \/>\n\u30a4\u30c6\u30ec\u30fc\u30bf\u3092\u4f7f\u3044\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/help.autodesk.com\/view\/MAYAUL\/2017\/JPN\/?guid=__files_Polygon_API_The_five_basic_polygonal_API_classes_htm\" target=\"_blank\" rel=\"noopener\">5 \u3064\u306e\u57fa\u672c\u30dd\u30ea\u30b4\u30f3 API \u30af\u30e9\u30b9<\/a>\u3068\u3057\u3066\u65e5\u672c\u8a9e\u30d8\u30eb\u30d7\u3082\u3042\u308b\u304f\u3089\u3044\u3001\u57fa\u672c\u306e\u57fa\u672c\u3060\u305d\u3046\u3067\u3059\u3002<\/p>\n<pre class=\"toolbar:1 start-line:24 expand:true lang:python decode:true\">        mesh_face_iterator = om.MItMeshPolygon(self.DAG_path)\r\n        mesh_face_iterator.setIndex(face_ID)\r\n        face_vertices_ID = mesh_face_iterator.getVertices()\r\n        face_vertices_Mcoordinate = mesh_face_iterator.getPoints(om.MSpace.kWorld)<\/pre>\n<p>\u30a4\u30c6\u30ec\u30fc\u30bf\u306e\u521d\u671f\u5316\u306b\u306f\u3053\u3053\u3067\u3082MDagPath\u578b\u3067\u30e1\u30c3\u30b7\u30e5\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\nsetIndex\u3067\u30dd\u30ea\u30b4\u30f3\u306eID\u3092\u6307\u5b9a\u3057\u3066getVertices\u3067\u9802\u70b9\u306eID\u3092\u3001getPoints\u3067\u9802\u70b9\u306e\u5ea7\u6a19\u3092\u53d6\u5f97\u51fa\u6765\u307e\u3059\u3002<br \/>\n\u9802\u70b9\u5ea7\u6a19\u306e\u53d6\u5f97\u6642\u306b\u306f\u3001\u3069\u306e\u5ea7\u6a19\u7cfb\u3092\u4f7f\u3046\u304b\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u518d\u3073om.MSpace.kWorld\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>Maya Python API\u306f\u6700\u521d\u306f\u306a\u304b\u306a\u304b\u53d6\u3063\u3064\u304d\u306b\u304f\u3044\u30a4\u30e1\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4e01\u5be7\u306b\u8fbf\u3063\u3066\u3044\u3051\u3070\u304d\u3061\u3093\u3068\u7406\u89e3\u3057\u306a\u304c\u3089\u66f8\u304f\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3057\u3001\u5b9f\u884c\u901f\u5ea6\u304c\u3081\u3061\u3083\u304f\u3061\u3083\u901f\u3044\u3067\u3059\u3002<br \/>\n4,5000\u30dd\u30ea\u30b4\u30f3\u306e\u30e1\u30c3\u30b7\u30e5\u306b\u5bfe\u3057\u3066ClosestVertexOnMesh.calculate\u30921,000\u56de\u7e70\u308a\u8fd4\u3057\u3066\u307f\u3066\u30825\u79d2\u7a0b\u5ea6\u3067\u7d42\u308f\u308a\u307e\u3057\u305f\u3002<\/p>\n<hr \/>\n<p>\u203b\u672c\u8a18\u4e8b\u5185\u5bb9\u306f\u3001\u56fd\u7acb\u7814\u7a76\u958b\u767a\u6cd5\u4eba \u65e5\u672c\u533b\u7642\u7814\u7a76\u958b\u767a\u6a5f\u69cb\uff08AMED\uff09\u306e<a href=\"https:\/\/www.amed.go.jp\/koubo\/02\/01\/0201C_00124.html\" rel=\"noopener\" target=\"_blank\">\u5e73\u621029\u5e74\u5ea6 \u300c\u672a\u6765\u533b\u7642\u3092\u5b9f\u73fe\u3059\u308b\u533b\u7642\u6a5f\u5668\u30fb\u30b7\u30b9\u30c6\u30e0\u7814\u7a76\u958b\u767a\u4e8b\u696d\u300e\u8853\u4e2d\u306e\u8fc5\u901f\u306a\u5224\u65ad\u30fb\u6c7a\u5b9a\u3092\u652f\u63f4\u3059\u308b\u305f\u3081\u306e\u8a3a\u65ad\u652f\u63f4\u6a5f\u5668\u30fb\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u300f\u300d\u63a1\u629e\u8ab2\u984c<\/a>\u3067\u3042\u308b\u300c\u8853\u524d\u3068\u8853\u4e2d\u3092\u3064\u306a\u3050\u30b9\u30de\u30fc\u30c8\u624b\u8853\u30ac\u30a4\u30c9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u958b\u767a\u300d\uff08\u4ee3\u8868\u6a5f\u95a2\u540d\uff1a\u6771\u4eac\u5927\u5b66\u3001\u7814\u7a76\u958b\u767a\u4ee3\u8868\u8005\u540d\uff1a\u9f4a\u85e4\u5ef6\u4eba\uff09\u306b\u3001\u6771\u4eac\u5927\u5b66\u5927\u5b66\u9662\u60c5\u5831\u7406\u5de5\u5b66\u7cfb\u7814\u7a76\u79d1\u306e\u5b66\u8853\u652f\u63f4\u5c02\u9580\u8077\u54e1\u3068\u3057\u3066\u53c2\u753b\u3057\u3066\u3044\u308b\u702c\u5c3e\u62e1\u53f2\u304c\u3001\u7814\u7a76\u958b\u767a\u3068\u3057\u3066\u884c\u3063\u3066\u3044\u308b\u3082\u306e\u3084\u305d\u306e\u6210\u679c\u3092\u4e00\u90e8\u542b\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u884c\u3044\u305f\u3044\u5834\u5408\u306e\u304a\u8a71\u3002 \u3061\u3087\u3063\u3068\u691c\u7d22\u3059\u308c\u3070getClosestPoint\u3092\u4f7f\u3046\u306e\u304c\u826f\u3044\u3068\u3059\u3050\u306b\u5206\u304b\u308a\u307e\u3059\u3002 \u304c\u3001\u305d\u306e\u305f\u3081\u306b\u306fMaya Python API\u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002 \u95a2\u9023\u3057\u305f\u30b5\u30f3\u30d7\u30eb &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3],"tags":[],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-maya","category-python"],"_links":{"self":[{"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":19,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":188,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/posts\/7\/revisions\/188"}],"wp:attachment":[{"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}