component in GH for a project im working on. as part of that component I want to dynamic show text the rhino viewport but I don't want to have to return a value that I then plug into the "text tag 3d" component. I want to build a similar method into my custom component.
therein lies my problem. I haven't yet figured out how to get my vb code to produce text.
my latest attempt looks a little something like this.
Dim TestPoint3D As New rhino.Geometry.Point3d(0, 0, 0) Dim TestVect As New rhino.Geometry.Vector3d(0, 0, 1) Dim TestPlane As New plane(TestPoint3D, TestVect) Dim TestText As New display.text3d("bob", TestPlane, 10) ListItem = TestPlane TextItem = TestText
but I get nothing out of it.
latest theory is to try using "Draw3dText Method (Text3d, Color)" but this is where ive hit a wall
if I understand how this works than I would think I would code this
Dim TestText As New Rhino.Display.DisplayPipline.Draw3dText( text here, and color here)
but the hint that im getting after "DisplayPipline" doesnt show a "Draw3dText" method?
so im confused?
again my overall goal is to get text to display in the viewport directly through my component
any thoughts or ideas, or if im even in the ballpark on this one would be helpful.
thanks!…
) In the Rhino view port it is not possible to modify it until is backed (and I don't want!) I need to place several images each one in a different place.
2) Is it possible to use another component THAT DO NOT CONVERT INTO BLACK AND WHITE, the pictures??. I need to set COLOR images in a 3D model, using grasshopper. thanks!
Any comment or suggestion would be welcome!!!
Thanks a lot!
…
brep.
I am obviusly doing this in grasshopper (using a image to map the lines with the imagesampler) but this question goes beyond the software. it is more about geometry, I guess.
it involves to unwrape a geometry, but having always continuity from one to an other.
here a image of the concept
You have to keep in mind that the brep (in this case a circular shape) its longer than the shape of the plane. so it is difficult to place them flat in photoshop to paint and create the continuity.
here the images that I am using to map the lines on the geometries. I am using a definition that creates lines from a image black&white like this one
but in order to achive the continuity from the ground to the facade of the building I am thinking that the only posibility would be to use a software where I can paint a gemetry in 3D. LIKE ZBRUSH
but how do I get the map back out and flat to use is correctly in grasshopper?
anyone as any ideas?
Please!!!
THANKS!
HAVE A GREAT DAY!
…
3d voronoi from which i extract a cell for each point. After this i need to compute the intersection between each cell and the surface.
I tried two approaches: one with "Brep|Brep intersection" and then "Curve splitting", and another with "Split Brep".
The first solution works (below) perfectly but the "Curve splitting" phase can be bloody slow! Sometimes it requires more than 1.5 minutes
The "Split Brep" solution (below) is much faster, but for each cell it returns me TWO surface: the one inside the Voronoi cell and the one outside. These are inside a three with a branch for each curring surface. The problem is than inside the branches, sometimes the first element is the inner surface, sometimes it's the outer.
Is there a way to use "Split Brep" and throw away the outer surfaces?
Do you suggest any other method?
Thank you very much, and sorry for my terminology: i've been using GH for 2 days :/…
o express my gratitude. I've been experimenting with your definitions (and still am), but let me extend my question.
Actually what I'm trying to achieve, is to recreate another project by Andrew Kudless, the spore lamp (I mentioned the Chrysalis at the beginning just because of the animation, which wasn't included in the Spore Lamp presentation).
Basically the spore lamp seems to me to be something like a preliminary study to the Chrysalis III project (I think it's a similar approach).
Andrew stated on his site that he used kangaroo for this project, so the Spore Lamp consists in my opinion either of a relaxed voronoi 3d diagram (b-rep, b-rep intersection) on a sphere which then has been planarized, or more likely it is a sort of relaxed facet dome.
The trick is to:
1. obtain a nicely-balanced voronoish diagram (or facet dome cells)
2. keep each cell/polyline planar (or force them with kangaroo to be planar) in order to move scale and loft them later on.
Here is what I have by now. (files: matsys spore lamp attempt)
That's the closest appearance that I got so far (simple move scale and loft of facet dome cells with the amount of transformations being proportional to the power of the initial cell area: bigger cell = bigger opening etc.) - with no relaxation of the diagram. But it's obviously not the same thing as the matsys design.
Here are some of my attempts of facet dome relaxation, but well, it certainly still not the right approach, and most importantly I don't know how to keep or force the cells to be planar after the relaxation.
1. pulling vertices to a sphere - no anchor points. That obviously doesn't make sense at all, but the relaxation without anchor points gives at the beginning a pattern that is closer to what I am looking for. (files: relaxation 01)
2. pulling vertices to a sphere - two faces of the initial facet dome anchored (files: relaxation 02)
3. pulling vertices to the initial geometry (facet dome) no anchor points (files: relaxation 03)
The cell pattern of the lamp kinda looks like this:
you can find it here: http://www.grasshopper3d.com/forum/topics/kangaroo-0-095-released?g...
Done with Plankton (of course without the "gradient increase" appearance), but in fact not, I took a look at Daniel Parker's Plankton example files, and it's not quite the same thing. Also the cells aren't planar...
The last problem is that during the relaxation attempts that I did, the biggest initial cells became enormous, and it's not like that in the elegant project by Andrew Kudless, that I'd like to achieve.
So to sum up:
Goal no 1: Obtain an elegant voronoi /facet dome cell pattern on a sphere (or an ellipsoid surface, whatever).
Goal no 2: Keep the cells planar in order to be able to loft them later and obtain those pyramidal forms, and assemble easily
Any ideas? Or maybe there's a completely different approach to that?…
is set up to manipulate strings into an STL file that is quite different from how Grasshopper defines meshes, in that an STL seems to define each face by XYZ points, Grasshopper wants a single list of all vertex points and then has an allied lists of topological connectivity according to vertex number, so for now I just hacked it to spit out points minus so many duplicates it generates for STL:
Right now it has an internal 3D trigonometric function I added input sliders to control, that creates surfaces that look a lot like molecular orbitals.
So how do I make a mesh? I failed to make a single mesh face from each STL face since AddMesh seems to want a list, so I tried making a single list and matching it with a simple ((1,2,3),(4,5,6),(7,8,9)...) array of connectivity but it hasn't worked yet since the STL list of vertices has duplicates that won't work for Grasshopper and removing the duplicates scrambles the connectivity relation.
After some work on this and seeing the output, I figure I could just randomly populate the mathematical function with points instead, unless it really gives a better mesh result than other routines. I'm not sure what to do with it yet, even if I get the mesh figured out.
import rhinoscriptsyntaximport RhinoPOINTS_CONTAINER =[]POINTS = []class Vector: # struct XYZ def __init__(self,x,y,z): self.x=x self.y=y self.z=z def __str__(self): return str(self.x)+" "+str(self.y)+" "+str(self.z) class Gridcell: # struct GRIDCELL def __init__(self,p,n,val): self.p = p # p=[8] self.n = n # n=[8] self.val = val # val=[8] class Triangle: # struct TRIANGLE def __init__(self,p1,p2,p3): self.p = [p1, p2, p3] # vertices # HACK TO GRAB VERTICES FOR PYTHON OUTPUT POINTS_CONTAINER.append( (p1.x,p1.y,p1.z) ) POINTS_CONTAINER.append( (p2.x,p2.y,p2.z) ) POINTS_CONTAINER.append( (p3.x,p3.y,p3.z) )# return a 3d list of values def readdata(f=lambda x,y,z:x*x+y*y+z*z,size=5.0,steps=11): m=int(steps/2) ki = [] for i in range(steps): kj = [] for j in range(steps): kd=[] for k in range(steps): kd.append(f(size*(i-m)/m,size*(j-m)/m,size*(k-m)/m)) kj.append(kd) ki.append(kj) return ki from math import sin,cos,exp,atan2 def lobes(x,y,z): try: theta = atan2(x,y) # sin t = o except: theta = 0 try: phi = atan2(z,y) except: phi = 0 r = x*x+y*y+z*z ct=cos(PARAMETER_A * theta) cp=cos(PARAMETER_B * phi) return ct*ct*cp*cp*exp(-r/10) def main(): data = readdata(lobes,10,40) isolevel = 0.1 #print(data) triangles=[] for i in range(len(data)-1): for j in range(len(data[i])-1): for k in range(len(data[i][j])-1): p=[None]*8 val=[None]*8 #print(i,j,k) p[0]=Vector(i,j,k) val[0] = data[i][j][k] p[1]=Vector(i+1,j,k) val[1] = data[i+1][j][k] p[2]=Vector(i+1,j+1,k) val[2] = data[i+1][j+1][k] p[3]=Vector(i,j+1,k) val[3] = data[i][j+1][k] p[4]=Vector(i,j,k+1) val[4] = data[i][j][k+1] p[5]=Vector(i+1,j,k+1) val[5] = data[i+1][j][k+1] p[6]=Vector(i+1,j+1,k+1) val[6] = data[i+1][j+1][k+1] p[7]=Vector(i,j+1,k+1) val[7] = data[i][j+1][k+1] grid=Gridcell(p,[],val) triangles.extend(PolygoniseTri(grid,isolevel,0,2,3,7)) triangles.extend(PolygoniseTri(grid,isolevel,0,2,6,7)) triangles.extend(PolygoniseTri(grid,isolevel,0,4,6,7)) triangles.extend(PolygoniseTri(grid,isolevel,0,6,1,2)) triangles.extend(PolygoniseTri(grid,isolevel,0,6,1,4)) triangles.extend(PolygoniseTri(grid,isolevel,5,6,1,4)) def t000F(g, iso, v0, v1, v2, v3): return [] def t0E01(g, iso, v0, v1, v2, v3): return [Triangle( VertexInterp(iso,g.p[v0],g.p[v1],g.val[v0],g.val[v1]), VertexInterp(iso,g.p[v0],g.p[v2],g.val[v0],g.val[v2]), VertexInterp(iso,g.p[v0],g.p[v3],g.val[v0],g.val[v3])) ] def t0D02(g, iso, v0, v1, v2, v3): return [Triangle( VertexInterp(iso,g.p[v1],g.p[v0],g.val[v1],g.val[v0]), VertexInterp(iso,g.p[v1],g.p[v3],g.val[v1],g.val[v3]), VertexInterp(iso,g.p[v1],g.p[v2],g.val[v1],g.val[v2])) ] def t0C03(g, iso, v0, v1, v2, v3): tri=Triangle( VertexInterp(iso,g.p[v0],g.p[v3],g.val[v0],g.val[v3]), VertexInterp(iso,g.p[v0],g.p[v2],g.val[v0],g.val[v2]), VertexInterp(iso,g.p[v1],g.p[v3],g.val[v1],g.val[v3])) return [tri,Triangle( tri.p[2], VertexInterp(iso,g.p[v1],g.p[v2],g.val[v1],g.val[v2]), tri.p[1]) ] def t0B04(g, iso, v0, v1, v2, v3): return [Triangle( VertexInterp(iso,g.p[v2],g.p[v0],g.val[v2],g.val[v0]), VertexInterp(iso,g.p[v2],g.p[v1],g.val[v2],g.val[v1]), VertexInterp(iso,g.p[v2],g.p[v3],g.val[v2],g.val[v3])) ] def t0A05(g, iso, v0, v1, v2, v3): tri = Triangle( VertexInterp(iso,g.p[v0],g.p[v1],g.val[v0],g.val[v1]), VertexInterp(iso,g.p[v2],g.p[v3],g.val[v2],g.val[v3]), VertexInterp(iso,g.p[v0],g.p[v3],g.val[v0],g.val[v3])) return [tri,Triangle( tri.p[0], VertexInterp(iso,g.p[v1],g.p[v2],g.val[v1],g.val[v2]), tri.p[1]) ] def t0906(g, iso, v0, v1, v2, v3): tri=Triangle( VertexInterp(iso,g.p[v0],g.p[v1],g.val[v0],g.val[v1]), VertexInterp(iso,g.p[v1],g.p[v3],g.val[v1],g.val[v3]), VertexInterp(iso,g.p[v2],g.p[v3],g.val[v2],g.val[v3])) return [tri, Triangle( tri.p[0], VertexInterp(iso,g.p[v0],g.p[v2],g.val[v0],g.val[v2]), tri.p[2]) ] def t0708(g, iso, v0, v1, v2, v3): return [Triangle( VertexInterp(iso,g.p[v3],g.p[v0],g.val[v3],g.val[v0]), VertexInterp(iso,g.p[v3],g.p[v2],g.val[v3],g.val[v2]), VertexInterp(iso,g.p[v3],g.p[v1],g.val[v3],g.val[v1])) ] trianglefs = {7:t0708,8:t0708,9:t0906,6:t0906,10:t0A05,5:t0A05,11:t0B04,4:t0B04,12:t0C03,3:t0C03,13:t0D02,2:t0D02,14:t0E01,1:t0E01,0:t000F,15:t000F} def PolygoniseTri(g, iso, v0, v1, v2, v3): triangles = [] # Determine which of the 16 cases we have given which vertices # are above or below the isosurface triindex = 0; if g.val[v0] < iso: triindex |= 1 if g.val[v1] < iso: triindex |= 2 if g.val[v2] < iso: triindex |= 4 if g.val[v3] < iso: triindex |= 8 return trianglefs[triindex](g, iso, v0, v1, v2, v3) def VertexInterp(isolevel,p1,p2,valp1,valp2): if abs(isolevel-valp1) < 0.00001 : return(p1); if abs(isolevel-valp2) < 0.00001 : return(p2); if abs(valp1-valp2) < 0.00001 : return(p1); mu = (isolevel - valp1) / (valp2 - valp1) return Vector(p1.x + mu * (p2.x - p1.x), p1.y + mu * (p2.y - p1.y), p1.z + mu * (p2.z - p1.z)) if __name__ == "__main__": main() # GRASSHOPPER PYTHON OUTPUTPOINTS = rhinoscriptsyntax.AddPoints(POINTS_CONTAINER)POINTS = rhinoscriptsyntax.CullDuplicatePoints(POINTS)…
bsp;
-Vehicle elements (3D objects and a component for custom vehicles; models from Google Warehouse)
-Traffic Velocity Graphs, drawn on every trajectory curve (allow custom graphs drawn)
-Traffic regulation elements (such as Traffic Lights and Stop Signals) and traffic density
-Particle Systems on trajectory curves, just to manage the traffic regulations and avoid collisions based on security distances
-Traffic Vehicle Animation Modes (Dots, Bounding Boxes or complex Meshes with attributes for final rendering (Giulio Piacentino´s Render Animation)
-Vehicle Lights and Vehicle Sights, to make visual studies
Team:
-Sergio del Castillo Tello (Doctor No, lead programmer)
-Everyone that wants to be involved, support.. these tools
The development of Roadrunner is planned to take part within a Research Group Program at ETSAM (University of Architecture in Madrid); This forum group is created just to test the interest of the community, while we keep on developing (it is still being tested), probably we will share the whole thing in the future. Cheers!
Traffic Cluster Scheme
Traffic Elements
Traffic Urban Systems
Vehicle Elements
Roadrunner - overview
Roadrunner 0 Basics
Roadrunner 1 Modes
Roadrunner 2 Elements
Roadrunner 3 Urban Systems…
3 arms and 6 legs (PS: Remember: in real-life our fee is proportional to the budget > thus > like Godzilla > the bigger the better).
In the mean time (auto detection of struts < min Allowed == true) get the gist of the whole "torque" issue, the other gist not to mention the other-other gist.
Of course you can opt for NOT making the cables (green) that stabilize the "extension" part of a given tensegrity strut ... yielding the Mother in Law syndrome (fat and ugly):
But ... hmm ... well ... are you really the chosen one? Here's your chance for the ticket to Paradise (full Lord's assistance, that is). Identify this engine, name the designer and the related immortal racer (when men were men).
Moral: Heaven can wait. …
ese explanations help (we will also look at your file) asap.
About your question regarding the Tutte graph drawing algorithm (also known as topological embedding):
The Tutte algorithm can be viewed as a special case of Spectral Graph Drawing, which is a mathematical solution for topological embedding formulated as an optimization problem. The formulation of the topological embedding (e.g. as in Tutte algorithm) is in fact quite similar to the so-called force-directed drawing that is often solved by heuristic methods like the one we have made for the SYNTACTIC plugin. You can read more about Force-Directed Graph Drawing (a.k.a. coin-graph drawing and kissing disks drawing) and Spectral Graph Drawing and Spectral Graph Theory in my dissertation.
The functionality of the Tutte algorithm is only guaranteed for graphs that are 3-connected, i.e. graphs with more than 3 vertices which cannot be torn apart unless at least two vertices are removed.
https://en.wikipedia.org/wiki/K-vertex-connected_graph
Speaking of the conditions for the Tutte algorithm to work properly: Practically, this implies, for instance, that there should not be rooms connected only to one other room.
Anyhow, long story short, we have decided to continue with Spectral Graph Drawing and 3D force-directed graph drawing. These algorithms are ready and with a couple of adjustments for maximum speed and stability we will release them shortly. Some conditions for these algorithms are easier to ensure, but in general if a node(room) is connected to only one space or the graph is not well connected one cannot expect a good graph drawing from neither of these methods. The other issue that is also common is that the force directed graph drawing will not work if one forces a big bubble to be squeezed in the middle of smaller bubbles. Stay tuned. …
s.
Yes, I see the issue now. Good catch!I am a bit reluctant to add a new input, as I would have to add it to the "OSM Shapes" component too. Both "OSM Search" and "OSM Shapes" components have more inputs than outputs, so I was kind of more keen to add another output (titleOriginPt), then input. This output can then be used to move the title with Grasshopper "Orient" component.
It's useful to say that: If a terrain has been added to the groundTerrain_ input of the "OSM Search" component, then the title would go below the terrain, which makes it more readable I guess.Let's see how this issue goes, maybe in the end more people will ask for adding a titleOriginPt_ input as well.
For the same thing (not sure about this) maybe a legend with colors for the filtered building types, assuming you can search for more than one at the same time.
This is a very good suggestion! At the moment it is not possible to search for more than one OSM object. I understand the importance of having such feature, but this would require from me to rewrite the "OSM Search" component. Maybe it can be a little less time consuming if a new additional component will be created. So one would have to copy an "OSM Search" component for each type of the OSM object he/she wants to search for, and then outputs from all those "OSM Search" components will drain into the upper mentioned new component which will make a colored legend for each OSM object. Just a suggestion.However there is one issue with all this OSM objects search, that I haven't mentioned: OpenStreetMap data can store amenities of the same type on different shapeType_. For example, in find_hotels.gh we are using shapeType_ = 0 (2d polygons), we make 3d shapes from them, and then we search among those 3d shapes.However, if one sets the shapeType_ to 2 (points) one will also find hotels among the points.It may take a more knowledgeable OpenStreetMap user to explain this, but in general: if a hotel occupies all floors of the building, then it would be found the way we did it in find_hotels.gh (shapeType_ = 0). But if a hotel does not occupy all floors, or a user who mapped the hotel was not certain whether it did occupy the whole building or not, then a hotel would be mapped as a single point. I assume this will be the point of hotel's entrance, but I may be wrong on this.I attached an example file below which shows this.So if there's going to be a new component created: which will map hotels, restaurants, bars... or other buildings types with a legend of some sort, then this aspect needs to be taken into consideration. It can probably be fixed with some sort of point inclusion (in a polygon). Let's see.It's definitively another very valuable suggestion!!…
Added by djordje to Gismo at 5:26pm on March 2, 2017