tically give you back all the items of the list. However, if you give it a list of lists (as you are in this example) it doesn't know to extract the items in the internal lists. The script I suggest simply reinterprets each list as a single item, and relies on the component data processing to split out the items list by list. This also has the advantage (over 筑梦NARUTO's solution) of keeping each list in its own grasshopper data tree branch.
If you'd rather avoid the clunkiness of a second script component, you'll have to compose a datatree yourself. That will look something like this:
import math as m
import Rhino
from Grasshopper.Kernel.Data import GH_Path
from Grasshopper import DataTree
pi = m.pi
angle =0
pts = DataTree[Rhino.Geometry.Point3d]()
c=0
for i in rs.frange(0,5,0.5):
angle +=(pi/30)
layer = []
for j in rs.frange(0,2*pi,pi/15):
x= 5*m.sin(j+angle)
y= 5*m.cos(j+angle)
layer.append( Rhino.Geometry.Point3d(x,y,i))
pts.AddRange(layer,GH_Path(c))
c = c+1
a = pts
…
to explain the ultimate goal in case it helps to clarify. I have all the elements i need now to pull this together thanks to your help, as you say most critical things are already implemented or not relevant to this particular thread. With your fret generator and equal spacing generator and my primitive convoluted solution for compound radius fretboard i have everything i need but need some time to cleanly implement and pull it together now.
as to your questions/coments:
1/ I don't care about Excel files in this context. The SIMPLE solution is to just copy/paste sets of string gauges into as many panels as you need and switch between them.
this was just to explain that ultimately there are a lot of different input patterns but all the data for them does already exist. for sure it is not necessary but in the end it's a feature i would like to implement since it will make the patch much more practical.
2/ What are "scale length low E string" and "scale length high e string"? Are they the actual string lengths of the bass and treble strings?
This is the initial decision taken by the luthier: which scale lengths to use for the multiscale build. While anything that makes sense goes here luthiers will probably want to choose some common values, say 24.75" (like most Gibson guitars) or 25.5" (like a Fender Stratocaster)
P.S. I did the rotations at the points where the treble string intersects the virtual bridge and nut (blue lines), so rotation has no effect on its length.
P.P.S. In case it isn't obvious, rotation has no effect on string spacing either.
This is the kind of things i don't know cause i'm zero in maths and i usually have to try out and measure to know for sure :-) as i said my initial instinct would have been to rotate around the 'zero frets' center point simply because everything is built aroun d the X axis. If you rotate around the treble string (the high e string) would the distance of the upper fretboard edge to the x-axis be the same than from the lower fretboard edge to the x-axis ?
for running data through panels, thanks for the tip, i do this mainly to visualize the values without having to hover over the outputs, good to know i shouldn't patch them onward from the panel.
PS: For the height of the strings above the fretboard (the 'action'), it's not as complicated as it sounds and most of the time an experienced luthier or guitar tech will have no problem achieving whatever low action desired if the neck is straight and built properly and the frets level and dressed properly. there's a german company who's built a machine to do the 'perfect setup': the PLEK machine
i'm sorry it takes me much longer to digest and implement all this, i will post back when i've merged everything together but i think i have evrything so far
…
hit Commit.
I'm wondering how hard it would be to have an edit box which shows the
number the user could click inside of then type in a new number, then
hit enter. :)
2) How would I go about using one line from a table and assign each
field to a variable? Then, move a slider or something and use the values
from the next row?
background: I'm recreating elbows, Tees, and other fittings using
paramatric scripts, then baking and exporting them. Here's one source
table, http://www.wardfittings.com/Assets/PDFs/0902CatalogColorOld.pdf
page 5, the uniform elbows.
Current Setup: the attached ghx file. Create a point at 0,5,0 in a blank
document with units set to inches, then assign that point to the top
left 'Center Pnt' in the ghx file.
Current workflow:
a) Modify variables A, B, H, and Nominal Dia to match one line from the
table in the linked PDF file, page 5, table of regular elbows.
b) Select the 'Nodes' and 'Surfaces' with a drag box
c) Click 'Bake'
d) Switch to Rhino window, do the 'sellast' command.
e) Drag baked objects along Y axis so the center point is at 0,0,0
f) Run 'Join'
g) Run 'Cap'
h) set the 'node' points to a layer called 'nodes'
i) set the surface to a layer called 'fit-3d'.
j) select the surfaces and nodes
k) export selected
This elbow that I'm doing only has 12 rows, so doing it the above method
doesn't take THAT long. I'm also going to be doing a couple with larger
tables like the Tee on page 8, and in other spec files. As you can
imagine, entering in EACH value into a slider is a bit tedious.
I'd love to take the pdf table, run it through an OCR program to convert
to excel, modify the headers so the ghx script knows what they are, then
paste it into grasshopper, or save it and have grasshopper read it, and
I be able to move a slider or something to to select one line at a time.
Has anyone done something similar? ie: assigned one row in a table to a
predefined set of variables, each variable coming from one field in the row?
Thanks for taking the time to read this message. :)
I'm making a rhino script to do steps d-k, so that part will be much faster.
-Suthern…
’s mid-point and whose direction is perpendicular to that edge. The following images are a summary of how I’m currently doing this. Keep in mind that the shared edge is not always parallel with the x, y or z axis… in fact it usually isn’t.
This is the vector I'm trying to get...
This is my workflow:
1- Find centroids of surfaces...
2- Find mid point of the edge. The for each surface, create vector from mid point to centroid and also reverse the direction. Place a point at the end of each vector...
3-Test to see which of the two points for each surface is contained within each surface's boundary and select that point (this parsing is necessary in some cases depending on the shape of the surfaces)...
4-Here is the kicker. In cases where one or both surfaces are skewed, the centroid of that surface is not necessarily "perpendicular" to the mid point of the edges as evident here with surface B. So I create a plane (technically its a "frame") that is perpendicular to the edge...
5-I then pull both points to that plane...
6-From there its pretty straight forward as far as getting the required vector...
So is this the best way to do this. In particular I'm curious if there is an alternative to step 4, but really any comments are welcome.
Thanks,
cbass…
is a tour through the different workshops we have organized in theTPceu from September 2010 when we started with this initiative.I take this opportunity to thank you all for your participation directly or indirectly to make all of this possible.
La exposición consiste en un recorrido por los diferentes talleres que hemos organizado en el TPceu desde septiembre de 2010 que arrancamos con ésta iniciativa.
Aprovecho para agradeceros a todos vuestra participación dirécta o indirecta para conseguir que todo ésto se haya hecho posible.
Organization: Pablo Delgado, Andrés Velasco Muro, Jaime Díaz Álvarez
more info at TP ceu…
urve. In this Curve I have defined the points, I exploded the segments and have added a Perp Frame on the ends of each segment.
Oriented on each Perp Frame I have created a Rectangle from which I have drawn a Box Rectangle.
Each 'other' (odd or even, or each 'second' rectangle in the list) of these rectangles needs to get a negative length value so it doesn't point outward of the curve, but instead so that it has it's length perpendicular to the segment.
So, eventually I want to make it so that each segment has a Box Rectangle placed on it's outermost point, pointing inwards. Half of these Box Rectangles is already oriented in the right direction, but I don't know how to single out half of them, or construct two lists with the 1st, 3rd, 5th, 7th, etc. and the 2nd, 4th, 6th, 8th etc.
I have added screenshots, I am making this as a personal project for a school project on the Art Academy and am really eager to learn to master this Grasshopper a bit more.
Before trying to do it this way, I tried to do it with Sweep1 Rail, but could not get the orientation along the segment, and also I didn't manage to find out how to limit the Sweep1 Rail to a certain distance (like 30mm for example).
I had imagined this should be done by projecting a second line of 30mm from a segment outer end inwards from both sides and using this second 30mm long line to put the Sweep 1 Rail on. Then I could close the ends, do a Union, Merge all Faces and be done.
However, I couldn't figure it out and the method I'm trying to solve now has gotten me further down the line of the process.
The next step in my process will be to be able to generate a structure on a point of a curve where I can project a certain shape on. Then I want to export this collection of shapes as an STL and 3D-print them. (I have built 2 3D-printer all by myself).
The parts are connectors to connect cheap aluminium extrusions together with minimal effort so I can start prototyping a shape for a small carriage I am designing.
If my explanation is unclear, please tell me, I am new to this, and my mother-language is Dutch, so mathematical terms are a bit difficult for me to understand, but please do use diffcult terms in an explanation where needed. I can only learn :)
Hi from a very happy new user of Grasshopper!
…
controlled by the brightness of the image and size of the diagrid panel is controlled by lunchbox). The frame surrounding each window is then extruded to shade the window within. The extrusion distance for the diamonds' 4 points are controlled by 4 sliders (one for each point).
My goal is to find the total radiation of the windows using Ladybug (or DIVA) and then use Galapagos to adjust the frame extrusions to optimize them to best shade the windows. However, in order to obtain an effective pattern for shading, I need to be able to move the 4 control points independently for each panel... So instead of adjusting all of the panels at once, I need to control each panel extrusion on its own.
First off, I'm not sure how to control each panel independently. Secondly, I'm afraid this will result in far too many sliders for Galapagos to handle (especially once it's applied to the scale of a facade). I tried using a random number generator for each point (which kept the slider count to only 4), but Galapagos was unable to identify any trends in this method (because it was entirely random) and thus could not optimize the extrusions. I think the most probable solution may be to limit the quantity of possible outcomes by making an index of pre-baked shapes (let's say 10 different frame types). Then, setting up a script that allows Galapagos to "plug-in" each different frame, at each different panel on a facade until it finds the ideal pattern. I'm not sure how to go about doing this either... specifically in a non-random way that will allow Galapagos to identify trends. Maybe by using hoopsnake?
I've attached my grasshopper definition. Any suggestions would be greatly appreciated!
…
Added by Caleb Wild at 12:20pm on February 14, 2015
deform into rhombic dedocahedrons when they reach equilibrium.
http://mathworld.wolfram.com/CubicClosePacking.html
I was trying to model sphere lattice constrained within a boundary box. When inflated, they would not intersect with each other; they would stay in place; and would be malleable just enough to expand and fill in the gaps in between the spheres.
I started off with the help of this thread here(Thanks for those contributed!). As I understood, there was a bug in Kangaroo2. Solver can't handle more than one item plugged in. So I tried to understand David's Stasiuk's Script and adopted it with a few variations, please see gh file attached.
In the first 5 - I've used David Stasiuk's C# component-variable pressure (posted on June 9, 2015 at 12:25am): 'No. 4.5' being the most successful simulation so far(inflation value is kept very low so that they would not intersect);
although I realised I made some math mistake in setting the close packing grid.(could be checked by plugging voronoi3D to see if the area of the rhombic faces are regular)
No. 6-7 I tried with Kangaroo2 components.
After consulting my tutor(Andrei Jipa)'s help, I realised the following changes could be made:
- The definition posted by David on June 8, 2015 at 4:47pm with constant pressure would've worked better.
- Icosahedrons with WbCatmull(Quad divisions) would result in more even load distribution. With wbloop, vertices more concentrated at poles.
- Load in dir Z could be omitted. Andrei has suggested to use lengths(line) in Kangaroo 2 as 'pressure' instead. And I am trying to improve the grid; and maybe try with David's constant pressure definition. I will keep you guys posted of the progress!
I am new to the parametric world, comments/advice very much appreciated! :) Zhini
…
I miss DA.SetData the component gets null while taking the latency , on the other hand if use it the component has two kicks , is there anyway to get rid the first kick?
GH_Structure<IGH_Goo> D = new GH_Structure<IGH_Goo>(); GH_Structure<IGH_Goo> C = new GH_Structure<IGH_Goo>(); protected override void SolveInstance(IGH_DataAccess DA) { bool sw = false; int delay = 0; DA.GetData(1, ref delay); DA.GetData(2, ref sw); DA.GetDataTree(0, out D); DA.SetDataTree(0, C);
if (sw) C = D.Duplicate();
if (delay > 4)
base.OnPingDocument().ScheduleSolution(delay, cullback);
}
private void cullback(GH_Document doc) { var gate=base.Params.Output[0]; gate.ClearData(); gate.AddVolatileDataTree(C); foreach (IGH_Param i in gate.Recipients) i.ExpireSolution(false); }…
Added by Amin Bahrami at 12:00am on February 12, 2016
the other pluggins again, I doubt that problems arise and if I already have them Which are due to the autodesk pluggins that I can install on another computer or mount a virtual machine, but I doubt it, I simply had to install Grasshopper first and then the rest.)
Problem:
Good day, afternoon or night, please help I can not install the Grasshopper plugin 0.9.76.0 in Rhinoceros 5SR13, I do not know if it is because I uninstalled the version of 32 Bit of Rhinoceros and I only have installed the 64 Bit version, I have installed on Rhinoceros 64 Bit:
Autodesk Realtime Renderer 2014 x64 Autodesk Shape Modeling 2014 x64 Autodesk T-Splines 2015 x64 V-Ray 2.00.23938 for Rhinoceros 5 x64 V-Ray Express 2 for Rhinoceros 5
I would infinitely appreciate the resolution to this problem, for the moment I can not think of anything other than to uninstall everything and leave only installed the program Rhinoceros 5SR13 with Grasshopper 0.9.76.0 and nothing more.
I already tried to download another new file from Grasshopper 0.9.76.0, which ruled out that this installer is wrong, what I could do is look for another version of Rhinoceros but I have the newest one or one of the newest versions: Rhino_5.13.60913.21340_x86_x64_Multi. Exe
I understand that the Grasshoper installer is showing me a message where it says there is a Win32 exception where the system can not find the source file, what I do not know is if this exception has to do with the Windows C /: Folder: Windows, subfolder: System32 or I do not know if it refers to that as I do not have the 32 bit version of Rhinoceros maybe the installer gets confused and generates the installation error exception.
Another thing to which the exception is associated is the start process file: Start.nfo or start information.
There is also a programming argument for file upload errors of boolean operations (geometry operators) associated with the platform operating system, a process called child process.
Also appears another note that says the installed package of a plugin called inspector and I do not know what else I can not explain.
I do not know what to do, I just happen to uninstall and install everything and I do not think the Rhinoceros installer has any errors, I have Windows 10 edition of Red Stone 1 of 64 Bit.
Thanks and if anyone had this problem and solved it please tell me how to fix it or if someone knows about programming you can tell me why all those errors or exceptions are.
Greetings, have a nice day, afternoon or night wherever you step or stand or wherever you are sitting or lying down.…