Mesh split
Mesh a Complex Terrain - URGENT
(Unfortunately I don’t have more time today so this is todays last post from me)
The (this) plugin is just a “patch” maker. It doesn’t take breaklines or holes into account, but I am working on another tool that does that (But that tool can’t handle massive amounts of curves that are overlapping and bad, but this tool can )
Here is the mesh in v5 format if you want to take a look at it.
RayShoot, MeshRay
Hi @dale,
Would it be possible to expose the MeshRay functionality as RhinoScript method for V7 ?
It has a potential to speed up a lot of tools we have that currently rely either on mesh/line intersection or PointPick but have to filter out all the results just to get the first ray bounce, which is what I am after 99% of cases.
thank you,
–jarek
Rhino block editing appareance
Hi everyone, i have one question, is there any way to customize the view of block editor in Rhino 6 so it looks like the one in Rhino 5? I liked the fact that you could see the block from any place in the model.
This is how i want it to look, i can see the block no matter what objects are in front or behind
This is what i get in rhino 6, with some objects covering the block
Rhino block editing appareance
Rhino block editing appareance
It worked! I love you, you are my hero <3
What's the analog of VB "Public SomeVariable1, SomeVariable2" in Python?
I need to keep the values of my variables for other scripts to use.
Access persistent data
@DavidRutten and @TomTom thanks for your replies.
I tried modifying my code to listen listen to when the input parameter has expired but, the event does not seem to be triggering, and I guess that is do to the fact of the order of computation both of you have mentioned. So does this check have to be async?
Here is the new code
private void RunScript()
{
GH_Component comp = null;
for (int i = 0; i < GrasshopperDocument.Objects.Count; i++)
{
if(GrasshopperDocument.Objects[i].Name == "Environment Dimension ")
{
comp = GrasshopperDocument.Objects[i] as GH_Component;
Print("Component name:" + " " + comp.Name);
param = comp.Params.Input[0].Sources[0] as GH_PersistentParam<GH_Integer>;
Print(param.Name);
// subscribe event
param.SolutionExpired += Param_SolutionExpired;
break;
}
}
}
// <Custom additional code>
GH_PersistentParam<GH_Integer> param = null;
GH_Structure<GH_Integer> persistentData = null;
private void Param_SolutionExpired(IGH_DocumentObject sender, GH_SolutionExpiredEventArgs e)
{
// Assign persistent data value
persistentData = param.PersistentData;
Print(persistentData.ToString());
Component.ExpireSolution(true);
}
Also just as a prove of concept I generated a small event handling code to just make sure I was not missing something obvious. As soon as it recognizes an input value of 2 it will fire the event.
private void RunScript(int x, ref object A)
{
RecogniseNum2 rec = new RecogniseNum2();
rec.foundNumber2 += rec_checking;
rec.Check(x);
}
// <Custom additional code>
private void rec_checking(object sender, EventArgs e)
{
Print("Found number 2");
}
public class RecogniseNum2
{
public event EventHandler foundNumber2;
public void Check(int x)
{
if ((x == 2) && (foundNumber2 != null))
{
foundNumber2(this, EventArgs.Empty);
}
}
}
So what I am suspecting is that maybe its something along the lines of async event patterns?
if it is I have not yet dealt with async programming, just read some stuff about it.
What's the analog of VB "Public SomeVariable1, SomeVariable2" in Python?
Python doesn’t have really a concept of hidden/private variables (other convention-based approach).
If you have a script somecode.py
that has in the top scope a variable called some_variable1
, then in othercode.py
you can
somecode.py:
some_variable1 = "Hello"
othercode.py
import somecode
print(somecode.some_variable1)
Assuming you have proper directory structure and everything can be found by the interpreter.
Is there any way to reference a .hdri file on the network for an environment?
That is fine, we don’t use textures anyway.
But does this mean that if I un-check this, I’ll never be able to use textures, or does it mean that actually we can use textures and they will always be referenced from their original locations on opening the file too (which would actually be a bonus, because that’s how both Max and Blender works, and that’s how we like to work)?
Rhino Inside Unity
Thank you for the answer.
But there is a problem with other data structures.
Point3d type is loaded without problem, but Pointcloud data structure searches for other dll from c++.
Is it solvable somehow?
Is there any way to reference a .hdri file on the network for an environment?
It means it won’t embed the textures in the file. I haven’t used that feature in a while, but I had a lot of bad experiences with it, where the materials would sooner or later lose track of the textures and wind up pointing to some file with a GUID for a name in some temp folder that doesn’t exist.
Ring! Help!
What makes StackOverflow so great is that you can probably find the answer you’re looking for without asking a question at all. Even well formulated questions will get no respect if they have already been answered because it’s considered rude and ignorant to not bother searching first. Poorly formulated questions generally cannot be answered easily, if at all, without extensive dialog and hand holding.
Unfortunately, just ignoring poorly formulated questions often results in the clutter of duplicate threads, all poorly formulated. That StackOverflow doesn’t tolerate such nonsense is precisely what makes it such an excellent and efficient resource.
Distribution with limited randomness
Hi @vcube,
were you able to run the script with the min.distance option using the definition from the RandomPoints.txt provided from Micha? The link doesn´t work anymore… Could you please reupload it?
Rhino Dark Theme
these colors are handled by windows and don’t seem to be easily changeable in windows 10. You’ll have to dive into the register settings:
Distribution with limited randomness
… here some old tools, the FiveOClockShadow.rhp is for Rhino 5 and copy random objects to a polysurface.
Points2Surface.txt (5.4 KB)
Copy2Points.txt (406 Bytes)
FiveOClockShadow.rhp (20 KB)
Export Layers to STP/STEP
Thank you for the fast response, Helvetosaur. Actually, I was looking for a way to pass the layers into only one stp-file.
I know that it works, if one creates as many blocks as layers, then puts the objects of each layer in the corresponding block and then does the export as stp-file. However, I am looking for a way to do this tranformation (i.e., Create block from layer and name the block with the layer name) automatically for all layers. I found a Rhino script (see https://www.modelical.com/en/pack-rhino-objects-one-block-per-layer-scripting/). This script does the transformation, but it gives a syntax error at a certain line (line 41, as far as I remember). The exported stp-file seems to be ok, but I am not sure, due to the mentioned syntax error. How can I correct the Rhino script, so that everything works without a syntax error?
Create a grasshopper component failed
According to your guidance information, I finally modified it successfully! thank you very much!
Ring! Help!
== WHAT? ==
What active forum members which are skillful of a service or a product often are unaware of, is that first time posters may not in fact know what to search for. Assuming that fact (which should be assumed) it matters in what tone - or lack of carefully crafted tone - the new poster is informed about the drill.
== OPS! ==
New forum members also may (almost always) not notice the forum recommendations. I have also missed this while learning to crawl. Not because people willfully ignore them, but because they just didn’t notice them. Perhaps because they are consumed by (focused on) their own problem, which is not the same problem which the helpful forum members (like you) experiences daily, like seeing the same kind of “mistakes” being done over and over again while in reality an individual (1) first time poster only typically formulate this one (1) “less than optimal” question only once (1)). Again, typically only once (1).
== SMARTEST KID ON THE BLOCK ==
Some people are not smart enough - although they really do think that they are very smart - to figure out that it is not the same individual intentionally trying to wear the more skillful forum members out by doing the same mistake over and over again after being directed to useful guidelines.
== BAD INTENT ==
Which brings us to another point: The first time poster making a typical first tentative attempt to get to grips with a problem are NOT addressing you personally. They’re not (they probably don’t know that you exist) and. They are not attacking you and they are not intentionally provoking you. They just have not yet learned the drill. Which is why the forum shows an extra text on top of the post informing when a new user is just that, a new user, which is a message for existing members to take it a little easy, to be extra careful and generous. Sound judgement tries to regard good or bad intent.
== NOPE ==
They do not intend to provoke you or offend you, no.
// Rolf