able and it needs to know how to convert itself from/to other types of data.
Let's say that you have a simple data type that combines a point and an integer:
public struct PointIndexData
{
public Point3d Point;
public int Index;
}
It doesn't really matter whether it's a class or a struct. Once you have your data type you can 'wrap' it up in goo in order to make it Grasshopper compliant:
public class PointIndexGHData : GH_Goo<PointIndexData>
{
//...
}
At this point you'll need to implement the 5 abstract methods that are not implemented by GH_Goo<T>. They might look something like this:
public class PointIndexGHData : GH_Goo<PointIndexData>{ public override IGH_Goo Duplicate() { PointIndexGHData dup = new PointIndexGHData(); dup.Value = Value; return dup; }
public override bool IsValid { get { return Value.Index >= 0; } }
public override string ToString() { return string.Format("{0} [{1}]", Value.Point, Value.Index); }
public override string TypeDescription { get { return "Points and Integers, living in perfect harmony"; } }
public override string TypeName { get { return "IndexPoint"; } }}
You'll probably also want to override the CastFrom and CastTo methods so that your data can easily be used by any component which takes in simple points or integers, and -in this case- you want your data to also implement the Grasshopper.Kernel.IGH_PreviewData interface as this data can -and should- be displayed in the Rhino viewports.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
your fully glazed building). Once a person looks away from the glazed building, they no longer experience glare. If you know the view that someone will have looking at your building, Honeybee has a large number of tools that will give you real and reliable numbers for glare.
I know that you are planning to use a different method here but I point out the above just to be clear that you are not necessarily sure that people will experience glare if you are just looking at the times of the year when direct sun will be bouncing off of the glass building onto another building. However, I can see this as a good starting point to assess the hours where there is a risk of glare in the building where light is being bounced to.
With that preamble out of the way, I can say that you are using a version of Ladybug that is 6 months old and I have updated your file for you. To update your components and to be sure that the file below works correctly, you should re-download the user objects from the main Ladybug page and drag them onto your canvas.
If you want to look at sunrays for a whole year, I would keep your number of test points low by increasing your grid size (I think 5 should suit your purposes). Also, you should only set the number of bounces to 1 as you are only really concerned about the one bounce off of the glass building. With these two things done, you can then hook up an analysis period and have it do bounces for every sun-up hour of the period an not take for ever to calculate on your machine. Perhaps an easier way to do this would be to take a sun-up hour for every month instead of a full analysis period, as I have done in your attached file.
Finally, you need to make the last bounce length long enough to intersect the neighboring building (I increased it to 15 meters). Then you can use the native grasshopper components to count the number of intersections.
You can see this all in this file:
https://www.dropbox.com/s/poe7i1zwut2fjg6/Glarescript19sept_CWM.gh?dl=0…
go and sulk in the corner, my C# is non existent, although i am making progress on python unfortunately slower than my grasshopper.
Attached is a typical relatively simple planar grillage model for a bridge form that is common in Australia/NZ/Asia. The analysis package has a good graphical interface, however i am looking at replicating the process ideally with GH. I am getting there.
There are a few constraints in the use of a super T, the precast mould is governed by two critical dimensions:
1. from the beams soffit to the underside of the precast flange, normally Depth -75 or 100mm. Depths that are common are 1200/1500/1800.
2.The real sweet spot dimension is the 1027mm dimension to the outside of the webs, this is a constraint
The actual shapes of the prestressed beams are governened by AS5100:5 Appendix H (from memory)
In my definition I included the super T cross section which is parametric.
The other definition is where I have got to with the grillage.
I am a little one dimensional: point-line-surface-volume. I think I am getting to grips with manageing data i lists.
My ulimate aim is to:
generate basic geometry in gh, the type of analysis will be a space frame or FE, these analysis types require different geometries imported to a structural analysis package
ideally utilise IFC, for materials, 2D, 3D drawings and project documentation
At the moment I am looking to generate all of my gemetry in GH, that seems to generate a lot of doubled up geometry. Deconstruct Brep may become my favourite.
A little excesive is the inclined members spilt into the same no. of points at the grillage length.
again thanks for you time, oh! took a a few minutes to work out how to plug your def's in.
kenyon
…
Added by Kenyon Graham at 7:57pm on December 3, 2015
occur more than once in the same list, and different elements with identical values can occur more than once. Also, a list may contain lack of elements, referred to as "nulls".
Sets. Strictly speaking a Set is a mathematical construct which adheres to a strict collection of rules and limitations. Basically, a Set is the same as a List, with the exception that it cannot contain the same element more than once, or indeed two or more different elements with the same values. You see, in mathematics there is no difference between a value and an instance of that value, they are the same thing. In programming however it is possible to store the number 7 in more than one spot in the RAM. Grasshopper does not enforce this rule very strongly though, you can use a lot of Set components on lists that have multiple occurrences of the same value. The big difference between Lists and Sets in Grasshopper is that Sets are only defined for simple data types that have trivial equality comparisons. Basically: booleans, integers, numbers, complex numbers, strings, points, vectors, colours and intervals. Lists can contain all kinds of data.
Strings. Strings are text. There's nothing more to it. I don't know why early programmers chose to call them strings, but I suppose it's a better description of the memory representation of them. Strings are essentially sequences of individual characters.
Trees. Trees are the way all data is stored in Grasshopper. Even when you only have a single item, it will still be stored in a tree. A tree is a sorted collection of lists, where each list is identified by a path. A specific path can only occur once in a tree, when you merge two trees together, lists with identical paths are appended to each other. Trees are an attempt to losslessly represent not just the data itself, but also the history of that data. Imagine you have 4 curves {A,B,C,D} and you divide each into 3 points {X,Y,Z}. Then, for each of those points you create a new line segment {X',Y',Z'} and then divide each of those line segments again into 5 points each {K,L,M,N,O}. The way data is stored in trees, it should be possible to figure out whether a point M belongs to X' or to Z', and whether that X' or Z' came from A, B, C or D. This is why paths are often quite long after a while, because they encode a lot of history.
Paths. A Path is nothing more than a list of integers. It's denoted using curly brackets and semi-colons: {A;B;...;Z}. A Path should never be empty {} or have negative integers {0;-1}, but it is certainly possible to create a path like this and it probably won't even crash Grasshopper. Paths are 'grown' by components that (potentially) create more than one output value for a single input value. For example Divide Curve. It creates N points for every single input curve. In cases like this a new integer is appended to the end of the path.
In the next release the Path logic in Grasshopper is somewhat different. I fixed a number of obscure bugs (hopefully without introducing new fresh bugs) and special cased certain operations to somewhat reduce the speed at which paths grow. This may well break files that rely on a specific tree layout, but I hope the temporary sacrifice will be worth the long-term benefits.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
si à faire le tri avec Grasshopper et l'outil Points in Brep, comme je pensais. Je suis passé d'environ 400 000 points à uniquement 20 000 points autour de mes 3 rails. C'est très efficace (mais un peu dangereux avec tous ces points).
J'ai interdit au composant CircleFit de faire un cercle, s'il n'y a pas au moins 5 points présents sur la section. Car lorsqu'il y a seulement 3 ou 4 points, il suffit qu'il y en ait un pour que le cercle soit faux, alors qu'au delà, le cercle a plus de chance d'être "bon".
J'ai également créé des "Pipe" (créés à partir de portions de l'axe) au lieu des "Box » de sélection des points pour éviter de sélection trop de points que ne serait pas des points du rail.
J'ai ensuite créé des « panel » pour la moyenne des distances en X et en Y et la moyenne des distances centre à centre.
Tout cela fonctionne bien avec un axe et un tuyau. Mais maintenant j'essaie d'appliquer ça à plusieurs rails en même temps. Je crois avoir compris qu'il faut créer des « path » dans l'imput manager, et faire correspondre le « path » de l'axe et celui du Tuyau.
Dans mon exemple j’ai mis 3 courbes et 21 sections. Au moment où j'utilise les boîtes pour créer les portions des axes, il crée 63 « sous-path » de 1 courbe alors qu'il faudrait qu'il crée 3 "paths" de 21 courbes, enfin si j'ai bien compris.
Car une fois qu’il a créé les points à l’intérieur des « Pipe », il doit les projeter sur les plans correspondant. Et c’est là que le problème se voit. Il ne fait pas correspondre les points à projeter et les plans.
Je vous envoie la version à une courbe et un tuyau (c’est la v5 avec un fichier rhino ou la courbe d'axe est "bakée" pour pouvoir faire un zoom sur la zone plus rapidement) et je vous envoie également, celle avec 3 courbes et 3 tuyaux. Sachant qu’il faudra également attribuer un rayon pour un des tuyaux et un autre rayon pour les deux autres.
Tout ça est bien compliqué, j’espère que je ne vous embête pas trop.
Merci d’avance.…
Illuminants like "A" or "D65" are spectral power distributions that are defined (as per CIE S 014-2/E:2006) for wavelengths ranging from 300nm to 830nm.
For example, CIE Illuminants A,B and C are defined as :
And D65 is defined as :
For illuminance and luminance calculations, the radiation from such illuminants are converted to Lux or Candela/sq.m by weighing them against the Photopic Luminous Efficiency function (also called as V-lambda):
The equation (1) used for this purpose is
Where y corresponds to the V-lambda function and J corresponds to an illuminant like "D65" or "A".
So, why is all this relevant? Honeybee/Radiance also use a similar method for calculation of luminous flux, illuminance and luminance. However, in the case of Honeybee/Radiance the lighting calculations are limited only 3 (R,G,B) channels (and not the 300nm to 830nm). So the equation (1) from above becomes something like:
F = 47.4*R+120*G+11.6*B
Where (R,G,B) refers to the spectral power of the radiation and the numbers (47.4,120,11.6) relate to the V-lambda function. So, the bottom line is that an accurate representation of CIE illuminants is not possible inside Radiance/Honeybee as the spectral information is severely restricted. Some studies have proposed using Radiance with more than 3 channels. For example: http://link.springer.com/article/10.3758%2FBRM.40.1.304 . However, such attempts have been limited. What is possible with Radiance/Honeybee is to create a fairly accurate representation of brightness of the sky. Although, I can explain that too, I would suggest that you try this link first: http://www.bozzograo.net/radiance/index.php?module=FAQ&func=dis...
By the way, which CIE document are you referring to for CIE sky definitions ?…
would require to use archsim in grasshopper but it seems to be giving me a ton of errors. Some negligible but others are quite adamant.
Anyone know how to use archsim and is willing to help out? I've attached the 3dm and gh, I've been pulling my hair out for the past three days figuring everything out!
SCHOOLS.3dm
SCHOOLS.gh
If need be, I'll gladly talk to anyone who can help me with my current predicament. This is the error i get on one of the buildings
1. Program Version,EnergyPlus, Version 8.2.0-0ba4142206, YMD=2015.10.25 21:32,IDD_Version 8.2.0
** Warning ** CheckUsedConstructions: There are 1 nominally unused constructions in input. ** ~~~ ** Each Unused construction is shown. ************* Construction=DEFAULTCONSTRUCTION_FLIPPED ** Warning ** GetPurchasedAir: ZoneHVAC:IdealLoadsAirSystem="UNNAMEDZONE_0 IDEAL LOADS AIR missing data ** ~~~ ** UNNAMEDZONE_0_OUTDOORINLET does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node. ** ~~~ ** Adding OutdoorAir:Node=UNNAMEDZONE_0_OUTDOORINLET ************* Testing Individual Branch Integrity ************* All Branches passed integrity testing ************* Testing Individual Supply Air Path Integrity ************* All Supply Air Paths passed integrity testing ************* Testing Individual Return Air Path Integrity ************* All Return Air Paths passed integrity testing ************* No node connection errors were found. ************* Beginning Simulation ************* Simulation Error Summary ************* ** Warning ** The following schedule names are "Unused Schedules". These schedules are in the idf ** ~~~ ** file but are never obtained by the simulation and therefore are NOT used. ************* Schedule:Year or Schedule:Compact or Schedule:File or Schedule:Constant=OFF ** Warning ** The following week schedule names are "Unused Schedules". These schedules are in the idf ** ~~~ ** file but are never obtained by the simulation and therefore are NOT used. ************* Schedule:Week:Daily or Schedule:Week:Compact=OFF_wk_ ** Warning ** The following day schedule names are "Unused Schedules". These schedules are in the idf ** ~~~ ** file but are never obtained by the simulation and therefore are NOT used. ************* Schedule:Day:Hourly or Schedule:Day:Interval or Schedule:Day:List=OFF_dy_ ************* ************* ===== Final Error Summary ===== ************* The following error categories occurred. Consider correcting or noting. ************* Nominally Unused Constructions ************* ..The nominally unused constructions warning is provided to alert you to potential conditions that can cause ************* ..extra time during simulation. Each construction is calculated by the algorithm indicated in the HeatBalanceAlgorithm ************* ..object. You may remove the constructions indicated (when you use the DisplayExtraWarnings option). ************* ************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors. ************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 0 Severe Errors. ************* EnergyPlus Completed Successfully-- 5 Warning; 0 Severe Errors; Elapsed Time=00hr 00min 5.00sec
Let me know if you can help!
Kind regards,
Kevin…
would require to use archsim in grasshopper but it seems to be giving me a ton of errors. Some negligible but others are quite adamant.
Anyone know how to use archsim and is willing to help out? I've attached the 3dm and gh, I've been pulling my hair out for the past three days figuring everything out!
SCHOOLS.3dm
SCHOOLS.gh
If need be, I'll gladly talk to anyone who can help me with my current predicament. This is the error i get on one of the buildings
1. Program Version,EnergyPlus, Version 8.2.0-0ba4142206, YMD=2015.10.25 21:32,IDD_Version 8.2.0
** Warning ** CheckUsedConstructions: There are 1 nominally unused constructions in input.** ~~~ ** Each Unused construction is shown.************* Construction=DEFAULTCONSTRUCTION_FLIPPED** Warning ** GetPurchasedAir: ZoneHVAC:IdealLoadsAirSystem="UNNAMEDZONE_0 IDEAL LOADS AIR missing data** ~~~ ** UNNAMEDZONE_0_OUTDOORINLET does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.** ~~~ ** Adding OutdoorAir:Node=UNNAMEDZONE_0_OUTDOORINLET************* Testing Individual Branch Integrity************* All Branches passed integrity testing************* Testing Individual Supply Air Path Integrity************* All Supply Air Paths passed integrity testing************* Testing Individual Return Air Path Integrity************* All Return Air Paths passed integrity testing************* No node connection errors were found.************* Beginning Simulation************* Simulation Error Summary *************** Warning ** The following schedule names are "Unused Schedules". These schedules are in the idf** ~~~ ** file but are never obtained by the simulation and therefore are NOT used.************* Schedule:Year or Schedule:Compact or Schedule:File or Schedule:Constant=OFF** Warning ** The following week schedule names are "Unused Schedules". These schedules are in the idf** ~~~ ** file but are never obtained by the simulation and therefore are NOT used.************* Schedule:Week:Daily or Schedule:Week:Compact=OFF_wk_** Warning ** The following day schedule names are "Unused Schedules". These schedules are in the idf** ~~~ ** file but are never obtained by the simulation and therefore are NOT used.************* Schedule:Day:Hourly or Schedule:Day:Interval or Schedule:Day:List=OFF_dy_************************** ===== Final Error Summary =====************* The following error categories occurred. Consider correcting or noting.************* Nominally Unused Constructions************* ..The nominally unused constructions warning is provided to alert you to potential conditions that can cause************* ..extra time during simulation. Each construction is calculated by the algorithm indicated in the HeatBalanceAlgorithm************* ..object. You may remove the constructions indicated (when you use the DisplayExtraWarnings option).************************** EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 0 Severe Errors.************* EnergyPlus Completed Successfully-- 5 Warning; 0 Severe Errors; Elapsed Time=00hr 00min 5.00sec
Let me know if you can help!
Kind regards,
Kevin…
..
The problem is that using the index, adding a activies, the next activies change the index and then the link is wrong.
example: I need to connect to hotel function with house function, therefore i have 0 and 4 index in my panel.. So i have to extract the index linked to the alphabetical value to be able to draw lines between the points associated to the names of activities. Now if i add a new string between the values, the house activity hasn't the original index 4 but the new index 5. So the link will be not created between hotel and house but hotel e new activity in the index 4.
…