{"action":"created","comment":{"url":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/comments/194813301","pull_request_review_id":128056040,"id":194813301,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDgxMzMwMQ==","diff_hunk":"@@ -0,0 +1,59 @@\n+import pytest\n+from geomeppy.geom.core_perim import core_perim_zone_coordinates\n+\n+footprint_1 = [(-20, 20), (30, -30), (50, 0), (50, 65), (-25, 50)]\n+expected_footprint_1 = {'Perimeter_Zone_5':\n+                        [(-19.27212384434131, 46.04655571753895),\n+                         (-25.0, 50.0),\n+                         (-20.0, 20.0),\n+                         (-15.331451032074877, 22.402518843940353)],\n+                        'Perimeter_Zone_4':\n+                        [(45.0, 58.900980486407214),\n+                         (50.0, 65.0),\n+                         (-25.0, 50.0),\n+                         (-19.27212384434131, 46.04655571753895)],\n+                        'Perimeter_Zone_3':\n+                        [(45.0, 1.5138781886599777),\n+                         (50.0, 0.0),\n+                         (50.0, 65.0),\n+                         (45.0, 58.900980486407214)],\n+                        'Perimeter_Zone_2':\n+                        [(29.2228758492822, -22.15180803741673),\n+                         (30.0, -30.0),\n+                         (50.0, 0.0),\n+                         (45.0, 1.5138781886599777)],\n+                        'Perimeter_Zone_1':\n+                        [(-15.331451032074877, 22.402518843940353),\n+                         (-20.0, 20.0),\n+                         (30.0, -30.0),\n+                         (29.2228758492822, -22.15180803741673)],\n+                        'Core_Zone':\n+                        [(-15.331451032074877, 22.402518843940353),\n+                         (-19.27212384434131, 46.04655571753895),\n+                         (45.0, 58.900980486407214),\n+                         (45.0, 1.5138781886599777),\n+                         (29.2228758492822, -22.15180803741673),\n+                         (-15.331451032074877, 22.402518843940353)]}\n+\n+\n+footprint_2 = [(0, 0), (30, 0), (30, 20), (0, 20)]\n+expected_footprint_2 = {'Core_Zone': [(5.0, 5.0), (5.0, 15.0),\n+                                      (25.0, 15.0), (25.0, 5.0), (5.0, 5.0)],\n+                        'Perimeter_Zone_4': [(5.0, 15.0), (0.0, 20.0),\n+                                             (0.0, 0.0), (5.0, 5.0)],\n+                        'Perimeter_Zone_3': [(25.0, 15.0), (30.0, 20.0),\n+                                             (0.0, 20.0), (5.0, 15.0)],\n+                        'Perimeter_Zone_2': [(25.0, 5.0), (30.0, 0.0),\n+                                             (30.0, 20.0), (25.0, 15.0)],\n+                        'Perimeter_Zone_1': [(5.0, 5.0), (0.0, 0.0),\n+                                             (30.0, 0.0), (25.0, 5.0)]}\n+\n+\n+def test_core_perim():","path":"tests/test_core_perim.py","position":52,"original_position":52,"commit_id":"06b75b1c17448f92bc2a64cfb114f9d4c2e654ae","original_commit_id":"06b75b1c17448f92bc2a64cfb114f9d4c2e654ae","user":{"login":"lymereJ","id":5149279,"node_id":"MDQ6VXNlcjUxNDkyNzk=","avatar_url":"https://avatars0.githubusercontent.com/u/5149279?v=4","gravatar_id":"","url":"https://api.github.com/users/lymereJ","html_url":"https://github.com/lymereJ","followers_url":"https://api.github.com/users/lymereJ/followers","following_url":"https://api.github.com/users/lymereJ/following{/other_user}","gists_url":"https://api.github.com/users/lymereJ/gists{/gist_id}","starred_url":"https://api.github.com/users/lymereJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lymereJ/subscriptions","organizations_url":"https://api.github.com/users/lymereJ/orgs","repos_url":"https://api.github.com/users/lymereJ/repos","events_url":"https://api.github.com/users/lymereJ/events{/privacy}","received_events_url":"https://api.github.com/users/lymereJ/received_events","type":"User","site_admin":false},"body":"1. Sounds good.\r\n2. Yes and no. It matters less now because we're using `shapely`'s `buffer`, it was more meant for what I had before.\r\n3. Ok, I'll change that.\r\n4. I'll create a test where it gets called.","created_at":"2018-06-12T16:51:51Z","updated_at":"2018-06-12T16:51:51Z","html_url":"https://github.com/jamiebull1/geomeppy/pull/31#discussion_r194813301","pull_request_url":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/31","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/comments/194813301"},"html":{"href":"https://github.com/jamiebull1/geomeppy/pull/31#discussion_r194813301"},"pull_request":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/31"}},"in_reply_to_id":194649963},"pull_request":{"url":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/31","id":165001163,"node_id":"MDExOlB1bGxSZXF1ZXN0MTY1MDAxMTYz","html_url":"https://github.com/jamiebull1/geomeppy/pull/31","diff_url":"https://github.com/jamiebull1/geomeppy/pull/31.diff","patch_url":"https://github.com/jamiebull1/geomeppy/pull/31.patch","issue_url":"https://api.github.com/repos/jamiebull1/geomeppy/issues/31","number":31,"state":"open","locked":false,"title":"Core/perimeter zoning approach","user":{"login":"lymereJ","id":5149279,"node_id":"MDQ6VXNlcjUxNDkyNzk=","avatar_url":"https://avatars0.githubusercontent.com/u/5149279?v=4","gravatar_id":"","url":"https://api.github.com/users/lymereJ","html_url":"https://github.com/lymereJ","followers_url":"https://api.github.com/users/lymereJ/followers","following_url":"https://api.github.com/users/lymereJ/following{/other_user}","gists_url":"https://api.github.com/users/lymereJ/gists{/gist_id}","starred_url":"https://api.github.com/users/lymereJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lymereJ/subscriptions","organizations_url":"https://api.github.com/users/lymereJ/orgs","repos_url":"https://api.github.com/users/lymereJ/repos","events_url":"https://api.github.com/users/lymereJ/events{/privacy}","received_events_url":"https://api.github.com/users/lymereJ/received_events","type":"User","site_admin":false},"body":"# Background\r\nI use eppy for pretty much all my EnergyPlus related work. I find geomeppy really useful, especially to quickly create geometries using Python scripts. Thank you for all your work!\r\n\r\nThis pull request adds the possibility to zone a block using a 'core/perimeter' approach. I find this approach pretty useful when creating 'shoebox' models. I initially wrote a script that would generate the perimeter and core zone coordinates that would then be fed into the `add_block` function. I thought that perhaps others might be interested in this approach so I decided to take a stab at trying to integrate it into geomeppy.\r\n\r\nI am not sure if you are interested in it, if you are feel free to merge it. I can provide clarification or re-write part of it if needed. I'm not sure if everything I wrote is really *Pythonic*. Anyway, please let me know.\r\n\r\n# Mods\r\nHere's a little bit more detail:\r\n- the `zoning` argument of the `add_block` function can now take two values: `by_storey` (just like before) or `core/perim`, the default is set to `by_storey`.\r\n- if `zoning='core/perim'` is used, the user can specify a `perim_depth` that drives the depth of the perimeter zones, the default is set to 3 m.\r\n\r\n# Example\r\nThe following code will generate the following geometry:\r\n\r\n    floor_plan = [(-20,20),(30,-30),(50,0),(50,65),(-25,50)] \r\n    idf_file.add_block(name='core/perim',\r\n     coordinates=floor_plan,\r\n     height=3,\r\n     zoning='core/perim',\r\n     perim_depth=5)\r\n\r\n![core/perim zoning](https://image.ibb.co/dGbqJb/core_perim.png)\r\n\r\nWhereas the following code will generate the following geometry:\r\n\r\n    floor_plan = [(-20,20),(30,-30),(50,0),(50,65),(-25,50)] \r\n\r\n    idf_file.add_block(name='by_storey',\r\n     coordinates=floor_plan,\r\n     height=3)\r\n\r\n![core/perim zoning](https://image.ibb.co/b6RJ4G/by_storey.png)","created_at":"2018-01-25T00:34:05Z","updated_at":"2018-06-12T16:51:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94b6c0aac9277ad450f95de8a1d9603df356b801","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/31/commits","review_comments_url":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/31/comments","review_comment_url":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jamiebull1/geomeppy/issues/31/comments","statuses_url":"https://api.github.com/repos/jamiebull1/geomeppy/statuses/06b75b1c17448f92bc2a64cfb114f9d4c2e654ae","head":{"label":"lymereJ:master","ref":"master","sha":"06b75b1c17448f92bc2a64cfb114f9d4c2e654ae","user":{"login":"lymereJ","id":5149279,"node_id":"MDQ6VXNlcjUxNDkyNzk=","avatar_url":"https://avatars0.githubusercontent.com/u/5149279?v=4","gravatar_id":"","url":"https://api.github.com/users/lymereJ","html_url":"https://github.com/lymereJ","followers_url":"https://api.github.com/users/lymereJ/followers","following_url":"https://api.github.com/users/lymereJ/following{/other_user}","gists_url":"https://api.github.com/users/lymereJ/gists{/gist_id}","starred_url":"https://api.github.com/users/lymereJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lymereJ/subscriptions","organizations_url":"https://api.github.com/users/lymereJ/orgs","repos_url":"https://api.github.com/users/lymereJ/repos","events_url":"https://api.github.com/users/lymereJ/events{/privacy}","received_events_url":"https://api.github.com/users/lymereJ/received_events","type":"User","site_admin":false},"repo":{"id":118838970,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg4Mzg5NzA=","name":"geomeppy","full_name":"lymereJ/geomeppy","owner":{"login":"lymereJ","id":5149279,"node_id":"MDQ6VXNlcjUxNDkyNzk=","avatar_url":"https://avatars0.githubusercontent.com/u/5149279?v=4","gravatar_id":"","url":"https://api.github.com/users/lymereJ","html_url":"https://github.com/lymereJ","followers_url":"https://api.github.com/users/lymereJ/followers","following_url":"https://api.github.com/users/lymereJ/following{/other_user}","gists_url":"https://api.github.com/users/lymereJ/gists{/gist_id}","starred_url":"https://api.github.com/users/lymereJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lymereJ/subscriptions","organizations_url":"https://api.github.com/users/lymereJ/orgs","repos_url":"https://api.github.com/users/lymereJ/repos","events_url":"https://api.github.com/users/lymereJ/events{/privacy}","received_events_url":"https://api.github.com/users/lymereJ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lymereJ/geomeppy","description":"GeomEppy is a scripting language for use with Eppy, which in turn is a scripting language for EnergyPlus IDF files and output files.","fork":true,"url":"https://api.github.com/repos/lymereJ/geomeppy","forks_url":"https://api.github.com/repos/lymereJ/geomeppy/forks","keys_url":"https://api.github.com/repos/lymereJ/geomeppy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lymereJ/geomeppy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lymereJ/geomeppy/teams","hooks_url":"https://api.github.com/repos/lymereJ/geomeppy/hooks","issue_events_url":"https://api.github.com/repos/lymereJ/geomeppy/issues/events{/number}","events_url":"https://api.github.com/repos/lymereJ/geomeppy/events","assignees_url":"https://api.github.com/repos/lymereJ/geomeppy/assignees{/user}","branches_url":"https://api.github.com/repos/lymereJ/geomeppy/branches{/branch}","tags_url":"https://api.github.com/repos/lymereJ/geomeppy/tags","blobs_url":"https://api.github.com/repos/lymereJ/geomeppy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lymereJ/geomeppy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lymereJ/geomeppy/git/refs{/sha}","trees_url":"https://api.github.com/repos/lymereJ/geomeppy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lymereJ/geomeppy/statuses/{sha}","languages_url":"https://api.github.com/repos/lymereJ/geomeppy/languages","stargazers_url":"https://api.github.com/repos/lymereJ/geomeppy/stargazers","contributors_url":"https://api.github.com/repos/lymereJ/geomeppy/contributors","subscribers_url":"https://api.github.com/repos/lymereJ/geomeppy/subscribers","subscription_url":"https://api.github.com/repos/lymereJ/geomeppy/subscription","commits_url":"https://api.github.com/repos/lymereJ/geomeppy/commits{/sha}","git_commits_url":"https://api.github.com/repos/lymereJ/geomeppy/git/commits{/sha}","comments_url":"https://api.github.com/repos/lymereJ/geomeppy/comments{/number}","issue_comment_url":"https://api.github.com/repos/lymereJ/geomeppy/issues/comments{/number}","contents_url":"https://api.github.com/repos/lymereJ/geomeppy/contents/{+path}","compare_url":"https://api.github.com/repos/lymereJ/geomeppy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lymereJ/geomeppy/merges","archive_url":"https://api.github.com/repos/lymereJ/geomeppy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lymereJ/geomeppy/downloads","issues_url":"https://api.github.com/repos/lymereJ/geomeppy/issues{/number}","pulls_url":"https://api.github.com/repos/lymereJ/geomeppy/pulls{/number}","milestones_url":"https://api.github.com/repos/lymereJ/geomeppy/milestones{/number}","notifications_url":"https://api.github.com/repos/lymereJ/geomeppy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lymereJ/geomeppy/labels{/name}","releases_url":"https://api.github.com/repos/lymereJ/geomeppy/releases{/id}","deployments_url":"https://api.github.com/repos/lymereJ/geomeppy/deployments","created_at":"2018-01-25T00:16:32Z","updated_at":"2018-06-10T15:31:00Z","pushed_at":"2018-06-10T15:30:59Z","git_url":"git://github.com/lymereJ/geomeppy.git","ssh_url":"git@github.com:lymereJ/geomeppy.git","clone_url":"https://github.com/lymereJ/geomeppy.git","svn_url":"https://github.com/lymereJ/geomeppy","homepage":"https://pypi.python.org/pypi/geomeppy","size":719,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jamiebull1:develop","ref":"develop","sha":"c04bdfeb239fd947ddf3d710c6d8a595cee17ac9","user":{"login":"jamiebull1","id":3817160,"node_id":"MDQ6VXNlcjM4MTcxNjA=","avatar_url":"https://avatars1.githubusercontent.com/u/3817160?v=4","gravatar_id":"","url":"https://api.github.com/users/jamiebull1","html_url":"https://github.com/jamiebull1","followers_url":"https://api.github.com/users/jamiebull1/followers","following_url":"https://api.github.com/users/jamiebull1/following{/other_user}","gists_url":"https://api.github.com/users/jamiebull1/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiebull1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiebull1/subscriptions","organizations_url":"https://api.github.com/users/jamiebull1/orgs","repos_url":"https://api.github.com/users/jamiebull1/repos","events_url":"https://api.github.com/users/jamiebull1/events{/privacy}","received_events_url":"https://api.github.com/users/jamiebull1/received_events","type":"User","site_admin":false},"repo":{"id":66575381,"node_id":"MDEwOlJlcG9zaXRvcnk2NjU3NTM4MQ==","name":"geomeppy","full_name":"jamiebull1/geomeppy","owner":{"login":"jamiebull1","id":3817160,"node_id":"MDQ6VXNlcjM4MTcxNjA=","avatar_url":"https://avatars1.githubusercontent.com/u/3817160?v=4","gravatar_id":"","url":"https://api.github.com/users/jamiebull1","html_url":"https://github.com/jamiebull1","followers_url":"https://api.github.com/users/jamiebull1/followers","following_url":"https://api.github.com/users/jamiebull1/following{/other_user}","gists_url":"https://api.github.com/users/jamiebull1/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiebull1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiebull1/subscriptions","organizations_url":"https://api.github.com/users/jamiebull1/orgs","repos_url":"https://api.github.com/users/jamiebull1/repos","events_url":"https://api.github.com/users/jamiebull1/events{/privacy}","received_events_url":"https://api.github.com/users/jamiebull1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamiebull1/geomeppy","description":"GeomEppy is a scripting language for use with Eppy, which in turn is a scripting language for EnergyPlus IDF files and output files.","fork":false,"url":"https://api.github.com/repos/jamiebull1/geomeppy","forks_url":"https://api.github.com/repos/jamiebull1/geomeppy/forks","keys_url":"https://api.github.com/repos/jamiebull1/geomeppy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamiebull1/geomeppy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamiebull1/geomeppy/teams","hooks_url":"https://api.github.com/repos/jamiebull1/geomeppy/hooks","issue_events_url":"https://api.github.com/repos/jamiebull1/geomeppy/issues/events{/number}","events_url":"https://api.github.com/repos/jamiebull1/geomeppy/events","assignees_url":"https://api.github.com/repos/jamiebull1/geomeppy/assignees{/user}","branches_url":"https://api.github.com/repos/jamiebull1/geomeppy/branches{/branch}","tags_url":"https://api.github.com/repos/jamiebull1/geomeppy/tags","blobs_url":"https://api.github.com/repos/jamiebull1/geomeppy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamiebull1/geomeppy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamiebull1/geomeppy/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamiebull1/geomeppy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamiebull1/geomeppy/statuses/{sha}","languages_url":"https://api.github.com/repos/jamiebull1/geomeppy/languages","stargazers_url":"https://api.github.com/repos/jamiebull1/geomeppy/stargazers","contributors_url":"https://api.github.com/repos/jamiebull1/geomeppy/contributors","subscribers_url":"https://api.github.com/repos/jamiebull1/geomeppy/subscribers","subscription_url":"https://api.github.com/repos/jamiebull1/geomeppy/subscription","commits_url":"https://api.github.com/repos/jamiebull1/geomeppy/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamiebull1/geomeppy/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamiebull1/geomeppy/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamiebull1/geomeppy/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamiebull1/geomeppy/contents/{+path}","compare_url":"https://api.github.com/repos/jamiebull1/geomeppy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamiebull1/geomeppy/merges","archive_url":"https://api.github.com/repos/jamiebull1/geomeppy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamiebull1/geomeppy/downloads","issues_url":"https://api.github.com/repos/jamiebull1/geomeppy/issues{/number}","pulls_url":"https://api.github.com/repos/jamiebull1/geomeppy/pulls{/number}","milestones_url":"https://api.github.com/repos/jamiebull1/geomeppy/milestones{/number}","notifications_url":"https://api.github.com/repos/jamiebull1/geomeppy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamiebull1/geomeppy/labels{/name}","releases_url":"https://api.github.com/repos/jamiebull1/geomeppy/releases{/id}","deployments_url":"https://api.github.com/repos/jamiebull1/geomeppy/deployments","created_at":"2016-08-25T16:34:08Z","updated_at":"2018-06-11T10:28:34Z","pushed_at":"2018-06-12T07:59:40Z","git_url":"git://github.com/jamiebull1/geomeppy.git","ssh_url":"git@github.com:jamiebull1/geomeppy.git","clone_url":"https://github.com/jamiebull1/geomeppy.git","svn_url":"https://github.com/jamiebull1/geomeppy","homepage":"https://pypi.python.org/pypi/geomeppy","size":735,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":8,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/31"},"html":{"href":"https://github.com/jamiebull1/geomeppy/pull/31"},"issue":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/issues/31"},"comments":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/jamiebull1/geomeppy/statuses/06b75b1c17448f92bc2a64cfb114f9d4c2e654ae"}},"author_association":"NONE"}}
{"actor":{"display_login":"lymereJ"}}