{"action":"created","comment":{"url":"https://api.github.com/repos/vispy/vispy/pulls/comments/30463887","id":30463887,"diff_hunk":"@@ -0,0 +1,60 @@\n+# -*- coding: utf-8 -*-\n+# Copyright (c) 2014, Vispy Development Team.\n+# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n+\n+\"\"\"\n+Simple demonstration of the plane geometry.\n+\"\"\"\n+\n+import sys\n+\n+from vispy import scene\n+from vispy import visuals\n+from vispy.geometry import create_plane\n+\n+canvas = scene.SceneCanvas(keys='interactive', size=(800, 600), show=True)\n+\n+view = canvas.central_widget.add_view()\n+\n+camera = scene.cameras.TurntableCamera(fov=45, parent=view.scene)\n+view.camera = camera\n+\n+vertices, faces, outline = create_plane(width=2,\n+                                        height=4,\n+                                        width_segments=4,\n+                                        height_segments=8,\n+                                        direction='+y')\n+\n+plane_f = scene.Mesh(vertices=vertices['position'],\n+                     faces=faces,\n+                     vertex_colors=vertices['color'],\n+                     parent=view.scene)\n+\n+plane_w1 = scene.Mesh(vertices=vertices['position'],\n+                      faces=outline,\n+                      vertex_colors=vertices['color'],\n+                      mode='lines',\n+                      parent=view.scene)\n+\n+transform = visuals.transforms.AffineTransform()\n+transform.translate((0, 0, 2.5))\n+plane_w1.transform = transform\n+\n+vertices, faces, outline = create_plane(width=2,\n+                                        height=4,\n+                                        width_segments=4,\n+                                        height_segments=8,\n+                                        direction='+z')\n+\n+plane_w2 = scene.Mesh(vertices=vertices['position'],\n+                      faces=outline,\n+                      vertex_colors=vertices['color'],\n+                      mode='lines',\n+                      parent=view.scene)\n+\n+transform = visuals.transforms.AffineTransform()\n+transform.translate((4.5, 0, 0))\n+plane_w2.transform = transform\n+\n+if __name__ == '__main__' and sys.flags.interactive == 0:\n+    canvas.app.run()","path":"examples/basics/visuals/plane.py","position":60,"original_position":60,"commit_id":"43c642c0f53613cbaee75e013e24173d1ab18ac0","original_commit_id":"43c642c0f53613cbaee75e013e24173d1ab18ac0","user":{"login":"KelSolaar","id":99779,"avatar_url":"https://avatars.githubusercontent.com/u/99779?v=3","gravatar_id":"","url":"https://api.github.com/users/KelSolaar","html_url":"https://github.com/KelSolaar","followers_url":"https://api.github.com/users/KelSolaar/followers","following_url":"https://api.github.com/users/KelSolaar/following{/other_user}","gists_url":"https://api.github.com/users/KelSolaar/gists{/gist_id}","starred_url":"https://api.github.com/users/KelSolaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KelSolaar/subscriptions","organizations_url":"https://api.github.com/users/KelSolaar/orgs","repos_url":"https://api.github.com/users/KelSolaar/repos","events_url":"https://api.github.com/users/KelSolaar/events{/privacy}","received_events_url":"https://api.github.com/users/KelSolaar/received_events","type":"User","site_admin":false},"body":"Sounds good!","created_at":"2015-05-16T19:39:50Z","updated_at":"2015-05-16T19:39:50Z","html_url":"https://github.com/vispy/vispy/pull/901#discussion_r30463887","pull_request_url":"https://api.github.com/repos/vispy/vispy/pulls/901","_links":{"self":{"href":"https://api.github.com/repos/vispy/vispy/pulls/comments/30463887"},"html":{"href":"https://github.com/vispy/vispy/pull/901#discussion_r30463887"},"pull_request":{"href":"https://api.github.com/repos/vispy/vispy/pulls/901"}}},"pull_request":{"url":"https://api.github.com/repos/vispy/vispy/pulls/901","id":35378839,"html_url":"https://github.com/vispy/vispy/pull/901","diff_url":"https://github.com/vispy/vispy/pull/901.diff","patch_url":"https://github.com/vispy/vispy/pull/901.patch","issue_url":"https://api.github.com/repos/vispy/vispy/issues/901","number":901,"state":"open","locked":false,"title":"PR: Support for parametric plane and box geometries.","user":{"login":"KelSolaar","id":99779,"avatar_url":"https://avatars.githubusercontent.com/u/99779?v=3","gravatar_id":"","url":"https://api.github.com/users/KelSolaar","html_url":"https://github.com/KelSolaar","followers_url":"https://api.github.com/users/KelSolaar/followers","following_url":"https://api.github.com/users/KelSolaar/following{/other_user}","gists_url":"https://api.github.com/users/KelSolaar/gists{/gist_id}","starred_url":"https://api.github.com/users/KelSolaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KelSolaar/subscriptions","organizations_url":"https://api.github.com/users/KelSolaar/orgs","repos_url":"https://api.github.com/users/KelSolaar/repos","events_url":"https://api.github.com/users/KelSolaar/events{/privacy}","received_events_url":"https://api.github.com/users/KelSolaar/received_events","type":"User","site_admin":false},"body":"This PR implements support for a parametric plane and a parametric box that builds on it through the following objects:\r\n\r\n- `vispy.geometry.generation.create_plane`\r\n\r\n![image](https://cloud.githubusercontent.com/assets/99779/7622624/4d4b4f16-f9d1-11e4-935d-8163c860f053.png)\r\n\r\n- `vispy.geometry.generation.create_box`\r\n\r\n![image](https://cloud.githubusercontent.com/assets/99779/7622628/5678e5b2-f9d1-11e4-8cc1-bcf6eed282f0.png)\r\n\r\nSome things to consider:\r\n\r\n- It would be neat to actually return a `MeshData` instance instead of the current tuple for `create_cube`, `create_plane` and `create_box` definitions, however the class may not have all the needed fields, especially one for the outline. Upon really quick inspection it doesn't seem to support arbitrary data.\r\n- As I didn't wanted to break anything, I did not replaced `make_cube`, it is maybe worth for it to be an alias to `make_box` or whatever you feel the best.\r\n- I haven't created matching visuals for the new geometries, but I have some that fit my usage accordingly to #900 there: https://github.com/colour-science/colour-vispy/blob/master/colour_vispy/visuals.py","created_at":"2015-05-13T22:47:28Z","updated_at":"2015-05-16T19:39:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b510e55b83c027db1e837794f67a88ff6cfd4880","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vispy/vispy/pulls/901/commits","review_comments_url":"https://api.github.com/repos/vispy/vispy/pulls/901/comments","review_comment_url":"https://api.github.com/repos/vispy/vispy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vispy/vispy/issues/901/comments","statuses_url":"https://api.github.com/repos/vispy/vispy/statuses/43c642c0f53613cbaee75e013e24173d1ab18ac0","head":{"label":"colour-science:master","ref":"master","sha":"43c642c0f53613cbaee75e013e24173d1ab18ac0","user":{"login":"colour-science","id":8414607,"avatar_url":"https://avatars.githubusercontent.com/u/8414607?v=3","gravatar_id":"","url":"https://api.github.com/users/colour-science","html_url":"https://github.com/colour-science","followers_url":"https://api.github.com/users/colour-science/followers","following_url":"https://api.github.com/users/colour-science/following{/other_user}","gists_url":"https://api.github.com/users/colour-science/gists{/gist_id}","starred_url":"https://api.github.com/users/colour-science/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colour-science/subscriptions","organizations_url":"https://api.github.com/users/colour-science/orgs","repos_url":"https://api.github.com/users/colour-science/repos","events_url":"https://api.github.com/users/colour-science/events{/privacy}","received_events_url":"https://api.github.com/users/colour-science/received_events","type":"Organization","site_admin":false},"repo":{"id":35452294,"name":"vispy","full_name":"colour-science/vispy","owner":{"login":"colour-science","id":8414607,"avatar_url":"https://avatars.githubusercontent.com/u/8414607?v=3","gravatar_id":"","url":"https://api.github.com/users/colour-science","html_url":"https://github.com/colour-science","followers_url":"https://api.github.com/users/colour-science/followers","following_url":"https://api.github.com/users/colour-science/following{/other_user}","gists_url":"https://api.github.com/users/colour-science/gists{/gist_id}","starred_url":"https://api.github.com/users/colour-science/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colour-science/subscriptions","organizations_url":"https://api.github.com/users/colour-science/orgs","repos_url":"https://api.github.com/users/colour-science/repos","events_url":"https://api.github.com/users/colour-science/events{/privacy}","received_events_url":"https://api.github.com/users/colour-science/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/colour-science/vispy","description":"Main repository for Vispy","fork":true,"url":"https://api.github.com/repos/colour-science/vispy","forks_url":"https://api.github.com/repos/colour-science/vispy/forks","keys_url":"https://api.github.com/repos/colour-science/vispy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colour-science/vispy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colour-science/vispy/teams","hooks_url":"https://api.github.com/repos/colour-science/vispy/hooks","issue_events_url":"https://api.github.com/repos/colour-science/vispy/issues/events{/number}","events_url":"https://api.github.com/repos/colour-science/vispy/events","assignees_url":"https://api.github.com/repos/colour-science/vispy/assignees{/user}","branches_url":"https://api.github.com/repos/colour-science/vispy/branches{/branch}","tags_url":"https://api.github.com/repos/colour-science/vispy/tags","blobs_url":"https://api.github.com/repos/colour-science/vispy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colour-science/vispy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colour-science/vispy/git/refs{/sha}","trees_url":"https://api.github.com/repos/colour-science/vispy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colour-science/vispy/statuses/{sha}","languages_url":"https://api.github.com/repos/colour-science/vispy/languages","stargazers_url":"https://api.github.com/repos/colour-science/vispy/stargazers","contributors_url":"https://api.github.com/repos/colour-science/vispy/contributors","subscribers_url":"https://api.github.com/repos/colour-science/vispy/subscribers","subscription_url":"https://api.github.com/repos/colour-science/vispy/subscription","commits_url":"https://api.github.com/repos/colour-science/vispy/commits{/sha}","git_commits_url":"https://api.github.com/repos/colour-science/vispy/git/commits{/sha}","comments_url":"https://api.github.com/repos/colour-science/vispy/comments{/number}","issue_comment_url":"https://api.github.com/repos/colour-science/vispy/issues/comments{/number}","contents_url":"https://api.github.com/repos/colour-science/vispy/contents/{+path}","compare_url":"https://api.github.com/repos/colour-science/vispy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colour-science/vispy/merges","archive_url":"https://api.github.com/repos/colour-science/vispy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colour-science/vispy/downloads","issues_url":"https://api.github.com/repos/colour-science/vispy/issues{/number}","pulls_url":"https://api.github.com/repos/colour-science/vispy/pulls{/number}","milestones_url":"https://api.github.com/repos/colour-science/vispy/milestones{/number}","notifications_url":"https://api.github.com/repos/colour-science/vispy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colour-science/vispy/labels{/name}","releases_url":"https://api.github.com/repos/colour-science/vispy/releases{/id}","created_at":"2015-05-11T21:57:45Z","updated_at":"2015-05-11T21:57:47Z","pushed_at":"2015-05-13T22:31:05Z","git_url":"git://github.com/colour-science/vispy.git","ssh_url":"git@github.com:colour-science/vispy.git","clone_url":"https://github.com/colour-science/vispy.git","svn_url":"https://github.com/colour-science/vispy","homepage":"http://vispy.org","size":8358,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vispy:master","ref":"master","sha":"adb7276d8b3ab7fa6549bef3064017f0a7d9c167","user":{"login":"vispy","id":3934254,"avatar_url":"https://avatars.githubusercontent.com/u/3934254?v=3","gravatar_id":"","url":"https://api.github.com/users/vispy","html_url":"https://github.com/vispy","followers_url":"https://api.github.com/users/vispy/followers","following_url":"https://api.github.com/users/vispy/following{/other_user}","gists_url":"https://api.github.com/users/vispy/gists{/gist_id}","starred_url":"https://api.github.com/users/vispy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vispy/subscriptions","organizations_url":"https://api.github.com/users/vispy/orgs","repos_url":"https://api.github.com/users/vispy/repos","events_url":"https://api.github.com/users/vispy/events{/privacy}","received_events_url":"https://api.github.com/users/vispy/received_events","type":"Organization","site_admin":false},"repo":{"id":8935948,"name":"vispy","full_name":"vispy/vispy","owner":{"login":"vispy","id":3934254,"avatar_url":"https://avatars.githubusercontent.com/u/3934254?v=3","gravatar_id":"","url":"https://api.github.com/users/vispy","html_url":"https://github.com/vispy","followers_url":"https://api.github.com/users/vispy/followers","following_url":"https://api.github.com/users/vispy/following{/other_user}","gists_url":"https://api.github.com/users/vispy/gists{/gist_id}","starred_url":"https://api.github.com/users/vispy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vispy/subscriptions","organizations_url":"https://api.github.com/users/vispy/orgs","repos_url":"https://api.github.com/users/vispy/repos","events_url":"https://api.github.com/users/vispy/events{/privacy}","received_events_url":"https://api.github.com/users/vispy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vispy/vispy","description":"Main repository for Vispy","fork":false,"url":"https://api.github.com/repos/vispy/vispy","forks_url":"https://api.github.com/repos/vispy/vispy/forks","keys_url":"https://api.github.com/repos/vispy/vispy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vispy/vispy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vispy/vispy/teams","hooks_url":"https://api.github.com/repos/vispy/vispy/hooks","issue_events_url":"https://api.github.com/repos/vispy/vispy/issues/events{/number}","events_url":"https://api.github.com/repos/vispy/vispy/events","assignees_url":"https://api.github.com/repos/vispy/vispy/assignees{/user}","branches_url":"https://api.github.com/repos/vispy/vispy/branches{/branch}","tags_url":"https://api.github.com/repos/vispy/vispy/tags","blobs_url":"https://api.github.com/repos/vispy/vispy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vispy/vispy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vispy/vispy/git/refs{/sha}","trees_url":"https://api.github.com/repos/vispy/vispy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vispy/vispy/statuses/{sha}","languages_url":"https://api.github.com/repos/vispy/vispy/languages","stargazers_url":"https://api.github.com/repos/vispy/vispy/stargazers","contributors_url":"https://api.github.com/repos/vispy/vispy/contributors","subscribers_url":"https://api.github.com/repos/vispy/vispy/subscribers","subscription_url":"https://api.github.com/repos/vispy/vispy/subscription","commits_url":"https://api.github.com/repos/vispy/vispy/commits{/sha}","git_commits_url":"https://api.github.com/repos/vispy/vispy/git/commits{/sha}","comments_url":"https://api.github.com/repos/vispy/vispy/comments{/number}","issue_comment_url":"https://api.github.com/repos/vispy/vispy/issues/comments{/number}","contents_url":"https://api.github.com/repos/vispy/vispy/contents/{+path}","compare_url":"https://api.github.com/repos/vispy/vispy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vispy/vispy/merges","archive_url":"https://api.github.com/repos/vispy/vispy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vispy/vispy/downloads","issues_url":"https://api.github.com/repos/vispy/vispy/issues{/number}","pulls_url":"https://api.github.com/repos/vispy/vispy/pulls{/number}","milestones_url":"https://api.github.com/repos/vispy/vispy/milestones{/number}","notifications_url":"https://api.github.com/repos/vispy/vispy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vispy/vispy/labels{/name}","releases_url":"https://api.github.com/repos/vispy/vispy/releases{/id}","created_at":"2013-03-21T18:43:22Z","updated_at":"2015-05-15T14:25:59Z","pushed_at":"2015-05-15T16:39:40Z","git_url":"git://github.com/vispy/vispy.git","ssh_url":"git@github.com:vispy/vispy.git","clone_url":"https://github.com/vispy/vispy.git","svn_url":"https://github.com/vispy/vispy","homepage":"http://vispy.org","size":17673,"stargazers_count":549,"watchers_count":549,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":100,"mirror_url":null,"open_issues_count":134,"forks":100,"open_issues":134,"watchers":549,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vispy/vispy/pulls/901"},"html":{"href":"https://github.com/vispy/vispy/pull/901"},"issue":{"href":"https://api.github.com/repos/vispy/vispy/issues/901"},"comments":{"href":"https://api.github.com/repos/vispy/vispy/issues/901/comments"},"review_comments":{"href":"https://api.github.com/repos/vispy/vispy/pulls/901/comments"},"review_comment":{"href":"https://api.github.com/repos/vispy/vispy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vispy/vispy/pulls/901/commits"},"statuses":{"href":"https://api.github.com/repos/vispy/vispy/statuses/43c642c0f53613cbaee75e013e24173d1ab18ac0"}}}}