{"action":"created","comment":{"url":"https://api.github.com/repos/walkinside/sdk/pulls/comments/87066083","pull_request_review_id":7693281,"id":87066083,"diff_hunk":"@@ -0,0 +1,157 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Text;\n+using System.Threading.Tasks;\n+using vrcontext.walkinside.exporter;\n+using System.IO;\n+\n+namespace ExportSimple\n+{\n+    class BinarySTL\n+    {\n+        // The scenenode reference of the Walkinside exporter SDK.\n+        IntPtr m_SceneNode = IntPtr.Zero;\n+        // Reference the root CAD hierarchy element in Walkinside model.\n+        long m_RootBranch = -1;\n+\n+        /// <summary>\n+        /// Initialize the walkinside exporter sdk. Making it ready to process STL geometry.\n+        /// </summary>\n+        /// <param name=\"projectpath\">The folder where the walkinside model will be created.</param>\n+        /// <param name=\"projectname\">The name of the folder that contains the main walkinside project file (.vrp). </param>\n+        /// <returns></returns>\n+        public bool Initialize(string projectpath, string projectname)\n+        {\n+            // Initialize the SDK.\n+            if (0 == Bindings.vrBegin())\n+                return false;\n+\n+            // Define the Walkinside model location.\n+            if (Bindings.vrSettingsFileNameW(projectpath + \"\\\\\" + projectname) == 0)\n+                return false;\n+            \n+            // Define the axis transformation to orientate STL geometry according Walkinside Axis.\n+            // Walkinside:          STL:\n+            //     X = Right            X = Right\n+            //     Y = Up               Y = ?\n+            //     Z = Depth            Z = ?\n+            VRT_VECTOR3 xa = new VRT_VECTOR3(1,  0,  0);\n+            VRT_VECTOR3 ya = new VRT_VECTOR3(0,  0, -1); // ToDo : Possible STL axis is not well defined, and these values need to change depending model.\n+            VRT_VECTOR3 za = new VRT_VECTOR3(0,  1,  0);","path":"examples/preview/Exporter SDK/ExportSTL/BinarySTL.cs","position":41,"original_position":41,"commit_id":"9a80bc63723efcbc5e49e52d05508a2b7ddf02f0","original_commit_id":"9a80bc63723efcbc5e49e52d05508a2b7ddf02f0","user":{"login":"griemens","id":22792243,"avatar_url":"https://avatars.githubusercontent.com/u/22792243?v=3","gravatar_id":"","url":"https://api.github.com/users/griemens","html_url":"https://github.com/griemens","followers_url":"https://api.github.com/users/griemens/followers","following_url":"https://api.github.com/users/griemens/following{/other_user}","gists_url":"https://api.github.com/users/griemens/gists{/gist_id}","starred_url":"https://api.github.com/users/griemens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griemens/subscriptions","organizations_url":"https://api.github.com/users/griemens/orgs","repos_url":"https://api.github.com/users/griemens/repos","events_url":"https://api.github.com/users/griemens/events{/privacy}","received_events_url":"https://api.github.com/users/griemens/received_events","type":"User","site_admin":false},"body":"Not a big fan of using vars in example code to learn API. Visual studio intelisense can get messed up with var types. And when learning new API intellisense is your friend :)","created_at":"2016-11-08T19:34:11Z","updated_at":"2016-11-08T19:34:11Z","html_url":"https://github.com/walkinside/sdk/pull/7#discussion_r87066083","pull_request_url":"https://api.github.com/repos/walkinside/sdk/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/walkinside/sdk/pulls/comments/87066083"},"html":{"href":"https://github.com/walkinside/sdk/pull/7#discussion_r87066083"},"pull_request":{"href":"https://api.github.com/repos/walkinside/sdk/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/walkinside/sdk/pulls/7","id":92832857,"html_url":"https://github.com/walkinside/sdk/pull/7","diff_url":"https://github.com/walkinside/sdk/pull/7.diff","patch_url":"https://github.com/walkinside/sdk/pull/7.patch","issue_url":"https://api.github.com/repos/walkinside/sdk/issues/7","number":7,"state":"closed","locked":false,"title":"Readme Index examples SDK + Exporter SDK example STL files","user":{"login":"griemens","id":22792243,"avatar_url":"https://avatars.githubusercontent.com/u/22792243?v=3","gravatar_id":"","url":"https://api.github.com/users/griemens","html_url":"https://github.com/griemens","followers_url":"https://api.github.com/users/griemens/followers","following_url":"https://api.github.com/users/griemens/following{/other_user}","gists_url":"https://api.github.com/users/griemens/gists{/gist_id}","starred_url":"https://api.github.com/users/griemens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griemens/subscriptions","organizations_url":"https://api.github.com/users/griemens/orgs","repos_url":"https://api.github.com/users/griemens/repos","events_url":"https://api.github.com/users/griemens/events{/privacy}","received_events_url":"https://api.github.com/users/griemens/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-08T18:26:36Z","updated_at":"2016-11-08T19:34:11Z","closed_at":"2016-11-08T19:33:35Z","merged_at":null,"merge_commit_sha":"1ab3b0ee106ddfd5585da46b2ab316b7b18421b7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/walkinside/sdk/pulls/7/commits","review_comments_url":"https://api.github.com/repos/walkinside/sdk/pulls/7/comments","review_comment_url":"https://api.github.com/repos/walkinside/sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/walkinside/sdk/issues/7/comments","statuses_url":"https://api.github.com/repos/walkinside/sdk/statuses/9a80bc63723efcbc5e49e52d05508a2b7ddf02f0","head":{"label":"griemens:master","ref":"master","sha":"9a80bc63723efcbc5e49e52d05508a2b7ddf02f0","user":{"login":"griemens","id":22792243,"avatar_url":"https://avatars.githubusercontent.com/u/22792243?v=3","gravatar_id":"","url":"https://api.github.com/users/griemens","html_url":"https://github.com/griemens","followers_url":"https://api.github.com/users/griemens/followers","following_url":"https://api.github.com/users/griemens/following{/other_user}","gists_url":"https://api.github.com/users/griemens/gists{/gist_id}","starred_url":"https://api.github.com/users/griemens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griemens/subscriptions","organizations_url":"https://api.github.com/users/griemens/orgs","repos_url":"https://api.github.com/users/griemens/repos","events_url":"https://api.github.com/users/griemens/events{/privacy}","received_events_url":"https://api.github.com/users/griemens/received_events","type":"User","site_admin":false},"repo":{"id":72865680,"name":"sdk","full_name":"griemens/sdk","owner":{"login":"griemens","id":22792243,"avatar_url":"https://avatars.githubusercontent.com/u/22792243?v=3","gravatar_id":"","url":"https://api.github.com/users/griemens","html_url":"https://github.com/griemens","followers_url":"https://api.github.com/users/griemens/followers","following_url":"https://api.github.com/users/griemens/following{/other_user}","gists_url":"https://api.github.com/users/griemens/gists{/gist_id}","starred_url":"https://api.github.com/users/griemens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griemens/subscriptions","organizations_url":"https://api.github.com/users/griemens/orgs","repos_url":"https://api.github.com/users/griemens/repos","events_url":"https://api.github.com/users/griemens/events{/privacy}","received_events_url":"https://api.github.com/users/griemens/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/griemens/sdk","description":"Develop powerful applications on top of Walkinside 3D engine","fork":true,"url":"https://api.github.com/repos/griemens/sdk","forks_url":"https://api.github.com/repos/griemens/sdk/forks","keys_url":"https://api.github.com/repos/griemens/sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/griemens/sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/griemens/sdk/teams","hooks_url":"https://api.github.com/repos/griemens/sdk/hooks","issue_events_url":"https://api.github.com/repos/griemens/sdk/issues/events{/number}","events_url":"https://api.github.com/repos/griemens/sdk/events","assignees_url":"https://api.github.com/repos/griemens/sdk/assignees{/user}","branches_url":"https://api.github.com/repos/griemens/sdk/branches{/branch}","tags_url":"https://api.github.com/repos/griemens/sdk/tags","blobs_url":"https://api.github.com/repos/griemens/sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/griemens/sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/griemens/sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/griemens/sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/griemens/sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/griemens/sdk/languages","stargazers_url":"https://api.github.com/repos/griemens/sdk/stargazers","contributors_url":"https://api.github.com/repos/griemens/sdk/contributors","subscribers_url":"https://api.github.com/repos/griemens/sdk/subscribers","subscription_url":"https://api.github.com/repos/griemens/sdk/subscription","commits_url":"https://api.github.com/repos/griemens/sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/griemens/sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/griemens/sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/griemens/sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/griemens/sdk/contents/{+path}","compare_url":"https://api.github.com/repos/griemens/sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/griemens/sdk/merges","archive_url":"https://api.github.com/repos/griemens/sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/griemens/sdk/downloads","issues_url":"https://api.github.com/repos/griemens/sdk/issues{/number}","pulls_url":"https://api.github.com/repos/griemens/sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/griemens/sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/griemens/sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/griemens/sdk/labels{/name}","releases_url":"https://api.github.com/repos/griemens/sdk/releases{/id}","deployments_url":"https://api.github.com/repos/griemens/sdk/deployments","created_at":"2016-11-04T16:31:12Z","updated_at":"2016-11-01T21:13:12Z","pushed_at":"2016-11-08T18:24:02Z","git_url":"git://github.com/griemens/sdk.git","ssh_url":"git@github.com:griemens/sdk.git","clone_url":"https://github.com/griemens/sdk.git","svn_url":"https://github.com/griemens/sdk","homepage":"https://walkinside.github.io/sdk/","size":161,"stargazers_count":0,"watchers_count":0,"language":null,"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":"walkinside:master","ref":"master","sha":"707e1935bd6bec093f7edea472484b554f572a50","user":{"login":"walkinside","id":8984662,"avatar_url":"https://avatars.githubusercontent.com/u/8984662?v=3","gravatar_id":"","url":"https://api.github.com/users/walkinside","html_url":"https://github.com/walkinside","followers_url":"https://api.github.com/users/walkinside/followers","following_url":"https://api.github.com/users/walkinside/following{/other_user}","gists_url":"https://api.github.com/users/walkinside/gists{/gist_id}","starred_url":"https://api.github.com/users/walkinside/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walkinside/subscriptions","organizations_url":"https://api.github.com/users/walkinside/orgs","repos_url":"https://api.github.com/users/walkinside/repos","events_url":"https://api.github.com/users/walkinside/events{/privacy}","received_events_url":"https://api.github.com/users/walkinside/received_events","type":"Organization","site_admin":false},"repo":{"id":57967440,"name":"sdk","full_name":"walkinside/sdk","owner":{"login":"walkinside","id":8984662,"avatar_url":"https://avatars.githubusercontent.com/u/8984662?v=3","gravatar_id":"","url":"https://api.github.com/users/walkinside","html_url":"https://github.com/walkinside","followers_url":"https://api.github.com/users/walkinside/followers","following_url":"https://api.github.com/users/walkinside/following{/other_user}","gists_url":"https://api.github.com/users/walkinside/gists{/gist_id}","starred_url":"https://api.github.com/users/walkinside/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walkinside/subscriptions","organizations_url":"https://api.github.com/users/walkinside/orgs","repos_url":"https://api.github.com/users/walkinside/repos","events_url":"https://api.github.com/users/walkinside/events{/privacy}","received_events_url":"https://api.github.com/users/walkinside/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/walkinside/sdk","description":"Develop powerful applications on top of Walkinside 3D engine","fork":false,"url":"https://api.github.com/repos/walkinside/sdk","forks_url":"https://api.github.com/repos/walkinside/sdk/forks","keys_url":"https://api.github.com/repos/walkinside/sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/walkinside/sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/walkinside/sdk/teams","hooks_url":"https://api.github.com/repos/walkinside/sdk/hooks","issue_events_url":"https://api.github.com/repos/walkinside/sdk/issues/events{/number}","events_url":"https://api.github.com/repos/walkinside/sdk/events","assignees_url":"https://api.github.com/repos/walkinside/sdk/assignees{/user}","branches_url":"https://api.github.com/repos/walkinside/sdk/branches{/branch}","tags_url":"https://api.github.com/repos/walkinside/sdk/tags","blobs_url":"https://api.github.com/repos/walkinside/sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/walkinside/sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/walkinside/sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/walkinside/sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/walkinside/sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/walkinside/sdk/languages","stargazers_url":"https://api.github.com/repos/walkinside/sdk/stargazers","contributors_url":"https://api.github.com/repos/walkinside/sdk/contributors","subscribers_url":"https://api.github.com/repos/walkinside/sdk/subscribers","subscription_url":"https://api.github.com/repos/walkinside/sdk/subscription","commits_url":"https://api.github.com/repos/walkinside/sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/walkinside/sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/walkinside/sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/walkinside/sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/walkinside/sdk/contents/{+path}","compare_url":"https://api.github.com/repos/walkinside/sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/walkinside/sdk/merges","archive_url":"https://api.github.com/repos/walkinside/sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/walkinside/sdk/downloads","issues_url":"https://api.github.com/repos/walkinside/sdk/issues{/number}","pulls_url":"https://api.github.com/repos/walkinside/sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/walkinside/sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/walkinside/sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/walkinside/sdk/labels{/name}","releases_url":"https://api.github.com/repos/walkinside/sdk/releases{/id}","deployments_url":"https://api.github.com/repos/walkinside/sdk/deployments","created_at":"2016-05-03T12:25:41Z","updated_at":"2016-11-01T21:13:12Z","pushed_at":"2016-11-08T18:26:36Z","git_url":"git://github.com/walkinside/sdk.git","ssh_url":"git@github.com:walkinside/sdk.git","clone_url":"https://github.com/walkinside/sdk.git","svn_url":"https://github.com/walkinside/sdk","homepage":"https://walkinside.github.io/sdk/","size":151,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/walkinside/sdk/pulls/7"},"html":{"href":"https://github.com/walkinside/sdk/pull/7"},"issue":{"href":"https://api.github.com/repos/walkinside/sdk/issues/7"},"comments":{"href":"https://api.github.com/repos/walkinside/sdk/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/walkinside/sdk/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/walkinside/sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/walkinside/sdk/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/walkinside/sdk/statuses/9a80bc63723efcbc5e49e52d05508a2b7ddf02f0"}}}}
{"actor":{"display_login":"griemens"}}