oCommonSDK, I modified a working C# component that does something similar (ReduceMesh, written by Andrew Heumann). Both scripts are attached.
Aside from changing the component name and eliminating the P parameter, I made two modifications to the script:1) changed line 87 from private void RunScript(Mesh M, double P, ref object A) to: private void RunScript(Mesh M, ref object A)2) changed line 93 from: Rhino.RhinoApp.RunScript("_-ReduceMesh _ReductionPercentage " + Convert.ToString(P) + " _Enter", false); to: Rhino.RhinoApp.RunScript("_-MatchMeshEdge " + " _Enter", false);When I run the ReduceMesh component, the mesh object I feed it gets baked, the ReduceMesh command is run, the temporary object is deleted, and the reduced mesh result is returned. (Thanks, Andrew).When I run the MatchMeshEdge component, the mesh object I feed it is baked, the MatchMeshEdge command is run, but the temporary object is not deleted and no result is returned. The runtime error reads: "Sequence contains no elements (line 0)". I have a feeling that the command line string I am handing to RunScript is incomplete. When I enter it manually on the Rhino command line I see that it wants a mesh and three parameters. Of course I can hit Enter to accept the default values, but when you invoke a command through RunScript do you have to supply all parameters regardless? Also, where would I find details on the argument types that the command wants? For example, the last parameter reads "RatchetMode=On" or "RatchetMode=Off". How do I know if the type is Bool or the literal string "On" or "Off"?I am a complete novice at this so any help you can provide would be greatly appreciated! …
ey eventually recover and you can continue to working normally. This however is not very practical...
(Additional information: We have a virtualized Windows SPS environment, might this be the problem? Locally - on my hard drive - it works fine.)
Futhermore we've discovered the following bug/feature:
We export a cluster and reference it back into our .gh file, then copy the .ghcluster file to a different location and rename the copy (without opening or changing it), then also reference the copied version back into the .gh file. Now Grasshopper shows two clusters with two different file paths, but claims that they both are the same ("this cluster occurs twice in this document"). If I double click one of them, make a change and save, both clusters get changed, even though they are separate .ghcluster files.
This would follow the logic that David laid out in this entry (http://www.grasshopper3d.com/page/clusters09), that GH identifies a cluster not by its file name or location but by its internal ID.
An addition we would very much appreciate for the next GH update, would be the option to right click a referenced cluster and then not only be able to "update" it but to also to "relink" it to a new or different source.
Right now you have to rename or delete the .ghcluster file in order to relink a cluster via the update option. You can also overwrite the old cluster und update. However, sometimes we want to keep the old version or disentangle one of a clusters many instances and relink just one, with out loosing its various inputs and outputs by referencing the new version and reconnecting it.
Thanks, BB.…
correct:
- the right value in the 0. path {0;77} is the smallest one.
- right value in the 1. path {0;78} is the value which is closest to the chosen value in the preceding path
- ..and so on for {0;79} and {0;80}
but when the paths change their first level, the iteration should start from the beginning:
- right value in the 4. path {1;32} is the smallest one.
- right value in the 5. path {1;33} is the closest to the chosen one in {1;32}.
- right value in the 5. path {1;34} is the closest to the chosen one in {1;33}.
..to be continued.
..this is, what I want to achive in the VB code, I implemented at the beginning of the discussion.
..and this is how I designed the input-parameter of the VB-element:
if someone could help me .. super-great!
…
Mac due to its versatility , but given this new laptop will be using mainly on Rhino, GH , i have some doubts whether to switch to a window based laptop.
I have a look at some high-end window laptops, Dell Alienware for example, with same specs as MBP and found the price are even more expensive than MBP , about 10-15 %.
With the new Rhino 5 is coming , will Bootcamp be good and efficient enough to run Rhino, GH and some rendering programs?
From my experience i find Rhino and Gh run smoothly on Bootcamp , but never run those programs on window based laptop myself , it's impossible for me to know the differences.
Some say BootCamp only deliver 80% performance of the program , if it's true i would really consider switching to window based laptop.
Any suggestions?
and if you suggest me to switch , what brand should i go for ?
Thank you,
…
rection: there's no visible demand. Explanation: a lot of AEC oriented people (Smart Geo daydreamers) they think - potentially - about GH but they are rejecting it for more than obvious reasons: our job is 1% about the smart thing and 99% about the structured aspect of the smart (or stupid thing).
Back to that "hangar" : The primary role of this GH definition provided herein (and hopefully some future updates) is NOT to outline some academic solution (via some abstract collection of pipes/lines/points/surfaces) ...but to place in 3d space - properly structured - all the real-life (hmm, he he) bits that can compose the actual project. Of course if the bits could be parametrically driven assemblies ...well...you get the gist of the message.
All in all: I think that Engineers who are GH skeptics could see GH with a totally new perspective if, say, a collection of similar examples/test cases could be available for demo/evaluation/whatever > Ah! at last : this appears to be a real thing > what software did it? > say it again - Grass Components you said? > what sort of name is this? ... etc etc etc.
But since a similar development is quite expensive (and requires a team of several gurus), maybe this is rather a future potential task for the GH/Rhino people if they think that the AEC market segment could be beneficial for their products. Combine a similar capability with tools like yours and/or Evolute (planar quads are "a-la-mode" these days).
PS: forget trivial stuff > what about Stefanie? (plan B : better something than nothing)…
e case pictured already: don't bother how this truss is made and never mind that the def attached looks like an "add-on" (no components) - because it could be (so don't get stuck on that, it's irrelevant). In fact since the critical part (the 99% of the whole) if only doable with code ... it makes sense to do the rest with code as well (but that's my personal preference anyway, he he). Note: Balls are excluded from the demo.
You can toggle what "class" of struts is gonna being made with these booleans:
You can vary the sliders and if the code thinks that you make a valid input ... it obeys, he he.
But the big questions are:
1. Can you work with this in some interactive way? I mean vary any slider and ... wait ... for some change. Although the MERO components here are created ONCE and then placed around (minus obviously the tubes) ... they are placed as copies of the "donor" object (not instance definitions) creating a vast "pool" of "unnecessary" data.
2. What happens if you bake these little thingies? What file size you get? Is it OK?
But the bad news are that as I said ... this is ... NOT a task for a novice ... nor you can handle this get-a-truss-and-make-a-MERO-thing goal with half-measures: either you should do it properly ... or abandon ship.
NOTE: Load R file first (nothing is internalized).
Moral: even if this was made with components ... it wouldn't serve much.
best, Peter…
H are automated by using them as an ActiveX, the C# script object fails on the simplest tasks. That is, when initiating Rhino and GH externally (as by the following C# code):
Rhino5Application rhino_app = new Rhino5Application();
dynamic grasshopper = newRhino.rhino_app.GetPlugInObject("b45a29b1-4343-4035-989e-044e8580d9cf", "00000000-0000-0000-0000-000000000000") as dynamic;
The following very simple C# script component fails because it cant cast its input:
The c# code at the component is only:
Line 89 is simply casting of the input. Clearly, this makes the usage of C# component, under automation, impossible which is a major loss.
As said, when initiating Rhino and GH manually , all works well as in the following:
Any ideas why it misbehaves under automation (as an Active X ) ?
I added the gh file of this example.…
f my list.I don't understand why, but I guess I must be too young user ^^In the original list, i have a path {0;0;0;4} with two index and after the random node, {0;0;0;4} has 88 index.Items are not correct?I would have a comparable structure has the right list on my jpg (photomontage...)How I can do that?Thank you in advance
…