. Point, Curve, Surface, Brep, Mesh, Box and the generic Geometry parameter. This means that you can have an actual object in a 3dm file that can be associated with a Parameter. When the object changes, Grasshopper will respond to this and update as well.
Other parameter do not support this feature. Line, Circle, Arc, Vector and Plane for example do not. You cannot reference a Plane or a Vector because Rhino doesn't really have these kinds of objects. You cannot reference lines, circles and arcs because they are not guaranteed to stay lines, circles and arcs. You can scale1D a circle for example and turn it into an ellipse. The Circle parameter in Grasshopper cannot store ellipses, so it would result in a weird error. This is why all curves must be imported using the Curve parameter, even when those curves are lines, rectangles, circles or arcs.
Points are special though because they are a bit more complex. A Point parameter in Rhino can store 3 kinds of different points. A point can be just a single coordinate (x,y,z), it can be a referenced point object and it can be a point on a curve. So when you go to set one point via the Parameter menu:
you'll get some extra options in the Rhino command line. It will look something like this by default:
and when you click on the 'Type=Point' text, you'll get all 3 options:
Depending on which one you pick, you can either select a Rhino point, or click anywhere in the Rhino viewport or click somewhere on a Rhino curve.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
.
1. How do I refer to the points in the for loop?
I have a list of points in grasshopper (not rhino objects) and I plugged them into python and named the input 'points'.
Then I had something like this:
for pt in points: ptCoord = rs.PointCoordinates(pt) x = ptCoord[0] y = ptCoord[1] z = ptCoord[2]
But I got error report in the bolded line saying
Parameter must be a Guid or string representing a Guid
2. How do I match multiple data to one
I know it's weird since the script can't read the points.. but sometimes the 'Distance' rhinoscript does work... however, it's giving me a single distance while I need a list of distances from multiple points to a target point
for pt in points: distance = rs.Distance(targetpoint,pt)
print distance
I don't know why it worked (it gave me a number so it seems to be reading the points).. However, it's giving me one single value. Is there anyway I cold make it a list?
3. This is extra.. but the ghpython doesn't fully work on my computer and it's weird..
It's ok if you guys completely ignore this question..
I just can't add new ghpython component to my computer.. Every time I tried to duplicate existing components, it gives me an error report saying it's missing the plug-in "python interpreter".. Also, even though grasshopper can successfully open this particular file that I'm working on, it gives me an error report and quit loading ghpython component every time I try to open another file containing ghpython..
I downloaded my ghpython from food4rhino, which works fine in my classmates' computers... I 'installed' (drag the ghpython into grasshopper) multiple times but it still doesn't seem to be working
Then I downloaded IronPython because some say it might work? But it didn't..
Thank you guys so much for this!…
s well you are searching some approximation ( a "mean"): say the hole that KPF did on top on that famous building? On the other hand there's always Plan Z: what SOM did in Dubai (Burj Khalifa).
2. Or you have a repertoire of possible shapes in mind and you try to find the most "effective" one? This requires some custom code (although apparently not required) in order to manage the variants (otherwise you'll get lost in a sea of parameters).
3. But even if this, this and that are on hand ... by what means can you measure/evaluate the cost VS benefits? I mean that (supposedly) a "curvy" surface MAY yield less lateral forces ("proportional" to tower's height as well) ... but if it costs an arm and a leg (most probably, see 4 as well) ... "stiffening" the LBS MAY yield a better solution (budget wise).
4. But even if this, this and that are on hand ... cost analysis is in the end of the pipeline (when in the final level of study) meaning that in 99.9999% of cases it's toooooo late for any meaningful change/variation.
In a nutshell this is a very challenging problem not due (mostly) to the wind effect but primarily due to the holistic approach required for keeping variants/alternatives (and their real-life cost) in some kind of "fitness".
If this is a real-life project and you are not very experienced with, say, C# (or other) ... i WOULD STRONGLY RECOMMEND to avoid that kind of puzzles (obviously having in mind real-life, real-money, real-buildings, real-studies etc etc etc).…
nput is the aproximate parralellogram (incrv), the centroid (inPt) of the new parralellogram and an offset distance (dist) (to create a hollow section)
I'm new to grasshopper en VB-scripting. As intuiative grasshopper seems, so complex seems VB to me... So far I was able to make an offset of the curve, make a brep of the incrv and the offsetted curve and determine the centroid of that brep. The only thing I still need is to move the vertex of the incrv so I can make a recursive loop until the centroid of the brep coïncides with the inPt.
I'm confused of all the different types of curves and the different actions you can do with them, for example I can move the vertex of an onnurbcurve but I can't offset it. I can offset an oncurve but I can't move a vertex of it...
can anybody help? this is what I have so far (working with oncurve):
Private Sub RunScript(ByVal inCrv As OnCurve, ByVal inPt As On3dPoint, ByVal Dist As Double, ByRef A As Object, ByRef brepout As Object, ByRef cen As Object, ByRef area As Object)
Dim Normal As New On3dVector(0, 0, 1)
Dim outCrv() As OnCurve = Nothing
print("1ste punt: " & incrv.PointAt(0).x & ", " & incrv.PointAt(0).y & ", " & incrv.PointAt(0).z)
RhUtil.RhinoOffsetCurve(inCrv, Dist, inPt, Normal, 0, 0.1, outCrv)
Dim allCrv(1) As OnCurve
allCrv(0) = inCrv
allCrv(1) = outCrv(0)
Dim brep(0) As OnBrep
rhutil.RhinoMakePlanarBreps(allCrv, brep)
brepout = brep(0)
A = allCrv
Dim mp As New OnMassProperties()
brep(0).AreaMassProperties(mp, True, False, False)
cen = mp.Centroid…
Added by piet lelieur at 7:17am on August 23, 2010
tman = new RhinoList<Curve>();
cartman.Add(x);
cartman.Add(y);
cartman.add(z);
now, in wanting to join these curves im using code similar to whats below.
Curve[] kenny = Curve.JoinCurves(cartman);
so far so good. But here is where the problem starts. If i pass the join curve out of the C# node i get 1 polyline curve, which is great. But within my node I have a Curve array with 3 elements in it.
What im trying to do is get the bounding box of the closed curve (ie something similar to below
BoundingBox test = kenny.GetBoundingBox(Plane.WorldXY);
but i cant call the "GetBoundingBox(Plane.WorldXY)" method on a Curve[]. i can only call it on a Curve type (ie not an array of type Curve)
How do i convert my array of three curves (that i thought were joined?) into an object that i can be the 2 dimensional bounding box of?.... I need to complete this operation within the current C# node, because it will be a piece of info for another method, but im stuck right here on this one.... Help!?…
rectly except for the first material in a series. See attached image... Here is my code:
Private Sub RunScript(ByVal M As Object, ByVal C As Color, ByRef AddName As Object, ByRef AddMat As Object, ByRef AddBool As Object, ByRef baseName As Object, ByRef newMatName As Object)
Dim z As String = "newMatName" Dim y As String = "BaseName" Dim x As Integer = 0 Dim nRestore As String Dim mTemp As Rhino.DocObjects.Material
mTemp = CType(M, Rhino.DocObjects.Material) y = mTemp.Name Dim nTemp As String
If mTemp.Name.Contains("_MOD_R") = False Then
nRestore = mTemp.Name nTemp = mTemp.Name & "_MOD_R" & C.R & "_G" & C.G & "_B" & C.B mTemp.Name = nTemp z = nTemp mTemp.DiffuseColor = C
If Doc.Materials.Find(nTemp, True) < 0 Then
Doc.Materials.Add(mTemp) x = x + 1 AddName = nTemp AddMat = mTemp
End If
mTemp.Name = nRestore
End If
newMatName = z
AddBool = x BaseName = y
End Sub
1) I have checked that all of the materials I am calling by name exist in the document and that data matching is correct. There doesn't seem to be anything special about the offending material except that it is always the first material that was added to the document by my script.
2) The main thing I was missing in the previous script was the "doc.Materials.Add()" -- how on earth should I have known that existed? Even a search for "doc.Materials" in the Rhinocommon SDK doesn't turn that up. I'm having a very hard time using the SDK to my advantage, it seems not to correlate to the actual code I need to write.
2b) Perfect example... now I am trying to rewrite my other component (which exposes all of the document materials) to set a few objects manually in Rhino with the Materials I want to use as templates. Now I am trying to find out how to access the material assigned to an object. Seems easy, but it's clearly not a Property, and I can't find an appropriate Method in either the Objects or Materials classes.
3) One of my problems originally, when feeding the component one material and multiple colors, was that the nTemp variable was not resetting properly for the second color. Same thing if I duplicated the material to match the list of colors. It would create a material on the first pass but concatenate "_MOD_R_G_B" in each subsequent pass and be caught by my String checker. Why is that? I thought that the nTemp Name variable would be reset in each pass by the line "mTemp = CType(M, Rhino.DocObjects.Material)" and "nTemp = mTemp.Name" combination.
Does the mTemp material somehow carry over its properties in each successive pass? That's why I added the nRestore to be sure each pass reset the name back to the original.
Still, I wonder if there is some problem with the way I am conceptualizing this that is causing the first material to be the same as the input material.
Thanks for your help on this...
Cheers,
Marc…
o está dirigido a estudiantes de arquitectura y diseño de interiores, recién titulados y profesionales interesados en el software o que necesiten conocer las herramientas básicas de las que dispone el programa en los diferentes ámbitos y cómo enfocarlas a arquitectura.
Descripción:El contenido del curso enseñará a utilizar el programa de diseño Rhinoceros 3D aplicando su metodología de trabajo en el campo de la arquitectura, básandose además de la creación de pequeños elementos paramétricos para controlar el diseño y acabar renderizando las geometrías 3d con V-Ray para Rhino.
El curso consta de 3 módulos de 12h de duración cada uno (que pueden realizarse juntos o por separado) en los cuales se profundizará en herramientas de Rhino, Grasshopper y V-Ray a medida que se realizan casos prácticos sobre proyectos arquitectónicos.Se pretende establecer un sistema de trabajo eficiente desde el inicio del modelado hasta la posterior creación de imágenes para documentación del proyecto.
Módulo Rhinoceros Arquitectura:• Conceptos básicos e interfaz de usuario Rhino• Introducción al sistema cartesiano en Rhino• Clases de complejidad de geometría• Importación/exportación de archivos compatibles• Topología NURBS• Trabajo con Sólidos• Estrategias básicas de Superficies• Introducción a Superficies Avanzadas
Módulo Grasshopper:• Conceptos básicos e interfaz de usuario Grasshopper• Introducción a parámetros base y componentes• Matemáticas y trigonometría como herramientas de diseño• Matemáticas aplicadas a creación de Geometría• Introducción a listas simples• Análisis de Superficies y Curvas• Dominios de Superficies y Curvas• Panelado de superficies• Manejo de listas y componentes relacionados• Modificación de panelados en función de atractores• Exportación/Importación de información a Grasshopper
Módulo V-Ray para Rhinoceros:• Conceptos básicos e interfaz de usuario V-Ray• Vistas guardadas• Materiales V-Ray• Materiales, creación y edición• Iluminación (Global Illumination, Sunlight, Lights)• Cámara Física vs Cámara default• Canales de Render• Postprocesado básico de canales
Detalles:Instructores: Alba Armengol Gasull y Oriol Carrasco (SMD Arquitectes)Idioma: CastellanoHorario: 22 JULIO al 26 JULIO 2013 // 10.00 – 14.00 / 16.00 – 20.00Organizadores: SMDLugar: SMD lab, c/Lepant 242 Local 11, 08013 Barcelona (map)
Software:Rhinoceros 5Grasshopper 0.9.00.56V-Ray 1.5 for RhinoAdobe Photoshop CS5Links de versiones de evaluación de los Softwares serán facilitadas a todos los asistentes. Se usará unica y exclusivamente la versión de Rhino para PC. Se ruega a los participantes traer su propio ordenador portátil.
Registro:Modalidad de precio reducido por tres módulos 275€Posibilidad de realizar módulos por separado 99€…
looking to achieve is to replace every 25 value in a list with 0, 40 with 1, 15 with 2 and 60 with 3. This is what I have so far:
listArray = x
searchList = y
writeList = z
for n, i in enumerate(listArray):
if i == searchList[0]:
listArray[n] = writeList[0]
elif i == searchList[1]:
listArray[n] = writeList[1]
elif i == searchList[2]:
listArray[n] = writeList[2]
elif i == searchList[3]:
listArray[n] = writeList[3]
a = listArray
Any help appreciated,
Cheers,
…