{"action":"closed","issue":{"url":"https://api.github.com/repos/tpaviot/pythonocc-core/issues/474","repository_url":"https://api.github.com/repos/tpaviot/pythonocc-core","labels_url":"https://api.github.com/repos/tpaviot/pythonocc-core/issues/474/labels{/name}","comments_url":"https://api.github.com/repos/tpaviot/pythonocc-core/issues/474/comments","events_url":"https://api.github.com/repos/tpaviot/pythonocc-core/issues/474/events","html_url":"https://github.com/tpaviot/pythonocc-core/issues/474","id":278687901,"number":474,"title":"GeomAPI_PointsToBSplineSurface interpolate with point (0, 0, 0)","user":{"login":"tnakaicode","id":29787447,"avatar_url":"https://avatars3.githubusercontent.com/u/29787447?v=4","gravatar_id":"","url":"https://api.github.com/users/tnakaicode","html_url":"https://github.com/tnakaicode","followers_url":"https://api.github.com/users/tnakaicode/followers","following_url":"https://api.github.com/users/tnakaicode/following{/other_user}","gists_url":"https://api.github.com/users/tnakaicode/gists{/gist_id}","starred_url":"https://api.github.com/users/tnakaicode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnakaicode/subscriptions","organizations_url":"https://api.github.com/users/tnakaicode/orgs","repos_url":"https://api.github.com/users/tnakaicode/repos","events_url":"https://api.github.com/users/tnakaicode/events{/privacy}","received_events_url":"https://api.github.com/users/tnakaicode/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-02T14:26:27Z","updated_at":"2017-12-07T07:48:40Z","closed_at":"2017-12-07T07:48:40Z","author_association":"NONE","body":"I used GeomAPI_PointsToBSplineSurface to make curved surface. But, my code added automatically point (0, 0, 0).\r\n\r\nMy code is following.\r\n\r\n```\r\nimport math\r\nimport numpy as np\r\n\r\nfrom OCC.gp import (gp_Pnt, gp_Sphere, gp_Ax3, gp_Dir, gp_Circ, gp_Ax2,\r\n                    gp_Pnt2d, gp_Dir2d)\r\nfrom OCC.BRepBuilderAPI import (BRepBuilderAPI_MakeEdge,\r\n                                BRepBuilderAPI_MakeFace,\r\n                                BRepBuilderAPI_MakeWire)\r\nfrom OCC.TColgp import TColgp_Array2OfPnt\r\nfrom OCC.GeomAPI import GeomAPI_PointsToBSplineSurface\r\nfrom OCC.GeomAbs import GeomAbs_C2, GeomAbs_C0, GeomAbs_G1, GeomAbs_G2\r\nfrom OCC.Geom2d import Geom2d_Line\r\nfrom OCC.BRepLib import breplib_BuildCurves3d\r\nfrom OCC.Quantity import Quantity_Color, Quantity_NOC_PINK\r\n\r\nfrom OCC.Display.SimpleGui import init_display\r\n\r\ndef face(px, py, pz):\r\n    nx, ny = px.shape\r\n    pnt_2d = TColgp_Array2OfPnt(1, nx+1, 1, ny+1)\r\n    for row in range (pnt_2d.LowerRow(), pnt_2d.UpperRow()):\r\n        for col in range (pnt_2d.LowerCol(), pnt_2d.UpperCol()):\r\n            i,j = row-1, col-1\r\n            pnt = gp_Pnt (px[i, j], py[i, j], pz[i, j])\r\n            pnt_2d.SetValue(row, col, pnt)\r\n            print (i, j, px[i, j], py[i, j], pz[i, j])\r\n    \r\n    curve = GeomAPI_PointsToBSplineSurface(pnt_2d, 3, 8, GeomAbs_G2, 0.001).Surface()\r\n    #surface = BRepBuilderAPI_MakeFace(curve, 1e-6)\r\n    #return surface.Face()\r\n    return curve\r\n    \r\nif __name__ == '__main__':\r\n    display, start_display, add_menu, add_function_to_menu = init_display()\r\n\r\n    px = np.linspace (-1, 1, 5) * 10\r\n    py = np.linspace (-1, 1, 5) * 10\r\n    mesh = np.meshgrid (px, py)\r\n    dat1 = mesh[0]**2 / (2*10) + mesh[1]**2 / (2*10)\r\n\r\n    surf1 = face(*mesh, dat1)\r\n    display.DisplayShape(surf1)\r\n    \r\n    display.FitAll()\r\n    start_display()\r\n```\r\n"}}
{"actor":{"display_login":"tpaviot"}}