{"action":"created","comment":{"url":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/comments/76592238","id":76592238,"diff_hunk":"@@ -720,6 +787,35 @@ void DrawViewPart::dumpVertexes(const char* text, const TopoDS_Shape& s)\n     }\r\n }\r\n \r\n+void DrawViewPart::countFaces(const char* text, const TopoDS_Shape& s)\r\n+{\r\n+    TopExp_Explorer expl(s, TopAbs_FACE);\r\n+    int i;\r\n+    for (i = 0 ; expl.More(); expl.Next(),i++) {\r\n+    }\r\n+    Base::Console().Message(\"COUNT - %s has %d Faces\\n\",text,i);\r\n+}\r\n+\r\n+void DrawViewPart::countWires(const char* text, const TopoDS_Shape& s)\r\n+{\r\n+     TopExp_Explorer expl(s, TopAbs_WIRE);\r\n+     int i = 0;\r\n+     for (; expl.More(); expl.Next()) {\r\n+         i++;\r\n+     }\r\n+     Base::Console().Message(\"COUNT - %s has %d wires\\n\",text,i);\r\n+}\r\n+\r\n+void DrawViewPart::countEdges(const char* text, const TopoDS_Shape& s)\r","path":"src/Mod/TechDraw/App/DrawViewPart.cpp","position":178,"original_position":178,"commit_id":"e2945be805b7593c551293def1b23e612f82654a","original_commit_id":"e2945be805b7593c551293def1b23e612f82654a","user":{"login":"wwmayer","id":7101741,"avatar_url":"https://avatars.githubusercontent.com/u/7101741?v=3","gravatar_id":"","url":"https://api.github.com/users/wwmayer","html_url":"https://github.com/wwmayer","followers_url":"https://api.github.com/users/wwmayer/followers","following_url":"https://api.github.com/users/wwmayer/following{/other_user}","gists_url":"https://api.github.com/users/wwmayer/gists{/gist_id}","starred_url":"https://api.github.com/users/wwmayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwmayer/subscriptions","organizations_url":"https://api.github.com/users/wwmayer/orgs","repos_url":"https://api.github.com/users/wwmayer/repos","events_url":"https://api.github.com/users/wwmayer/events{/privacy}","received_events_url":"https://api.github.com/users/wwmayer/received_events","type":"User","site_admin":false},"body":"Be careful that (unless it's intended) this doesn't count the correct number of edges. The explorer works recursively, i.e. when iterating over a shape element it also iterates over its children and thus an edge will be counted several times.\r\n\r\nExample:\r\nA cube is 12 edges but this method counts 24 because the cube has 6 faces with four edges each => 6 * 4 = 24.\r\nIf you want to determine the correct number you must do it this way:\r\n`\r\nTopTools_IndexedMapOfShape mapOfEdges;\r\nTopExp::MapShapes(myShape, TopAbs_EDGE, mapOfEdges);\r\nint num = mapOfEdges.Extent();\r\n`\r\nThe same applies to countFaces & countWires.","created_at":"2016-08-29T11:32:29Z","updated_at":"2016-08-29T11:32:29Z","html_url":"https://github.com/FreeCAD/FreeCAD/pull/266#discussion_r76592238","pull_request_url":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/266","_links":{"self":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/comments/76592238"},"html":{"href":"https://github.com/FreeCAD/FreeCAD/pull/266#discussion_r76592238"},"pull_request":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/266"}}},"pull_request":{"url":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/266","id":82808265,"html_url":"https://github.com/FreeCAD/FreeCAD/pull/266","diff_url":"https://github.com/FreeCAD/FreeCAD/pull/266.diff","patch_url":"https://github.com/FreeCAD/FreeCAD/pull/266.patch","issue_url":"https://api.github.com/repos/FreeCAD/FreeCAD/issues/266","number":266,"state":"closed","locked":false,"title":"TechDraw ViewSection Changes","user":{"login":"WandererFan","id":3587161,"avatar_url":"https://avatars.githubusercontent.com/u/3587161?v=3","gravatar_id":"","url":"https://api.github.com/users/WandererFan","html_url":"https://github.com/WandererFan","followers_url":"https://api.github.com/users/WandererFan/followers","following_url":"https://api.github.com/users/WandererFan/following{/other_user}","gists_url":"https://api.github.com/users/WandererFan/gists{/gist_id}","starred_url":"https://api.github.com/users/WandererFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WandererFan/subscriptions","organizations_url":"https://api.github.com/users/WandererFan/orgs","repos_url":"https://api.github.com/users/WandererFan/repos","events_url":"https://api.github.com/users/WandererFan/events{/privacy}","received_events_url":"https://api.github.com/users/WandererFan/received_events","type":"User","site_admin":false},"body":"ViewSection is now based on ViewPart, provides a dialogue for setting section parameters and provides a section line in the base ViewPart. ","created_at":"2016-08-25T23:05:45Z","updated_at":"2016-08-29T11:32:29Z","closed_at":"2016-08-26T14:39:44Z","merged_at":null,"merge_commit_sha":"f9ecf26bb46690a328c3713fbf02083ca78c9d53","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/266/commits","review_comments_url":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/266/comments","review_comment_url":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FreeCAD/FreeCAD/issues/266/comments","statuses_url":"https://api.github.com/repos/FreeCAD/FreeCAD/statuses/e2945be805b7593c551293def1b23e612f82654a","head":{"label":"WandererFan:PreProd","ref":"PreProd","sha":"e2945be805b7593c551293def1b23e612f82654a","user":{"login":"WandererFan","id":3587161,"avatar_url":"https://avatars.githubusercontent.com/u/3587161?v=3","gravatar_id":"","url":"https://api.github.com/users/WandererFan","html_url":"https://github.com/WandererFan","followers_url":"https://api.github.com/users/WandererFan/followers","following_url":"https://api.github.com/users/WandererFan/following{/other_user}","gists_url":"https://api.github.com/users/WandererFan/gists{/gist_id}","starred_url":"https://api.github.com/users/WandererFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WandererFan/subscriptions","organizations_url":"https://api.github.com/users/WandererFan/orgs","repos_url":"https://api.github.com/users/WandererFan/repos","events_url":"https://api.github.com/users/WandererFan/events{/privacy}","received_events_url":"https://api.github.com/users/WandererFan/received_events","type":"User","site_admin":false},"repo":{"id":62413019,"name":"FreeCAD","full_name":"WandererFan/FreeCAD","owner":{"login":"WandererFan","id":3587161,"avatar_url":"https://avatars.githubusercontent.com/u/3587161?v=3","gravatar_id":"","url":"https://api.github.com/users/WandererFan","html_url":"https://github.com/WandererFan","followers_url":"https://api.github.com/users/WandererFan/followers","following_url":"https://api.github.com/users/WandererFan/following{/other_user}","gists_url":"https://api.github.com/users/WandererFan/gists{/gist_id}","starred_url":"https://api.github.com/users/WandererFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WandererFan/subscriptions","organizations_url":"https://api.github.com/users/WandererFan/orgs","repos_url":"https://api.github.com/users/WandererFan/repos","events_url":"https://api.github.com/users/WandererFan/events{/privacy}","received_events_url":"https://api.github.com/users/WandererFan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WandererFan/FreeCAD","description":"This is my fork of FreeCAD. ","fork":true,"url":"https://api.github.com/repos/WandererFan/FreeCAD","forks_url":"https://api.github.com/repos/WandererFan/FreeCAD/forks","keys_url":"https://api.github.com/repos/WandererFan/FreeCAD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WandererFan/FreeCAD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WandererFan/FreeCAD/teams","hooks_url":"https://api.github.com/repos/WandererFan/FreeCAD/hooks","issue_events_url":"https://api.github.com/repos/WandererFan/FreeCAD/issues/events{/number}","events_url":"https://api.github.com/repos/WandererFan/FreeCAD/events","assignees_url":"https://api.github.com/repos/WandererFan/FreeCAD/assignees{/user}","branches_url":"https://api.github.com/repos/WandererFan/FreeCAD/branches{/branch}","tags_url":"https://api.github.com/repos/WandererFan/FreeCAD/tags","blobs_url":"https://api.github.com/repos/WandererFan/FreeCAD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WandererFan/FreeCAD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WandererFan/FreeCAD/git/refs{/sha}","trees_url":"https://api.github.com/repos/WandererFan/FreeCAD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WandererFan/FreeCAD/statuses/{sha}","languages_url":"https://api.github.com/repos/WandererFan/FreeCAD/languages","stargazers_url":"https://api.github.com/repos/WandererFan/FreeCAD/stargazers","contributors_url":"https://api.github.com/repos/WandererFan/FreeCAD/contributors","subscribers_url":"https://api.github.com/repos/WandererFan/FreeCAD/subscribers","subscription_url":"https://api.github.com/repos/WandererFan/FreeCAD/subscription","commits_url":"https://api.github.com/repos/WandererFan/FreeCAD/commits{/sha}","git_commits_url":"https://api.github.com/repos/WandererFan/FreeCAD/git/commits{/sha}","comments_url":"https://api.github.com/repos/WandererFan/FreeCAD/comments{/number}","issue_comment_url":"https://api.github.com/repos/WandererFan/FreeCAD/issues/comments{/number}","contents_url":"https://api.github.com/repos/WandererFan/FreeCAD/contents/{+path}","compare_url":"https://api.github.com/repos/WandererFan/FreeCAD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WandererFan/FreeCAD/merges","archive_url":"https://api.github.com/repos/WandererFan/FreeCAD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WandererFan/FreeCAD/downloads","issues_url":"https://api.github.com/repos/WandererFan/FreeCAD/issues{/number}","pulls_url":"https://api.github.com/repos/WandererFan/FreeCAD/pulls{/number}","milestones_url":"https://api.github.com/repos/WandererFan/FreeCAD/milestones{/number}","notifications_url":"https://api.github.com/repos/WandererFan/FreeCAD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WandererFan/FreeCAD/labels{/name}","releases_url":"https://api.github.com/repos/WandererFan/FreeCAD/releases{/id}","deployments_url":"https://api.github.com/repos/WandererFan/FreeCAD/deployments","created_at":"2016-07-01T18:39:49Z","updated_at":"2016-07-22T18:04:49Z","pushed_at":"2016-08-28T12:53:53Z","git_url":"git://github.com/WandererFan/FreeCAD.git","ssh_url":"git@github.com:WandererFan/FreeCAD.git","clone_url":"https://github.com/WandererFan/FreeCAD.git","svn_url":"https://github.com/WandererFan/FreeCAD","homepage":"","size":405304,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"FreeCAD:master","ref":"master","sha":"46adbae952e8e17386c262d01ce2d0ec9709a5e7","user":{"login":"FreeCAD","id":2306237,"avatar_url":"https://avatars.githubusercontent.com/u/2306237?v=3","gravatar_id":"","url":"https://api.github.com/users/FreeCAD","html_url":"https://github.com/FreeCAD","followers_url":"https://api.github.com/users/FreeCAD/followers","following_url":"https://api.github.com/users/FreeCAD/following{/other_user}","gists_url":"https://api.github.com/users/FreeCAD/gists{/gist_id}","starred_url":"https://api.github.com/users/FreeCAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FreeCAD/subscriptions","organizations_url":"https://api.github.com/users/FreeCAD/orgs","repos_url":"https://api.github.com/users/FreeCAD/repos","events_url":"https://api.github.com/users/FreeCAD/events{/privacy}","received_events_url":"https://api.github.com/users/FreeCAD/received_events","type":"Organization","site_admin":false},"repo":{"id":5736080,"name":"FreeCAD","full_name":"FreeCAD/FreeCAD","owner":{"login":"FreeCAD","id":2306237,"avatar_url":"https://avatars.githubusercontent.com/u/2306237?v=3","gravatar_id":"","url":"https://api.github.com/users/FreeCAD","html_url":"https://github.com/FreeCAD","followers_url":"https://api.github.com/users/FreeCAD/followers","following_url":"https://api.github.com/users/FreeCAD/following{/other_user}","gists_url":"https://api.github.com/users/FreeCAD/gists{/gist_id}","starred_url":"https://api.github.com/users/FreeCAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FreeCAD/subscriptions","organizations_url":"https://api.github.com/users/FreeCAD/orgs","repos_url":"https://api.github.com/users/FreeCAD/repos","events_url":"https://api.github.com/users/FreeCAD/events{/privacy}","received_events_url":"https://api.github.com/users/FreeCAD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FreeCAD/FreeCAD","description":"This is the official code of FreeCAD ( http://www.freecadweb.org ). Clone this if you want to start FreeCAD development!  Please always announce your pull requests on http://forum.freecadweb.org otherwise they might go on unnoticed for a long time, thanks!","fork":false,"url":"https://api.github.com/repos/FreeCAD/FreeCAD","forks_url":"https://api.github.com/repos/FreeCAD/FreeCAD/forks","keys_url":"https://api.github.com/repos/FreeCAD/FreeCAD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FreeCAD/FreeCAD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FreeCAD/FreeCAD/teams","hooks_url":"https://api.github.com/repos/FreeCAD/FreeCAD/hooks","issue_events_url":"https://api.github.com/repos/FreeCAD/FreeCAD/issues/events{/number}","events_url":"https://api.github.com/repos/FreeCAD/FreeCAD/events","assignees_url":"https://api.github.com/repos/FreeCAD/FreeCAD/assignees{/user}","branches_url":"https://api.github.com/repos/FreeCAD/FreeCAD/branches{/branch}","tags_url":"https://api.github.com/repos/FreeCAD/FreeCAD/tags","blobs_url":"https://api.github.com/repos/FreeCAD/FreeCAD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FreeCAD/FreeCAD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FreeCAD/FreeCAD/git/refs{/sha}","trees_url":"https://api.github.com/repos/FreeCAD/FreeCAD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FreeCAD/FreeCAD/statuses/{sha}","languages_url":"https://api.github.com/repos/FreeCAD/FreeCAD/languages","stargazers_url":"https://api.github.com/repos/FreeCAD/FreeCAD/stargazers","contributors_url":"https://api.github.com/repos/FreeCAD/FreeCAD/contributors","subscribers_url":"https://api.github.com/repos/FreeCAD/FreeCAD/subscribers","subscription_url":"https://api.github.com/repos/FreeCAD/FreeCAD/subscription","commits_url":"https://api.github.com/repos/FreeCAD/FreeCAD/commits{/sha}","git_commits_url":"https://api.github.com/repos/FreeCAD/FreeCAD/git/commits{/sha}","comments_url":"https://api.github.com/repos/FreeCAD/FreeCAD/comments{/number}","issue_comment_url":"https://api.github.com/repos/FreeCAD/FreeCAD/issues/comments{/number}","contents_url":"https://api.github.com/repos/FreeCAD/FreeCAD/contents/{+path}","compare_url":"https://api.github.com/repos/FreeCAD/FreeCAD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FreeCAD/FreeCAD/merges","archive_url":"https://api.github.com/repos/FreeCAD/FreeCAD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FreeCAD/FreeCAD/downloads","issues_url":"https://api.github.com/repos/FreeCAD/FreeCAD/issues{/number}","pulls_url":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls{/number}","milestones_url":"https://api.github.com/repos/FreeCAD/FreeCAD/milestones{/number}","notifications_url":"https://api.github.com/repos/FreeCAD/FreeCAD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FreeCAD/FreeCAD/labels{/name}","releases_url":"https://api.github.com/repos/FreeCAD/FreeCAD/releases{/id}","deployments_url":"https://api.github.com/repos/FreeCAD/FreeCAD/deployments","created_at":"2012-09-09T08:25:02Z","updated_at":"2016-08-28T18:40:08Z","pushed_at":"2016-08-29T08:24:53Z","git_url":"git://github.com/FreeCAD/FreeCAD.git","ssh_url":"git@github.com:FreeCAD/FreeCAD.git","clone_url":"https://github.com/FreeCAD/FreeCAD.git","svn_url":"https://github.com/FreeCAD/FreeCAD","homepage":"","size":424702,"stargazers_count":950,"watchers_count":950,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":483,"mirror_url":null,"open_issues_count":8,"forks":483,"open_issues":8,"watchers":950,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/266"},"html":{"href":"https://github.com/FreeCAD/FreeCAD/pull/266"},"issue":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/issues/266"},"comments":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/issues/266/comments"},"review_comments":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/266/comments"},"review_comment":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/pulls/266/commits"},"statuses":{"href":"https://api.github.com/repos/FreeCAD/FreeCAD/statuses/e2945be805b7593c551293def1b23e612f82654a"}}}}
{"actor":{"display_login":"wwmayer"}}