{"action":"created","issue":{"url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/175","labels_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/175/comments","events_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/175/events","html_url":"https://github.com/helix-toolkit/helix-toolkit/issues/175","id":97053730,"number":175,"title":"TubeVisual3D Example doesn't work","user":{"login":"interdrift","id":5409106,"avatar_url":"https://avatars.githubusercontent.com/u/5409106?v=3","gravatar_id":"","url":"https://api.github.com/users/interdrift","html_url":"https://github.com/interdrift","followers_url":"https://api.github.com/users/interdrift/followers","following_url":"https://api.github.com/users/interdrift/following{/other_user}","gists_url":"https://api.github.com/users/interdrift/gists{/gist_id}","starred_url":"https://api.github.com/users/interdrift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interdrift/subscriptions","organizations_url":"https://api.github.com/users/interdrift/orgs","repos_url":"https://api.github.com/users/interdrift/repos","events_url":"https://api.github.com/users/interdrift/events{/privacy}","received_events_url":"https://api.github.com/users/interdrift/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/labels/WPF","name":"WPF","color":"5319e7"},{"url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/labels/you%20take%20it","name":"you take it","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-24T13:31:44Z","updated_at":"2015-08-03T08:53:04Z","closed_at":null,"body":"I was trying to use the TubeVisual3D example but that didn't work.\r\n\r\nI literally copy paste the code and change the namespaces to match my project name. The result is  an ArgumentOutOfRangeException thrown from ExtrudedVisual3D.\r\n\r\nThe problem arises when the TubeVisual3D is being constructed it executes the constructor of ExtrudedVisual3D making the Path property non null but still empty.\r\n\r\nHere's where the error happens : \r\n\r\nhttps://github.com/helix-toolkit/helix-toolkit/blob/master/Source/HelixToolkit.Wpf/Visual3Ds/MeshVisuals/ExtrudedVisual3D.cs#L243\r\n\r\n\r\nHere's a link to the example \r\n\r\nhttps://github.com/helix-toolkit/helix-toolkit/tree/master/Source/Examples/WPF/ExampleBrowser/Examples/Tube"},"comment":{"url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/comments/127168120","html_url":"https://github.com/helix-toolkit/helix-toolkit/issues/175#issuecomment-127168120","issue_url":"https://api.github.com/repos/helix-toolkit/helix-toolkit/issues/175","id":127168120,"user":{"login":"ando23","id":13274270,"avatar_url":"https://avatars.githubusercontent.com/u/13274270?v=3","gravatar_id":"","url":"https://api.github.com/users/ando23","html_url":"https://github.com/ando23","followers_url":"https://api.github.com/users/ando23/followers","following_url":"https://api.github.com/users/ando23/following{/other_user}","gists_url":"https://api.github.com/users/ando23/gists{/gist_id}","starred_url":"https://api.github.com/users/ando23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ando23/subscriptions","organizations_url":"https://api.github.com/users/ando23/orgs","repos_url":"https://api.github.com/users/ando23/repos","events_url":"https://api.github.com/users/ando23/events{/privacy}","received_events_url":"https://api.github.com/users/ando23/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T08:53:04Z","updated_at":"2015-08-03T08:53:04Z","body":"I didn't have time yet to test it, but the code seems to be weird:\r\n\r\n`if (this.Path == null || this.Path.Count >= 2) { return null; }`\r\nversus\r\n`var forward = this.Path[1] - this.Path[0];`, meaning that Path,Count **must** be at least two.\r\n\r\nSo, my guess would be that the if should be changed to \r\n`if (this.Path == null || this.Path.Count < 2) { return null; }`\r\n\r\nIf I have time, I will test it this evening."}}