Goal source code examples - Grasshopper2024-03-29T00:32:41Zhttps://www.grasshopper3d.com/forum/topics/goal-source-code-examples?groupUrl=kangaroo&commentId=2985220%3AComment%3A1497670&groupId=2985220%3AGroup%3A120977&feed=yes&xn_auth=noHi Daniel,
I was wrong in my…tag:www.grasshopper3d.com,2018-04-23:2985220:Comment:19052262018-04-23T06:10:35.797ZLudovic Regnaulthttps://www.grasshopper3d.com/profile/LudovicRegnault
<div class="description" id="desc_2985220Comment1903523" style="margin: 0px 35px 0.7em 0px; padding: 0px; line-height: inherit; font-size: 1em; text-overflow: ellipsis; overflow: hidden;"><div class="xg_user_generated" style="margin: 0px; padding: 0px; line-height: inherit; font-size: 1em; xg-p: static !important;"><p style="margin: 0px 0px 0.5em; padding: 0px; line-height: inherit; font-size: 1em; xg-p: static !important; min-height: 1em;">Hi Daniel,…</p>
</div>
</div>
<div class="description" id="desc_2985220Comment1903523" style="margin: 0px 35px 0.7em 0px; padding: 0px; line-height: inherit; font-size: 1em; text-overflow: ellipsis; overflow: hidden;"><div class="xg_user_generated" style="margin: 0px; padding: 0px; line-height: inherit; font-size: 1em; xg-p: static !important;"><p style="margin: 0px 0px 0.5em; padding: 0px; line-height: inherit; font-size: 1em; xg-p: static !important; min-height: 1em;">Hi Daniel,</p>
<p style="margin: 0px 0px 0.5em; padding: 0px; line-height: inherit; font-size: 1em; xg-p: static !important; min-height: 1em;">I was wrong in my previous message (the one I deleted)</p>
<p style="margin: 0px 0px 0.5em; padding: 0px; line-height: inherit; font-size: 1em; xg-p: static !important; min-height: 1em;">Again thanks a lot for your help !</p>
<p style="margin: 0px 0px 0.5em; padding: 0px; line-height: inherit; font-size: 1em; xg-p: static !important; min-height: 1em;">The reset button is really helpfull. It is working perfectly fine (I misunderstood it the other day)</p>
</div>
</div> By the way I found a division…tag:www.grasshopper3d.com,2018-04-18:2985220:Comment:19034312018-04-18T08:27:07.378ZLudovic Regnaulthttps://www.grasshopper3d.com/profile/LudovicRegnault
<p>By the way I found a division by zero in ConstantTension component which explains why the solver collapse when CT length is null.</p>
<p>A way to fix it :</p>
<p>By the way I found a division by zero in ConstantTension component which explains why the solver collapse when CT length is null.</p>
<p>A way to fix it :</p> Like this:tag:www.grasshopper3d.com,2018-04-17:2985220:Comment:19030012018-04-17T16:23:48.162ZDaniel Pikerhttps://www.grasshopper3d.com/profile/DanielPiker
<p>Like this:</p>
<p>Like this:</p> Hi Ludovic,That is strange, a…tag:www.grasshopper3d.com,2018-04-17:2985220:Comment:19033242018-04-17T16:13:14.096ZDaniel Pikerhttps://www.grasshopper3d.com/profile/DanielPiker
<p>Hi Ludovic,<br></br>That is strange, as the actual goal code is identical.<br></br>Your script goal does sort of work when I run it - it deforms if stretched enough, but not the same behaviour as the compiled version.<br></br>I suspect this has something to do with the way the Plastic Length goal modifies its own variables during iteration, which is unlike most of the other goals.</p>
<p>One possibility could be to declare the instance of the goal outside the main RunScript and have a reset…</p>
<p>Hi Ludovic,<br/>That is strange, as the actual goal code is identical.<br/>Your script goal does sort of work when I run it - it deforms if stretched enough, but not the same behaviour as the compiled version.<br/>I suspect this has something to do with the way the Plastic Length goal modifies its own variables during iteration, which is unlike most of the other goals.</p>
<p>One possibility could be to declare the instance of the goal outside the main RunScript and have a reset button.</p>
<p></p> Hi,
I was trying to get inspi…tag:www.grasshopper3d.com,2018-04-17:2985220:Comment:19032832018-04-17T13:36:37.873ZLudovic Regnaulthttps://www.grasshopper3d.com/profile/LudovicRegnault
<p>Hi,</p>
<p>I was trying to get inspired by the Plastic Length Goal to developp another goal, but I don't manage to use the Plastic Length script properly.</p>
<p></p>
<p>There are no error messages but the plastic deformation does not work when the endpoint is pulled. It seems that the loop</p>
<p>if (Stretch > Limit)<br/> { RestLength += Stretch - Limit; } ...</p>
<p>is not actualizing the RestLength.</p>
<p></p>
<p>Does anyone knows how this could be fixed ?</p>
<p>Thanks</p>
<p>Hi,</p>
<p>I was trying to get inspired by the Plastic Length Goal to developp another goal, but I don't manage to use the Plastic Length script properly.</p>
<p></p>
<p>There are no error messages but the plastic deformation does not work when the endpoint is pulled. It seems that the loop</p>
<p>if (Stretch > Limit)<br/> { RestLength += Stretch - Limit; } ...</p>
<p>is not actualizing the RestLength.</p>
<p></p>
<p>Does anyone knows how this could be fixed ?</p>
<p>Thanks</p> Just resaved my files for Rhi…tag:www.grasshopper3d.com,2017-11-11:2985220:Comment:18510472017-11-11T10:45:21.014ZJens Pedersenhttps://www.grasshopper3d.com/profile/JensPedersen
<p>Just resaved my files for Rhino 5 and then there is no problem. </p>
<p>Just resaved my files for Rhino 5 and then there is no problem. </p> Hi Daniel,
Thank you for th…tag:www.grasshopper3d.com,2017-11-11:2985220:Comment:18508052017-11-11T10:40:37.201ZJens Pedersenhttps://www.grasshopper3d.com/profile/JensPedersen
<p>Hi Daniel, </p>
<p></p>
<p>Thank you for the reply.</p>
<p></p>
<p>I will try your suggestions, I forgot to mention that I am trying to do it in the new Rhino6 beta version, I dont know if you think that has any implications?</p>
<p></p>
<p>Jens</p>
<p>Hi Daniel, </p>
<p></p>
<p>Thank you for the reply.</p>
<p></p>
<p>I will try your suggestions, I forgot to mention that I am trying to do it in the new Rhino6 beta version, I dont know if you think that has any implications?</p>
<p></p>
<p>Jens</p> Hi Jens,
Is it possible the…tag:www.grasshopper3d.com,2017-11-09:2985220:Comment:18499742017-11-09T22:27:56.055ZDaniel Pikerhttps://www.grasshopper3d.com/profile/DanielPiker
<p>Hi Jens,</p>
<p></p>
<p>Is it possible the assembly reference is pointing to a different copy of the dll? Or the COFF option needs to be switched off?</p>
<p></p>
<p>IGoal is actually the <em>interface</em> which Kangaroo uses internally, and in very early versions, to make custom goals you needed to implement IGoal directly, but then I added GoalObject, an <em>abstract class</em> which acts as a base implementation of IGoal, so users only need to override the methods they are actually using…</p>
<p>Hi Jens,</p>
<p></p>
<p>Is it possible the assembly reference is pointing to a different copy of the dll? Or the COFF option needs to be switched off?</p>
<p></p>
<p>IGoal is actually the <em>interface</em> which Kangaroo uses internally, and in very early versions, to make custom goals you needed to implement IGoal directly, but then I added GoalObject, an <em>abstract class</em> which acts as a base implementation of IGoal, so users only need to override the methods they are actually using (for example, you don't need to include an output method).</p>
<p>Custom goals should now always be written to implement GoalObject, not IGoal directly.</p>
<p></p> Hi Daniel,
I have just trie…tag:www.grasshopper3d.com,2017-11-09:2985220:Comment:18498032017-11-09T19:39:22.346ZJens Pedersenhttps://www.grasshopper3d.com/profile/JensPedersen
<p>Hi Daniel, </p>
<p></p>
<p>I have just tried to look through some old components I made and I am getting this error:</p>
<p></p>
<p>1. Solution exception:Unable to cast object of type 'ModInflate' to type 'KangarooSolver.IGoal'.</p>
<p></p>
<p>Any solutions? or have you swapped from GoalObject to IGoal?</p>
<p></p>
<p>All the best </p>
<p></p>
<p>Jens</p>
<p></p>
<p>Hi Daniel, </p>
<p></p>
<p>I have just tried to look through some old components I made and I am getting this error:</p>
<p></p>
<p>1. Solution exception:Unable to cast object of type 'ModInflate' to type 'KangarooSolver.IGoal'.</p>
<p></p>
<p>Any solutions? or have you swapped from GoalObject to IGoal?</p>
<p></p>
<p>All the best </p>
<p></p>
<p>Jens</p>
<p></p> Thanks, Daniel, this works re…tag:www.grasshopper3d.com,2016-06-14:2985220:Comment:15474712016-06-14T15:06:52.856ZMathias Gmachlhttps://www.grasshopper3d.com/profile/MathiasGmachl
<p>Thanks, Daniel, this works really well.</p>
<p>Is there a reason why it is not part of the standard distribution?</p>
<p>Thanks, Daniel, this works really well.</p>
<p>Is there a reason why it is not part of the standard distribution?</p>