VB, C# and Python Coding - Grasshopper2024-03-19T02:18:30Zhttps://www.grasshopper3d.com/forum/categories/vb-c-and-python-coding/listForCategory?categoryId=2985220%3ACategory%3A4026&feed=yes&xn_auth=noText curvestag:www.grasshopper3d.com,2017-11-21:2985220:Topic:18563462017-11-21T06:37:42.587ZAdrián Juárez Monroyhttps://www.grasshopper3d.com/profile/AdrianJuarezMonroy
<p>I think there isn't any component to make text curves, only text tags and things like that, but is it possible to make text curves with a C# script or ay other way?</p>
<p>I think there isn't any component to make text curves, only text tags and things like that, but is it possible to make text curves with a C# script or ay other way?</p> multi flatten with or without pathmappertag:www.grasshopper3d.com,2017-11-16:2985220:Topic:18540992017-11-16T14:54:59.374ZGuy Austernhttps://www.grasshopper3d.com/profile/GuyAustern
<p>Hi</p>
<p>Trying to get GH data-trees to automatically flatten all data except their lowermost branches</p>
<p>off course this is possible with path-mapper:</p>
<p>{A;B;C} -> {A}</p>
<p>or</p>
<p>{A;B} -> {A}</p>
<p>thing is , my trees might have one, two or three original levels, so the path-mapper needs to be remapped every time the data structure changes, which is not what I am aiming at, since this has to happen several times in the script</p>
<p></p>
<p>Any ideas? I am a very…</p>
<p>Hi</p>
<p>Trying to get GH data-trees to automatically flatten all data except their lowermost branches</p>
<p>off course this is possible with path-mapper:</p>
<p>{A;B;C} -> {A}</p>
<p>or</p>
<p>{A;B} -> {A}</p>
<p>thing is , my trees might have one, two or three original levels, so the path-mapper needs to be remapped every time the data structure changes, which is not what I am aiming at, since this has to happen several times in the script</p>
<p></p>
<p>Any ideas? I am a very experienced GH user, and not afraid of python scripting where necessary</p>
<p></p>
<p>Thanks!!</p>
<p></p> C# How to refer input parameters between //custom additional code//tag:www.grasshopper3d.com,2017-11-15:2985220:Topic:18535052017-11-15T17:01:25.250ZShimpei Kojimahttps://www.grasshopper3d.com/profile/sinpeikojima
<p>Hello everyone,</p>
<p></p>
<p>I'd like to refer DataTree<double> parameter that connected left side of GH Component.</p>
<p></p>
<p>Usually, I succeeded in <span style="color: #0000ff;">private void RunScript(DataTree<double> Input, ref object Output)</span></p>
<p><span style="color: #000000;">There is no need to think this.</span></p>
<p></p>
<p>But I failed to refer in custom additional code area.</p>
<p></p>
<p>Is there anyone knows how to refer input parameters between…</p>
<p>Hello everyone,</p>
<p></p>
<p>I'd like to refer DataTree<double> parameter that connected left side of GH Component.</p>
<p></p>
<p>Usually, I succeeded in <span style="color: #0000ff;">private void RunScript(DataTree<double> Input, ref object Output)</span></p>
<p><span style="color: #000000;">There is no need to think this.</span></p>
<p></p>
<p>But I failed to refer in custom additional code area.</p>
<p></p>
<p>Is there anyone knows how to refer input parameters between //custom additional code//?</p>
<p></p>
<p>Sorry for my poor knowledge of C#.....</p>
<p></p>
<p>Best,</p>
<p>Shimpei</p> Clusters as Componenttag:www.grasshopper3d.com,2017-11-14:2985220:Topic:18531162017-11-14T12:28:52.091ZNatalia De Leonhttps://www.grasshopper3d.com/profile/NataliaDeLeon
<p>Hi!, I'm looking for a little tutorial on how to create a new component out of a simple cluster or a simple C# definition. Just to start making my own Library. Would be very useful.<br/>Also how to draw a little icon or something if its possible hehe<br/>I know its not that difficult but I don't know where to start :) <br/><br/>Thank you in advance! :)<br/><br/></p>
<p>Hi!, I'm looking for a little tutorial on how to create a new component out of a simple cluster or a simple C# definition. Just to start making my own Library. Would be very useful.<br/>Also how to draw a little icon or something if its possible hehe<br/>I know its not that difficult but I don't know where to start :) <br/><br/>Thank you in advance! :)<br/><br/></p> Subsurface in c#tag:www.grasshopper3d.com,2017-11-12:2985220:Topic:18516222017-11-12T12:59:16.720ZZAQI FATHIShttps://www.grasshopper3d.com/profile/zaqifathis
<p>Hi all,</p>
<p></p>
<p>I am a beginner of c# and what I am trying to do is to subdivide a surface into an equal size. However, I found some issues:</p>
<p>I thought it would be easier to subdivide the surface if I normalize it (so the domain for the width and length is between 0 to 1), but it won't works at all. I just get null output. However, it works when I change to use the actual size of the surface but the subdivision becomes not equal. (see the image below).</p>
<p>could someone…</p>
<p>Hi all,</p>
<p></p>
<p>I am a beginner of c# and what I am trying to do is to subdivide a surface into an equal size. However, I found some issues:</p>
<p>I thought it would be easier to subdivide the surface if I normalize it (so the domain for the width and length is between 0 to 1), but it won't works at all. I just get null output. However, it works when I change to use the actual size of the surface but the subdivision becomes not equal. (see the image below).</p>
<p>could someone explain it to me why this happened??</p>
<p></p>
<p>Cheers!</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655072022?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2655072022?profile=RESIZE_1024x1024" width="750" class="align-full"/></a></p> rigid body adapttag:www.grasshopper3d.com,2017-11-11:2985220:Topic:18511512017-11-11T17:06:26.188Zgiovanni d'amatohttps://www.grasshopper3d.com/profile/giovannidamato
<pre class="tw-data-text tw-ta tw-text-small" dir="ltr" id="tw-target-text" style="text-align: left; height: 336px;"><span lang="en" xml:lang="en">Hello to all. I'm at the beginning with Kangaroo and it would help me. <br></br>I'm trying to create a panel made up of squares tied to each other along the<br></br> lower edges. What I would like to achieve is a relaxation of the panel on a solid <br></br>without the individual squares deforming. However, single squares can rotate<br></br> between them (both in the…</span></pre>
<pre class="tw-data-text tw-ta tw-text-small" id="tw-target-text" style="text-align: left; height: 336px;" dir="ltr"><span lang="en" xml:lang="en">Hello to all. I'm at the beginning with Kangaroo and it would help me. <br/>I'm trying to create a panel made up of squares tied to each other along the<br/> lower edges. What I would like to achieve is a relaxation of the panel on a solid <br/>without the individual squares deforming. However, single squares can rotate<br/> between them (both in the x direction and in the y direction) only 0 5 10 and <br/>20 degrees. I've been searching a lot of material around and I've edited some <br/><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655072128?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2655072128?profile=RESIZE_1024x1024" class="align-full" width="750"/></a><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655072218?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2655072218?profile=RESIZE_1024x1024" class="align-full" width="750"/></a><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655072237?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2655072237?profile=RESIZE_1024x1024" class="align-full" width="750"/></a>scripts including one of Daniel on the relaxation of a mesh</span></pre> class factory COM needs high privilegies (Eccezione da HRESULT: 0x800702E4).tag:www.grasshopper3d.com,2017-11-10:2985220:Topic:18503852017-11-10T14:46:11.547ZGerry D'Anzahttps://www.grasshopper3d.com/profile/GerryDAnza356
<p>Anybody Has idea on how to fix this ? </p>
<p>I have made a grasshopper component that links to a software trough COM interface.</p>
<p>On windows 7 all works fine, as soon moved to windows 10 I get this error message in grasshopper, so how to get higher privilegies to connect to the COM component ? </p>
<p></p>
<p>gerry</p>
<p></p>
<p>Anybody Has idea on how to fix this ? </p>
<p>I have made a grasshopper component that links to a software trough COM interface.</p>
<p>On windows 7 all works fine, as soon moved to windows 10 I get this error message in grasshopper, so how to get higher privilegies to connect to the COM component ? </p>
<p></p>
<p>gerry</p>
<p></p> Grasshopper + Rhino Beta -> Whats happened to NGONS?tag:www.grasshopper3d.com,2017-11-10:2985220:Topic:18503832017-11-10T14:44:20.364ZPetras Vestartashttps://www.grasshopper3d.com/profile/PetrasVestartas
<p>Hi,</p>
<p>I have two lists of polylines, and from those lists I create ngon meshes.<br></br> After Rhino Beta installation something went wrong with display from Grasshopper.</p>
<p>If I create ngon mesh from one list of polylines display is correct.<br></br> If I input datatree, or two lists, meshes are still correct but display is only shown in <strong>wireframe</strong> why?</p>
<p></p>
<p>I think it has nothing to do with code inside, because baking meshes works well and they are valid, but…</p>
<p>Hi,</p>
<p>I have two lists of polylines, and from those lists I create ngon meshes.<br/> After Rhino Beta installation something went wrong with display from Grasshopper.</p>
<p>If I create ngon mesh from one list of polylines display is correct.<br/> If I input datatree, or two lists, meshes are still correct but display is only shown in <strong>wireframe</strong> why?</p>
<p></p>
<p>I think it has nothing to do with code inside, because baking meshes works well and they are valid, but multiple display of meshes with ngons result in wireframe display.</p>
<p></p>
<p>I can take those two meshes and join into one, and display is correct again. </p>
<p>mesh1.append(mesh2);</p>
<p>But it seems grasshopper cannot handle more than one mesh with ngons display.</p>
<p></p>
<p>Code attached.</p>
<div class="lightbox-wrapper"><a href="https://cdn-enterprise.discourse.org/mcneel/uploads/default/original/3X/d/f/dff0845b26e1e1111542c7cad635c2decde652c9.png" class="lightbox" title="Betta.png" rel="nofollow noopener"><img src="https://cdn-enterprise.discourse.org/mcneel/uploads/default/optimized/3X/d/f/dff0845b26e1e1111542c7cad635c2decde652c9_1_690x302.png" alt="Betta" width="690" height="302"/></a></div> Reach a variable number with the sum of fixed numberstag:www.grasshopper3d.com,2017-11-10:2985220:Topic:18502222017-11-10T08:09:27.727ZPetrik Kollárhttps://www.grasshopper3d.com/profile/PetrikKollar
<p>Hello guys</p>
<p>I would like to aks your help, I'd like to make a grasshopper program which helps to solve my problem, i don't know python/C#/VB coding that's why I ask your help.<br></br>The problem is the following (It's a bit similar to the Knapsack problem):</p>
<p>I have a Variable --> X<br></br>and<br></br>I Have fix numbers (can we call "pieces") 9,12,15,18</p>
<p>I'd like to reach the X, with the summing of these numbers and using the minimum pieces ,it can't be lower than X, but it can be…</p>
<p>Hello guys</p>
<p>I would like to aks your help, I'd like to make a grasshopper program which helps to solve my problem, i don't know python/C#/VB coding that's why I ask your help.<br/>The problem is the following (It's a bit similar to the Knapsack problem):</p>
<p>I have a Variable --> X<br/>and<br/>I Have fix numbers (can we call "pieces") 9,12,15,18</p>
<p>I'd like to reach the X, with the summing of these numbers and using the minimum pieces ,it can't be lower than X, but it can be higher, maximum with 3.<br/>After this it has to found the most optimal combination which mostly use the same pieces</p>
<p><br/>E.G.</p>
<p>X=98</p>
<p>The wrong solution is like = 1pcs of 18 <br/> = 9pcs of 9</p>
<p>Sum of pieces are 10</p>
<p>OR</p>
<p> = 3pcs of 18<br/> = 1pcs of 15<br/> = 1pcs of 12<br/> = 2pcs of 9</p>
<p>Sum of pieces are 7</p>
<p>The right solution in this case = 5pcs of 18<br/> = 1pcs of 9</p>
<p><br/>(5*18)+(1*9)=99 it's good beacuse it's over with maximum 3 and uses the minimum pieces</p>
<p><br/>Then it sends to a list like<br/>18 : 5pcs<br/>15 : 0pcs<br/>12 : 0pcs<br/>9 : 1pcs<br/>Can somebody help me ? Or is it possible to make this ?</p>
<p>Thank you</p> Display dimension with C#tag:www.grasshopper3d.com,2017-11-10:2985220:Topic:18500782017-11-10T06:33:39.310ZAdrián Juárez Monroyhttps://www.grasshopper3d.com/profile/AdrianJuarezMonroy
<p>I know how to bake dimensions like this</p>
<blockquote><p>LinearDimension dim = new LinearDimension(...);</p>
<p>doc.Objects.AddLinearDimension(dim);</p>
</blockquote>
<p>But is there a way to display a preview of the dimensions with C# like with the Grasshopper dimension components?</p>
<p>I know that only the geometry that is assigned to an output of a script component is displayed, but if I assign to an output a dimension it doesn't display.</p>
<p>I know how to bake dimensions like this</p>
<blockquote><p>LinearDimension dim = new LinearDimension(...);</p>
<p>doc.Objects.AddLinearDimension(dim);</p>
</blockquote>
<p>But is there a way to display a preview of the dimensions with C# like with the Grasshopper dimension components?</p>
<p>I know that only the geometry that is assigned to an output of a script component is displayed, but if I assign to an output a dimension it doesn't display.</p>