{"action":"created","comment":{"url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments/35825456","id":35825456,"diff_hunk":"@@ -80,15 +75,28 @@ OpenSim_DECLARE_CONCRETE_OBJECT(BushingForce, Force);\n //==============================================================================\n // PUBLIC METHODS\n //==============================================================================\n-    /** Default constructor leaves bodies unspecified, sets the bushing frames\n+    /** Default constructor leaves frames unspecified, sets the bushing frames\n     to be at their body origins, and sets all bushing parameters to zero. **/\n     BushingForce();\n-    /** This constructor provides everything needed to create a real \n-    bushing. See property declarations for more information. **/\n-    BushingForce(const std::string& body1Name, \n+\n+    /** Construct the BushingForce given the offset frames that it tries to\n+    align according to the physical properties of the bushing.\n+    See property declarations for more information. **/\n+    BushingForce(const PhysicalOffsetFrame& frame1,","path":"OpenSim/Simulation/Model/BushingForce.h","position":48,"original_position":48,"commit_id":"d58273188b296f3cec5a2eea1fff3e6b8e000a33","original_commit_id":"d58273188b296f3cec5a2eea1fff3e6b8e000a33","user":{"login":"sherm1","id":4088016,"avatar_url":"https://avatars.githubusercontent.com/u/4088016?v=3","gravatar_id":"","url":"https://api.github.com/users/sherm1","html_url":"https://github.com/sherm1","followers_url":"https://api.github.com/users/sherm1/followers","following_url":"https://api.github.com/users/sherm1/following{/other_user}","gists_url":"https://api.github.com/users/sherm1/gists{/gist_id}","starred_url":"https://api.github.com/users/sherm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherm1/subscriptions","organizations_url":"https://api.github.com/users/sherm1/orgs","repos_url":"https://api.github.com/users/sherm1/repos","events_url":"https://api.github.com/users/sherm1/events{/privacy}","received_events_url":"https://api.github.com/users/sherm1/received_events","type":"User","site_admin":false},"body":"> The alternative is to assume the offset exists somewhere (e.g. in the Model), but this does not map well to the use cases/examples. \r\n\r\nI would have expected to be able to put a bushing (or joint or constraint) between any two PhysicalFrames. I don't see why it has to be limited to a PhysicalOffsetFrame. (Making one with a zero offset seems like a hack!) In some cases the PhysicalFrame would be a specially-built frame just for use with the bushing (say), but in others it would be a pre-existing frame. For example, I may have reason to attach one end of a bushing to the same frame as I'm using for one end of a joint.\r\n\r\nI'm wondering if this problem has to do with *ownership* of the PhysicalFrame -- in some cases we would like to use an existing frame, in others we might want to craft special frames that \"go with\" the bushing. I think a bushing should connect to two PhysicalFrames. As an orthogonal issue, some component will be the owner of those frames; that component might be the bushing or might be someone else. ","created_at":"2015-07-29T23:51:35Z","updated_at":"2015-07-29T23:51:35Z","html_url":"https://github.com/opensim-org/opensim-core/pull/558#discussion_r35825456","pull_request_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/558","_links":{"self":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments/35825456"},"html":{"href":"https://github.com/opensim-org/opensim-core/pull/558#discussion_r35825456"},"pull_request":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/558"}}},"pull_request":{"url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/558","id":40958932,"html_url":"https://github.com/opensim-org/opensim-core/pull/558","diff_url":"https://github.com/opensim-org/opensim-core/pull/558.diff","patch_url":"https://github.com/opensim-org/opensim-core/pull/558.patch","issue_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/558","number":558,"state":"open","locked":false,"title":"Make use of Frames with BushingForce as example","user":{"login":"aseth1","id":6494122,"avatar_url":"https://avatars.githubusercontent.com/u/6494122?v=3","gravatar_id":"","url":"https://api.github.com/users/aseth1","html_url":"https://github.com/aseth1","followers_url":"https://api.github.com/users/aseth1/followers","following_url":"https://api.github.com/users/aseth1/following{/other_user}","gists_url":"https://api.github.com/users/aseth1/gists{/gist_id}","starred_url":"https://api.github.com/users/aseth1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aseth1/subscriptions","organizations_url":"https://api.github.com/users/aseth1/orgs","repos_url":"https://api.github.com/users/aseth1/repos","events_url":"https://api.github.com/users/aseth1/events{/privacy}","received_events_url":"https://api.github.com/users/aseth1/received_events","type":"User","site_admin":false},"body":"The main objective of this PR is to address how Frames should be used to attach Components like Joints, Constraints, and most Forces that need Frames to join/attach to. Frames remain grossly underutilized.\r\n\r\nI targeted BushingForce to show how to use PhysicalOffsetFrames as subcomponents for the purpose of abstracting these frame connections. The BushingForce gets its dependencies (and connectors) by employing the PhysicalOffsetFrame. The offset is more than likely to be of interest to the BushingForce (only) and not necessarily the Body (or other PhysicalFrame) origin. It also does not preclude using the Body frame with an identity offset transform in that (no offset) case.\r\n\r\nI hope to use this approach for Joints, Constraints and any Force that currently require a PhysicalFrame  (e.g. Body) and have transform properties (location and orientation) to locate the attachment.\r\n\r\nThe only \"significant\" change to the API was the introduction of `Component::extendAddToSystemAfterSubcomponents()` which is a necessity for any Component that needs its Components to be added first, like the BushingForce that needs the resources (system elements) of its subcomponents (e.g. the MobilizedBodies that the underlying `SimTK::LinearBushing` requires).\r\n\r\nExtended testComponents (that now can walk through subcomponents for their connectors) and testForces (to include deserialization (updateFromXML) comparison from previous version of the BushingForce).\r\n\r\nThere is a need to have an explicit conversion/deserialization test from previous file versions (to  speak more broadly than #206) so we don't have to add specific coverage for every component that gets updated.\r\n\r\nThere are other minor changes like removing the use of Body (e.g. in reference to Ground) where we now mean a Frame in the code (including comments). Also updated `CoupledBushingForce` plugin example to use new property system.","created_at":"2015-07-27T22:54:39Z","updated_at":"2015-07-29T23:51:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37422cd4d3964694ae3f1471524f59007bdded8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/558/commits","review_comments_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/558/comments","review_comment_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/558/comments","statuses_url":"https://api.github.com/repos/opensim-org/opensim-core/statuses/d58273188b296f3cec5a2eea1fff3e6b8e000a33","head":{"label":"opensim-org:MakeUseOfFrames_BushingForce","ref":"MakeUseOfFrames_BushingForce","sha":"d58273188b296f3cec5a2eea1fff3e6b8e000a33","user":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"repo":{"id":20775600,"name":"opensim-core","full_name":"opensim-org/opensim-core","owner":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opensim-org/opensim-core","description":"SimTK OpenSim 4.0 C++ libraries and command-line applications and Java/Python wrapping.","fork":false,"url":"https://api.github.com/repos/opensim-org/opensim-core","forks_url":"https://api.github.com/repos/opensim-org/opensim-core/forks","keys_url":"https://api.github.com/repos/opensim-org/opensim-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opensim-org/opensim-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opensim-org/opensim-core/teams","hooks_url":"https://api.github.com/repos/opensim-org/opensim-core/hooks","issue_events_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/events{/number}","events_url":"https://api.github.com/repos/opensim-org/opensim-core/events","assignees_url":"https://api.github.com/repos/opensim-org/opensim-core/assignees{/user}","branches_url":"https://api.github.com/repos/opensim-org/opensim-core/branches{/branch}","tags_url":"https://api.github.com/repos/opensim-org/opensim-core/tags","blobs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opensim-org/opensim-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/opensim-org/opensim-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opensim-org/opensim-core/statuses/{sha}","languages_url":"https://api.github.com/repos/opensim-org/opensim-core/languages","stargazers_url":"https://api.github.com/repos/opensim-org/opensim-core/stargazers","contributors_url":"https://api.github.com/repos/opensim-org/opensim-core/contributors","subscribers_url":"https://api.github.com/repos/opensim-org/opensim-core/subscribers","subscription_url":"https://api.github.com/repos/opensim-org/opensim-core/subscription","commits_url":"https://api.github.com/repos/opensim-org/opensim-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/opensim-org/opensim-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/opensim-org/opensim-core/contents/{+path}","compare_url":"https://api.github.com/repos/opensim-org/opensim-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opensim-org/opensim-core/merges","archive_url":"https://api.github.com/repos/opensim-org/opensim-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opensim-org/opensim-core/downloads","issues_url":"https://api.github.com/repos/opensim-org/opensim-core/issues{/number}","pulls_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls{/number}","milestones_url":"https://api.github.com/repos/opensim-org/opensim-core/milestones{/number}","notifications_url":"https://api.github.com/repos/opensim-org/opensim-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opensim-org/opensim-core/labels{/name}","releases_url":"https://api.github.com/repos/opensim-org/opensim-core/releases{/id}","created_at":"2014-06-12T16:57:56Z","updated_at":"2015-07-13T18:58:56Z","pushed_at":"2015-07-29T23:48:12Z","git_url":"git://github.com/opensim-org/opensim-core.git","ssh_url":"git@github.com:opensim-org/opensim-core.git","clone_url":"https://github.com/opensim-org/opensim-core.git","svn_url":"https://github.com/opensim-org/opensim-core","homepage":"https://opensim.stanford.edu","size":114805,"stargazers_count":15,"watchers_count":15,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":234,"forks":13,"open_issues":234,"watchers":15,"default_branch":"master"}},"base":{"label":"opensim-org:master","ref":"master","sha":"464eb4626d44177b0191f569b6c029a55a312450","user":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"repo":{"id":20775600,"name":"opensim-core","full_name":"opensim-org/opensim-core","owner":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opensim-org/opensim-core","description":"SimTK OpenSim 4.0 C++ libraries and command-line applications and Java/Python wrapping.","fork":false,"url":"https://api.github.com/repos/opensim-org/opensim-core","forks_url":"https://api.github.com/repos/opensim-org/opensim-core/forks","keys_url":"https://api.github.com/repos/opensim-org/opensim-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opensim-org/opensim-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opensim-org/opensim-core/teams","hooks_url":"https://api.github.com/repos/opensim-org/opensim-core/hooks","issue_events_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/events{/number}","events_url":"https://api.github.com/repos/opensim-org/opensim-core/events","assignees_url":"https://api.github.com/repos/opensim-org/opensim-core/assignees{/user}","branches_url":"https://api.github.com/repos/opensim-org/opensim-core/branches{/branch}","tags_url":"https://api.github.com/repos/opensim-org/opensim-core/tags","blobs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opensim-org/opensim-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/opensim-org/opensim-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opensim-org/opensim-core/statuses/{sha}","languages_url":"https://api.github.com/repos/opensim-org/opensim-core/languages","stargazers_url":"https://api.github.com/repos/opensim-org/opensim-core/stargazers","contributors_url":"https://api.github.com/repos/opensim-org/opensim-core/contributors","subscribers_url":"https://api.github.com/repos/opensim-org/opensim-core/subscribers","subscription_url":"https://api.github.com/repos/opensim-org/opensim-core/subscription","commits_url":"https://api.github.com/repos/opensim-org/opensim-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/opensim-org/opensim-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/opensim-org/opensim-core/contents/{+path}","compare_url":"https://api.github.com/repos/opensim-org/opensim-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opensim-org/opensim-core/merges","archive_url":"https://api.github.com/repos/opensim-org/opensim-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opensim-org/opensim-core/downloads","issues_url":"https://api.github.com/repos/opensim-org/opensim-core/issues{/number}","pulls_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls{/number}","milestones_url":"https://api.github.com/repos/opensim-org/opensim-core/milestones{/number}","notifications_url":"https://api.github.com/repos/opensim-org/opensim-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opensim-org/opensim-core/labels{/name}","releases_url":"https://api.github.com/repos/opensim-org/opensim-core/releases{/id}","created_at":"2014-06-12T16:57:56Z","updated_at":"2015-07-13T18:58:56Z","pushed_at":"2015-07-29T23:48:12Z","git_url":"git://github.com/opensim-org/opensim-core.git","ssh_url":"git@github.com:opensim-org/opensim-core.git","clone_url":"https://github.com/opensim-org/opensim-core.git","svn_url":"https://github.com/opensim-org/opensim-core","homepage":"https://opensim.stanford.edu","size":114805,"stargazers_count":15,"watchers_count":15,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":234,"forks":13,"open_issues":234,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/558"},"html":{"href":"https://github.com/opensim-org/opensim-core/pull/558"},"issue":{"href":"https://api.github.com/repos/opensim-org/opensim-core/issues/558"},"comments":{"href":"https://api.github.com/repos/opensim-org/opensim-core/issues/558/comments"},"review_comments":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/558/comments"},"review_comment":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/558/commits"},"statuses":{"href":"https://api.github.com/repos/opensim-org/opensim-core/statuses/d58273188b296f3cec5a2eea1fff3e6b8e000a33"}}}}