ake a network of lines (i.e. a graph) and make a Plankton Mesh, from which you can use Cytoskeleton to make a solid mesh (and then smooth it with Weaverbird).
Works with ngons (polygons with 3 or more sides). Other examples I found only worked with tris and quads.
Works on open or closed surfaces
While these examples start with a surface, you could start with a network of lines and make a patch surface
This is meant for 2D networks/surfaces. I haven't attempted filling a 3D volume. My guess is this wouldn't work as it would require a non-manifold mesh that Plankton wouldn't handle.
Note similar results could be achieved with the following:
TSplines
MeshDual (dual of a tri mesh, not as much freedom/control)
Working backwards, here is the GhPython script from Will Pearson that builds a Plankton Mesh from vertices and faces. The vertices are a list of 3D coordinates, the faces are a tree a lists, with each list containing the indices of vertices that form a closed loop. From Will, "Plankton only handles manifold meshes, i.e. meshes which have a front and a back. This orientation is determined by the "right-hand rule" i.e. if the vertices of a face are ordered counter-clockwise then the face normal will be out of the page/screen."
# V: list of Point3d # F: tree of int
import Grasshopper appdata = Grasshopper.Folders.DefaultAssemblyFolder
import clr clr.AddReferenceToFileAndPath(appdata + "Plankton.dll")
import Plankton
pmesh = Plankton.PlanktonMesh()
for pt in V: pmesh.Vertices.Add(pt.X, pt.Y, pt.Z)
for face in F.Branches: face = list(face)[:-1] pmesh.Faces.AddFace(face)
These vertices and faces are precisely the output from Starling. Starling takes in a list of Polylines which form the (properly oriented) face loops.
The polyline face loops can be generated...
Directly from Panels on a surface using LunchBox
Using any network of lines/curves on a surface (curves will need to be converted to polylines before Starling)
The latter was achieved using the Surface Split command, then converting the face edges (converted to curves) into polyline loops to represent faces.
…
requires four weather data inputs: air temperature (_dryBulbTemperature), relative humidity (relativeHumidity_), wind speed at 1.1 meters from the ground (windSpeed_) and mean radiant temperature (meanRadiantTemperature_).You can add values to the first three inputs from the Ladybug "Import Epw" component. For the last (meanRadiantTemperature_), you can add it from Ladybug's "Outdoor Solar Adjusted Temperature Calculator" component, or let "Thermal Comfort Index" component to calculate it. Both use different methods to calculate the final values.
I attached an example file below with second option.For more precise calculations you can use Honeybee and Chris' microclimate maps.An icing on the cake for the end: one of Ladybug developers yesterday released a set of Ladybug components for modelling in ENVI-met application. ENVI-met is cutting-edge microclimate software, which can be downloaded for free. It opens a number of advanced new analysis in outdoor domain, which couldn't have been done with the current Ladybug+Honeybee tools. So you can perform the simulation in ENVI-met 4 free software, and then add mean radiant temperature values from ENVI-met simulation to "Thermal Comfort Indices" component. Here is an example file.If you would like to go with the last approach, then the best would be to post a question about it in this topic.
1) You can make a polygonized tree.I haven't subtracted the trunk from the crown, but I guess it makes sense that it can be done.2) In most solar related simulations, a default albedo value of 0.2 is used. This corresponds to average albedo value taken from materials surrounding the urban or countryside location (concrete, grass, gravel, sand, asphalt...). However the presence of snow can significantly magnify the average albedo value several times. "Sunpath shading" components albedo_ input has an ability to calculate albedo due to presence of snow, if nothing is added to it (to albedo_ input). As you are performing the analysis of PET in a horizontal plane, it will not affect your calculations.3) Most thermal comfort indices will require performing analysis at 1.1 meters above the ground. This is considered to be height of standing person's gravity center.The same goes for PET index. So you are correct: you should place the analysis grid at 1.1 meters above the ground before adding it to the "Sunpath Shading" component.It is worth mentioning that "Thermal Comfort Indices" component used in this topic's PET_on_Grid2.gh and PET_on_Grid3.gh files is from last year, and much slower than the newest one (VER 0.0.64 MAR 18 2017) used in the example attached below. Just a remainder if you have been using older version of this component.Let me know if I misunderstood some of your questions, or if I missed to answer some of them.
EDIT: sorry for posting a double reply. When I posted it the first time, I only got links visible, with no text. Something has been wrong with grasshopper ning forum for the last couple of months.…
search for residential type and surprisingly there are none. This can be, but i'm surprised.
The location in example is the Financial District of Manhattan. I assume there might not be too many purely residential buildings there. If you increase the radius to 300meters it will find one.The OSMobject "Residential building" will look for mostly purely residential buildings. For example those in Chinatown or Lower East Side.However most of the time a building might be a multi-purpose: shops on the ground floor, offices above, and above them residential apartments. Users can sometimes avoid tagging these kind of buildings, and may just tag them with "buildings"="yes", not the type of the building too (for example: "building"="multiuse"). So this may be the problem why you might not get too many residential buildings.I guess the only solution to this issue is to add these tags by yourself. Then Gismo will instantly make use of them.I mentioned previously that I will create a couple of video tutorials, but I seemed to never found enough time. I apologize for that. The process is actually quite simple.
Here is small step by step tutorial on how to do that. It may take you about 2 minutes to tag your building and use that tag in Gismo.
Also office buildings. I imagine this is not up to you, but can be kind of disappointing. I wanted for example to do some Ladybug analysis only on residential or office buildings ... pitty.
"Office building" has not been added to "OSMobjects" dropdown list. I have just added it.However, whenever some sort of object is not defined in "OSMobjects" dropdown list, one can use the _requiredKey and requiredValues_ inputs of the "OSM tag" component:
I just tried looking for office building for the same location we have in the create_legend_example.gh file and it found 3 of them. There would probably need to be more, but it may be that nobody tagged those with "building"="office"
The legend is nice, though i think is not completely synchronized with the LegendBakeParameters: You need to provide a point for the LegenPlane input and another for the titleOriginPt output of the CreateLegend.
Unlike Ladybug, Gismo threats the title and the legend separately. So the legend's color bar would have its own starting point (plane) while the title will have its own. I found myself puzzled sometimes in Ladybug, why this wasn't possible.Or did I misunderstand you?…
Added by djordje to Gismo at 12:33pm on May 8, 2017
nted" in space (at instance definition creation phase): indicates the obvious fact that if garbage in > garbage out (try it).
2. Load the GH thing. Task for you: Using Named Views locate the points of interest as described further and make a suitable view. That way you can navigate rather easily around (hope dies last).
3. Your attractors are controlled from here:
The slider in blue picks some attractor to play with. You can use this while the K2 is running.
4. Don't change anything here (think of it as a black box: who cares how it works? nobody actually):
5. Enable the other "black box": job done your real-life stuff is placed:
6. Enable the solver: your "real-life" things start to bounce around:
7. Go there are play with the slider. A different attractor yields an other solution:
8. With real-life things in place if you disable the C# ... they are instantly deleted and you are back in lines/points and the likes:
9. Either with instance definitions or Lines/points change ... er ... hmm ... these "simple" parameters and discover the truth out there:
10. Since these are a "few" and they affect the simulation with a variety of ways ... we need a "self calibrating" system: some mini big Brother that does the job for us. Kinda like applying safely the brakes when it rains (I hate ABS mind).
NOTE: the rod with springs requires some additional code ,more (that deals with NESTED instance definitions) in order to (b) bounce as a whole and at the same time (b) elongates or shrinks a bit.
More soon.
…
a direct answer for you, in part because that statement suggests a complicated data tree indeed! And in part because I can't quite shake the question "Why?".
It's my nature to "think out of the box" and as you may have noticed, my answers in the other two threads related to this topic weren't quite what you asked for. The first question that comes to mind in this case is why look for the two closest trunks? Why not just the closest or why not "N" (all or all those within a given radius)?
The next question is why use a plane intersection at arbitrary height to get a point on each trunk for measuring distances between them?
So please bear with me as I explain how I've explored this problem so far, knowing I don't have an answer yet and, in fact, am not even sure that the question makes sense to me. ;)
First, I got tired of looking at these upside down "trees" so I flipped them right side up. I used 'Mirror' instead of 'Rotate' which might cause problems? But lets move on. I changed your preview colors so they wouldn't conflict with my 'Tree/List Viewer' defaults and to increase contrast a bit.
Then I skipped your methods for finding "Cluster 'B' and 'C'" and used 'Curve Proximity' between the trunks instead.
This is hard to convey with a static image but might make more sense interactively. There are two copies of 'Tree/List Viewer'; the second one ("slave" group) is driven by the set of sliders in the first one. As you move the 'path idx' slider, one of the trunks will be cyan in color, as set above. The others will be blue except for one that is yellow. As you move the 'list idx' slider, the yellow highlight will move among the blue trunks, showing the closest trunk at 'list idx' = 0 and the furthest at 'list idx' = 3 (five trunks total, one selected by 'path idx' and the other four by 'list idx'. The result is that for each trunk, we have all the other trunks sorted by distance.
That's all for now! There is a very simple way to connect the 'Twigs' instead of the 'Trunks' to 'Crv A' with interesting results, but it requires flattening the 'Twigs' so isn't as useful as we want.
The big question for me remains: what is the data/tree structure of the results you seek? From the statement I quoted above, it sounds like:
One branch per trunk.
For each trunk, one branch per twig? (or...?)
For each twig branch...? A list of distances to each of the other trunks? (or a list of the other trunks sorted by their distances from this twig?)
It sounds like a complicated mess, frankly. And again begs the question, why? What's the underlying goal beyond the objectives you have outlined so far?…
Added by Joseph Oster at 7:59pm on November 14, 2017
). It deals with the potential possibility to port GH into AEC fields (real-life AEC fields, nothing to do with academic thinking). The bad news are that the smart AEC sector is occupied solely by Bentley/GenComp – expect soon Revit/Dynamo as well (not to mention CATIA). The good news are that there’s millions of designers/engineers/industrial designers out there who could be interested for a 3rd alternative.
Intro: Well, in the old days (when men had mustache and muttonchops) AEC design performed in a nice top-to-bottom sequence (kinda like a vector) : the Big Man (aka The Brain) did some sketches (with crayons) and the rest (known as the “others”) struggled to make The Idea a reality. Today things are different, mind. Or they should be different. Or may be different. Or whatever. The big easy:For a zillion o reasons (AEC matures, PLM, cost, outsourcing, sustainable engineering…add several more) this vector like process of the past is like a Brown motion these days: Right down the moment that you (or your team) “sketch” The Big Idea … another team design simultaneously (i.e. in parallel) the components (parts) that compose the whole. This is the so called bottom-to-top design mentality. So the whole and the parts meet in some "middle point" instead the later being dictated by the former. In quite a few occasions parts dictate the whole (cost, cost and cost being the main reasons). The more a design is contemporary the more this bottom-to-top thing plays a critical role. Ignore it and have a very big time (sooner or later).The bad news:If you accept the above…well GH – at present phase - is not ready for contemporary AEC work. At.All.3 Main reasons for that:1.You can’t use parametric parts (i.e. nested blocks to speak Rhino language) into a given definition (in this case attached : truss nodes, connection flanges, mount plates, cable tensioners, planar glazing components, roof skin components…etc etc). This is obviously a Rhino domain.2.You can’t bake a given solution in such a way that the Rhino file is structured (i.e. assemblies of nested blocks). Or you can do it theoretically writing some VB/C code – but the core of the matter is that corresponding components are MIA. That means that you can’t export anything useful actually into established AEC oriented apps and/or established MCAD apps (for doing/calculating the parts for real-life production).3.The GH process can’t being interrupted. Imagine defining, say, a building “envelope” in GH and then …er…use Evolute tools in order to optimize things (say quad planarization and the likes). Then …continue in GH for more detailed work. Then design the parts as in 1 above. Then back to Evolute. Then back to GH.So…if anyone is interested I would be glad to start the mother of all debates and/or some kind of crusade (GH for President, that is).PS: This definition is a WIP thing – more refined stuff to follow (in particular a complex canopy tubes pre-stress system).
PS: Tree8 components are used sporadically.
PS: Use Saved Views
May the Dark Force be with us.Best, Peter …
lC_UtilEigenSystemSym (level 1) { Exception has been thrown by the target of an invocation. TargetInvocationException }
Object: MillC_UtilEigenSystemSym (level 2) { Could not load file or assembly 'Sawapansolversnet, Version=1.0.4490.29339, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. FileNotFoundException }
Object: MillC_Topostruct2D (level 1) { Exception has been thrown by the target of an invocation. TargetInvocationException }
Object: MillC_Topostruct2D (level 2) { Could not load file or assembly 'Sawapansolversnet, Version=1.0.4490.29339, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. FileNotFoundException }
Object: MillC_Topostruct3D (level 1) { Exception has been thrown by the target of an invocation. TargetInvocationException }
Object: MillC_Topostruct3D (level 2) { Could not load file or assembly 'Sawapansolversnet, Version=1.0.4490.29339, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. FileNotFoundException }
Object: MillC_FEASystem (level 1) { Exception has been thrown by the target of an invocation. TargetInvocationException }
Object: MillC_FEASystem (level 2) { Could not load file or assembly 'Sawapansolversnet, Version=1.0.4490.29339, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. FileNotFoundException }
Object: MillC_UtilFFT1D (level 1) { Exception has been thrown by the target of an invocation. TargetInvocationException }
Object: MillC_UtilFFT1D (level 2) { Could not load file or assembly 'Sawapansolversnet, Version=1.0.4490.29339, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. FileNotFoundException }
Object: MillC_UtilFFT2D (level 1) { Exception has been thrown by the target of an invocation. TargetInvocationException }
Object: MillC_UtilFFT2D (level 2) { Could not load file or assembly 'Sawapansolversnet, Version=1.0.4490.29339, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. FileNotFoundException }
EDIT: Even with COFF disabled in GrasshopperDeveloperSettings this still happens (Thanks Jon)
Is millipede not compatible with Rhino version 5? Or is there a different .dll to use?
Having loaded some of the components:
I congratulate you on following Rutten's 3rd law of Grasshopper :)
Although I hope the Solver and especially the Stress lines get further refinement in order to differentiate them as I find it hard to read the small label at the bottom. Maybe the Chimney's can have different numbers 3 = 3D, 2 = 2D etc.
…
al surface, but this is not happening with the edge mesh list!
In fact when I want to create mesh faces (the side mesh faces to close the boundaries surfaces) I can see (and I have tested/x2 checked within GH), that the corrispondent top edge and bottom edge of a determinated face are not coincident.
How can I assign a consistent index list to the top and bottom mesh edge list?
How the edge topology is assigned?
I post here the code, FYI, even I do not think that can help to find the problem.
And 2 screenshot to show you the problem.
double thickness = new double(); if (!DA.GetData(0, ref thickness)) return; Mesh baseMesh = new Mesh(); if (!DA.GetData(1, ref baseMesh)) return; List<Plane> localCSPlanes = new List<Plane>(); if (!DA.GetDataList<Plane> (2, localCSPlanes)) return; List<Mesh> solidMesh = new List<Mesh>(); List<Point3d> meshFaceCenterPlus = new List<Point3d>(); List<Point3d> meshFaceCenterMinus = new List<Point3d>(); List<Plane> localCSPlanesPlus = new List<Plane>(); List<Plane> localCSPlanesMinus = new List<Plane>(); List<Line> edgeMeshPlusLine = new List<Line>(); List<Line> edgeMeshMinusLine = new List<Line>(); Mesh offsetPlus = baseMesh.Offset(0.5*thickness, false); Mesh offsetMinus = baseMesh.Offset(-0.5 * thickness, false); Mesh recMesh = new Mesh(); solidMesh.Add(offsetPlus); solidMesh.Add(offsetMinus); //This for-cycle creates a index-consistent list of plus-offset mesh face center points and local coordinate system mesh planes. int nFcsPl = offsetPlus.Faces.Count; int nEdg = offsetPlus.TopologyEdges.Count; for (int i = 0; i <= nFcsPl - 1; i++) { meshFaceCenterPlus.Add(new Point3d(offsetPlus.Faces.GetFaceCenter(i))); localCSPlanesPlus.Add(new Plane(offsetPlus.Faces.GetFaceCenter(i), localCSPlanes[i].XAxis, localCSPlanes[i].YAxis)); } //This for-cycle creates a index-consistent list of minus-offset mesh face center points and local coordinate system mesh planes. int nFcsMn = offsetMinus.Faces.Count; int nEdgMn = offsetMinus.TopologyEdges.Count; for (int i = 0; i <= nFcsMn - 1; i++) { meshFaceCenterMinus.Add(new Point3d(offsetMinus.Faces.GetFaceCenter(i))); localCSPlanesMinus.Add(new Plane(offsetMinus.Faces.GetFaceCenter(i), localCSPlanes[i].XAxis, localCSPlanes[i].YAxis)); } for (int i = 0; i <= nEdg - 1; i++) { Line lineRecPlus = offsetPlus.TopologyEdges.EdgeLine(i); edgeMeshPlusLine.Add(lineRecPlus); Point3d recPointA = lineRecPlus.From; recMesh.Vertices.Add(recPointA); Point3d recPointB = lineRecPlus.To; recMesh.Vertices.Add(recPointB); Line lineRecMinus = offsetMinus.TopologyEdges.EdgeLine(i); edgeMeshMinusLine.Add(lineRecMinus); Point3d recPointC = lineRecMinus.To; recMesh.Vertices.Add(recPointC); Point3d recPointD = lineRecMinus.From; recMesh.Vertices.Add(recPointD); recMesh.Faces.AddFace(0 + 4 * i, 1 + 4 * i, 2 + 4 * i, 3 + 4 * i);
NOTE: I know how to create a solid from a single mesh surface, but this is not what I want now, because I have to sort (for further purpose) the solid mesh in top, bottom and side faces.
Thanks a lot for your help!
cheers,
matteo…
ng/702/30
EDIT: DK2 works, not with positional tracking yet (14/09/15)
Source is here:
https://github.com/provolot/RhinoRift
Steps:
1) Download these files (also attached below):
https://github.com/provolot/oculus-grasshopper/raw/master/oculus-grasshopper_v0.4.ghx
https://github.com/provolot/oculus-grasshopper/raw/master/OpenTrackRiftGrasshopperUDP.ini
https://github.com/provolot/oculus-grasshopper/raw/master/oculus-grasshopper-test_v0.1.3dm
2) Download OpenTrack - http://ananke.laggy.pk/opentrack/, and setup/install. Once installed, double-click to open.
3) In OpenTrack, load the 'OpenTrackRiftGrasshopperUDP.ini' profile. Click the 'Start' button and move your Rift around - make sure that it looks like the Yaw/Pitch/Roll data is being sent. TX/TY/TZ will all be 0, as Oculus doesn't have absolute positioning data.
4) In Rhino, open the test 3dm. You'll notice that there are two viewports - called 'LeftEye' and 'RightEye'. These have been placed to mimic where the screens should be for the Oculus Rift --- but only when Rhino is in fullscreen mode, with the command 'Fullscreen'. The placement needs to be tweaked, but should work.
If you want to use your own model, you can load your own .3dm file in Rhino, then you can right-click on the viewport name, and go to Viewport Layout > Read from File. If you then load my test file, Rhino should open my two viewports, sized correctly, onto your model.
The placement of these viewports need to be tweaked; if you find a better viewport layout, upload an empty Rhino file with your viewports, and we can share eye-layout 'templates'!
5) In Grasshopper, open the .ghx definition. Everything that is multiple-grouped is a value that can be changed. Two things here:
- IPD: Set this and convert it to the proper units for your model.
- Left/right viewport names. In this case, leave this as-is, since you're using my example file.
6) Turn on the Grasshopper Timer, if it isn't on already.
7) In the GH definition, toggle 'SyncEyes' to be True. Then, in the left viewport, try orbiting around with the mouse. The 'RightEye' viewport should move around as well, pretty much simultaneously.
8) In OpenTrack, click 'Start', then toggle 'ReadUDP' to be True. You should see the 'OpenTrackInfo' panel fill with data that's constantly changing.
9) Move around the landscape with your camera, and when you set on a starting view that's ideal, click the triangle of the Data Dam component to 'store' the data.
10) Finally, toggle 'OculusMove' to be true. If all works correctly, both viewports should move based on the Rift's movement.
Let me know if you have any problems!
Cheers,
Dan…
Added by Dan Taeyoung at 11:47pm on December 10, 2013
iece could be easily cut using the "plan" curve, the wall need extra attention and manual work to prepare.
This script attempts to automate the preparation of lasercutting curves with some control:
1) Height: The parameter is set using the "Name" property of the Rhino "plan" curve object. Number of storeys (e.g. 5) is to be entered in that field and the script will read it after you press F5 (recompute) in grasshopper. If the block models are not multiples of standardised storey height, you could set "Storey height" in grasshopper to 1 and set exact height to individual "plan" curves in Rhino.
(Special mention: This part of script including reading "Name" property in Rhino and auto-correcting curve direction is attributed to Victor Leung's Laser Cutting Tool for Block Models)
2) Mode of wrapping: The wall could either be "sitting" on the bottom plate and being completely covered by the top plate, or wrapping outside both the bottom and top plate. In either case, material thickness is taken into consideration and the finished model will remain the same size.
3) Extra height option: In preparing flat roof models, one may like to add extra height for parapet wall to make the model more appealing.
4) Easy picking up: Each individual piece has some uncut part (red lines for engrave) to hold itself in place after cutting. There is no need to use masking tape to stick. Individual pieces could be taken out when you are ready to use.
There are also known issues to this script:
1) At internal corners, the adjacent wall will be longer (in wrapping outside mode) or shorter (in sitting inside mode). You have to manual cut at this point.
2) It could not work with only one input curve. (Although it may be a stupid bug,) A dummy rectangle nearby could be created to make it work.
Enjoy,
Sa
Lasercutting Tool for Block Models (Fold and Wrap) by Sa Ng is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at http://www.grasshopper3d.com/forum/topics/laser-cutting-tool-for-block-models.
…