e below).
Explanation of my intent:
The first input (crvTree) has the exact same data structure as the second input (cell_name). crvTree contains one or more Curves in each branch, while cell_name contains exactly one string per branch.
The third input (system_names) is a list of string data, and I compare the single string from each branch of cell_name and find a match, then return the index of system_name.
So, for example:
crvTree brings in:
{0} bunch of Curves
{1} bunch of other Curves
{2} another bunch of Curves
cell_name brings in:
{0} "curve type A"
{1} "curve type D"
{2} "curve type A"
system_name brings in:
{0;0} "curve type A"
{0;1} "curve type B"
{2;0} "curve type C"
{2;1} "curve type D"
{2;2} "curve type E"
{3;0} "curve type F"
output should be:
{0;0} bunch of Curves (and) another bunch of Curves
{2;1} bunch of other Curves
I'm pretty sure that I can't keep accessing cell_name as an item, but instead as a tree. I was only doing that to first get the strings to match, which I did.
protected override void SolveInstance(IGH_DataAccess DA) { //Declare a new List(Of T) to hold the input text data. string cell_name = "nothing yet"; List<string> system_names = new List<string>(); int index; Grasshopper.Kernel.Data.GH_Structure<Grasshopper.Kernel.Types.GH_Curve> crvTree = new Grasshopper.Kernel.Data.GH_Structure<Grasshopper.Kernel.Types.GH_Curve>();
//Retrieve the whole list of System Names using DA.GetDataList(). if ((!DA.GetDataTree(0, out crvTree))) { return; } if ((!DA.GetData(1, ref cell_name))) { return; } if ((!DA.GetDataList(2, system_names))) { return; }
index = system_names.IndexOf(cell_name);
int index2 = -1; for(int i = 0; i < system_names.Count; i++) { if(String.Equals(system_names[i], cell_name, StringComparison.OrdinalIgnoreCase)) { index2 = i; break; } } DA.SetData(0, index2); DA.SetDataTree(1, crvTree);
}…
ler se han seleccionado un conjunto de técnicas y estrategias para resolver problemas que hoy se presentan en el diseño y fabricación digital de formas complejas y euclidianas.
Bajo dos entornos de trabajo, entre técnicas interactivas y soluciones algorítmicas, se examinan conceptos y casos de estudio que le permitirán al participante decidir como y en que momento estas tecnologías pueden ser utilizadas como aliadas en los procesos de diseño y fabricación. Tomando como plataforma básica Rhino, se explora y optimiza el diseño y fabricación de topologías complejas bajo los entornos de Grasshopper y Paneling tools
En el mes de Julio de 2010 (26 al 29 de febrero) se realizará el Workshop de Grasshopper - Paneling tools en McNeel Argentina,
Contenidos:
1. Modelado Avanzado y sus Tecnicas. Aplanado y Desarrollo de Superficies.
2. Tecnicas de panelizado plano
3. Introducción al Diseño Paramétrico.Definiciones Avanzadas de Grasshopper,posibilidades y limitaciones. Ajustes de escala para impresión y corte.
4. Renderizado basico con Rhinoceros
El workshop tiene una duracion de 24 hrs. (4 dias x 6 horas por dia, horario 10 a 13 hrs y 14 a 17hrs)
Docentes
Facundo Miri - McNeel Argentina.
Se dictara en McNeel Argentina
Ciudad de la paz 2719 3A. - Belgrano - Capital Federal.
Costo del Curso
U$S250+IVA
www.rhinoceros.com.ar…
image with shows some simple usage of the path mapper.
The points worth noting are the following:
1. The "Source" is comrised of a single line notation which EXACTLY matches the existing path structure. This means that if your parameter viewer shows you a path strcutrure which looks like {0;0;0;1;0} (N=4), your source input should look like {A;B;C;D;E}(i). Here, all the letters A-E and i are placeholders meaning that they can be any letters and are standing by for each digit in your path structure. This also means that they could be any letters: {Q;R;S;T;U}(V) would work as well as {A;X;T;B;S}(J). The important thing is that you are identifying each digit (including the value of 'N', the total items in each path).
2. The "Target" is (obviously) your desired path structure. If you want to simply get rid of the zeros while maintaining essentially the same path structure, it is as simple as dropping out those placeholders while writing the target notation. In the above example, if your source is {Q;R;S;T;U}(V), you can use a targe like {S;T}(V) to return a structure which will be {0;1}(N=4) or {T}(V) for {1}(N=4) and so on.
3. if you want to swap the path structure, i.e. if you have 5 paths with 10 items each and you want 10 paths with 5 items each, you switch the placeholders in the source and target notations. for example, {X;Y}(n) -> {n}(Y)... and so on.
I hope that the above is of some help. Please feel free to keep asking.…
Added by Sameer Kumar at 10:29am on December 7, 2009
in with the names translated back into paths. It seems to be fairly similar to the way David's upcoming Geometry Cache that Danny mentioned will function.
Now I just have to figure out what to do with your right pinky!
Secondly, in working with trees in general, I have come up with a number of clusters of my own that simplify frequent tasks. In particular many of them are designed to eliminate the use of the Path Mapper, which I find to be a clumsy tool because it has to be updated every time there is a change in the tree structure fed into it.
Maybe you will find some of them useful. I have attached them all in the definition called "Andrew's Tree Utilities"...
1. Match Path - Given two sets of data with N total items, assign the path structure from one list to the other.
2. Assign Paths - Given a flat set of data and a flat list of paths, format the data items into the specified tree structure.
3. Partial Flatten - Equivalent to a Path Mapper from {A;B;C;D} to {A;B;C}, except it takes an integer value for the number of "levels" to eliminate, and works regardless of the input structure. (i.e. could be {A;B;C} or {0;0;0;A;0;0;B;0;C}
4. Flatten one level - same as above, but defaults to a single level of flattening. I use this one in almost every definition I make.
5. Clip Tree - this reduces a "jagged" set of paths ({0;0} and {0;0;0} and {0;1} etc.), such as are produced by many of the intersection components (the intersections that exist get another level of hierarchy where the nulls remain in the original tree structure) to the overlap among the paths. Equivalent to Path Mapping {A;B}->{A;B} and {A;B;C}->{A;B} but works regardless of the input structure.
…
ODE sas.
Please find below his official answer, in English and in French (original version).
Best regards,
Matteo Lo Prete, MScArch.
English version
“Probably it is necessary that you consider how most type of objects are not categorized by the IFC, considering a contemporary subject. Beyond your appreciation, that we consider as really important, we relativize the significant feedback appreciations communicated by those subjects to whom the IFC was referred: the construction companies. Taking distance from your comments, a little bit superficial and youthful, we can affirm that: the quantities, data on products, contextualization of drawings, calculations, etc. distinguish the work that we did from the partial and poor scenario that you describe.
This result has been particularly appreciated by the companies who had to estimate a complex project in 3 months. Whatever you may say, this is a fact recognized into our field already: this first public procurement (Loi n° 85-704 du 12 juillet 1985 “MOP - Maîtrise d'Ouvrage Publique”) offered estimation procedures never reached for such complex project. This also means that, finally, the estimation and the offer negotiated by the companies respected the client’s goal. This is for your information.
I wish to ask a question to you, Rhino trainer at RhinoForYou: how and in which conditions you accessed to constriction companies’ tipoffs?”
Original French version
“Il faut probablement que vous considériez que la plupart des typologies d’objet ne sont pas catégorisées par les IFC du fait du travail sur un objet contemporain. Par delà votre appréciation, qui compte beaucoup a nos yeux, nous avons pour les relativiser le retour des appréciations réellement importante à nos yeux, puisque ce sont celle à qui étaient adressés les IFC: les entreprises. Bien différente de votre réaction, un peu cutanée et juvénile, nous pouvons vous dire que: les quantitatifs, les données relative des produits, la contextualisation des pièces graphique, notes de calculs, etc distingue ce que nous avons fait de l'état partiel et appauvri que vous relatez. Ce résultat a été particulièrement appréciés par les entreprises qui ont eu à chiffrer un projet complexe en 3 mois. Quoi que vous en disiez il est un fait reconnu dans la profession désormais: ce premier appel d'offre public lois MOP a permis des conditions d'évaluations jamais atteintes pour un ouvrage complexe. Ce qui veut dire que l'estimation et le prix négocié pour les entreprises sont rentrée in fine dans les objectifs de la MOU. Voilà pour votre information. J'aurais souhaité vous adresser une question, à vous qui êtes formateur Rhino chez RhinoForYou: comment et dans quelles conditions avez vous eu accès a des donnés entreprises?”…
I'm facing a quite strange issue with an "intermediate" script (that counts branches on a per "node" basis).
Let's describe first why this "intermediate" script is required:
As you can see the "main" script provides points/lines et all in non identical data trees (obvious: since the path structure depends upon if a surface is open or closed). Thus if we need to "post process" (iterate correctly through branches, that is) these trees (in a variety of scripts) we need a way to count branches on a per "node" basis.
This is what this (WIP) script does :
And now the strange issue:
The first function finds the max path dimension ( i.e. for path {a;b;c;d} dimension is 4). Then this value is passed to other functions as argument and life goes on:
The function is really simple:
Now choose this as test tree (works OK: max path dimension=3):
Then switch to the crazy tree (works OK, max path dimension=4):
Then switch back to the initial tree (Oops : max path dimension=4 instead of 3)
Maybe has to do with the exception handling here:
best, the jelly fish
…
gh, when I bake, the geometry suddenly exists in rhino.
Second, I can seem to figure out how to set default numeric values in the component.
Protected Overrides Sub RegisterInputParams(pManager As Grasshopper.Kernel.GH_Component.GH_InputParamManager)
pManager.AddPointParameter("Focal Point", "FP", "The focal point", GH_ParamAccess.item)
pManager.AddNumberParameter("Focal Point Horiz Dist", "D", "Focal point distance from performance boundary", GH_ParamAccess.item)
pManager.AddNumberParameter("Focal Point Height", "H", "Focal point height above performance boundary", GH_ParamAccess.item)
pManager.AddPointParameter("First Row Start Point", "FR", "Location of first row in tiered seating", GH_ParamAccess.item)
pManager.AddNumberParameter("First Row Horiz Dist", "FRD", "First row distance from performance boundary", GH_ParamAccess.item)
pManager.AddNumberParameter("First Row Height", "FRH", "First row height above performance boundary", GH_ParamAccess.item)
pManager.AddNumberParameter("C Value", "C", "C value", GH_ParamAccess.item)
pManager.AddNumberParameter("Row Width", "RW", "Row width", GH_ParamAccess.item)
pManager.AddIntegerParameter("Number of Rows", "RN", "Number of Rows", GH_ParamAccess.item)
pManager.AddIntegerParameter("Construction Tolerance", "CT", "Construction Tolerance: 1=1in, 2=1/2in, 4=1/4in, 8=1/8in", GH_ParamAccess.item)
pManager.AddNumberParameter("Max Riser Height", "MR", "Maximum riser height allowed", GH_ParamAccess.item)
pManager.AddGeometryParameter("Spectator", "S", "Seated/Standing spectator", GH_ParamAccess.item)
End Sub
Protected Overrides Sub RegisterOutputParams(pManager As Grasshopper.Kernel.GH_Component.GH_OutputParamManager)
pManager.AddLineParameter("Sightlines", "SL", "Sightlines", GH_ParamAccess.list)
pManager.AddLineParameter("C Value", "CL", "Line represents C value height", GH_ParamAccess.list)
pManager.AddLineParameter("Ground Line", "GL", "Ground Line", GH_ParamAccess.list)
pManager.AddLineParameter("Tier tread", "TR", "Line represents tier treads", GH_ParamAccess.list)
pManager.AddLineParameter("Risers", "RI", "Line represents risers", GH_ParamAccess.list)
pManager.AddGeometryParameter("Spectators", "SP", "Seated Standing Spectators", GH_ParamAccess.list)
End Sub
Protected Overrides Sub SolveInstance(DA As IGH_DataAccess)
Dim newLine As New List(Of Line)
Dim newCValue As New List(Of Line)
Dim rowWidthLineList As New List(Of Line)
Dim floorLineList As New List(Of Line)
Dim riserLineList As New List(Of Line)
Dim leghtList As New List(Of String)
Dim newSeated As New List(Of GeometryBase)
Dim inputPoint As Point3d
If (Not DA.GetData(0, inputPoint)) Then Return
Dim viewPointY As Double
If (Not DA.GetData(1, viewPointY)) Then Return
Dim viewPointZ As Double
If (Not DA.GetData(2, viewPointZ)) Then Return
Dim firstRowPoint As Point3d
If (Not DA.GetData(3, firstRowPoint)) Then Return
Dim firstRowY As Double
If (Not DA.GetData(4, firstRowY)) Then Return
Dim firstRowZ As Double
If (Not DA.GetData(5, firstRowZ)) Then Return
Dim cValue As Double
If (Not DA.GetData(6, cValue)) Then Return
Dim rowWidth As Double
If (Not DA.GetData(7, rowWidth)) Then Return
Dim numberOfRows As Integer
If (Not DA.GetData(8, numberOfRows)) Then Return
Dim M As Integer
If (Not DA.GetData(9, M)) Then Return
Dim maxHeight As Double
If (Not DA.GetData(10, maxHeight)) Then Return
Dim seated As GeometryBase
If (Not DA.GetData(11, seated)) Then Return
Call addNewRow(newLine, newCValue, inputPoint, viewPointY, viewPointZ, firstRowPoint, firstRowY, firstRowZ, cValue, numberOfRows, rowWidth, rowWidthLineList, floorLineList, riserLineList, M, maxHeight, seated, newSeated)
DA.SetDataList(0, newLine)
DA.SetDataList(1, newCValue)
DA.SetDataList(2, rowWidthLineList)
DA.SetDataList(3, floorLineList)
DA.SetDataList(4, riserLineList)
DA.SetDataList(5, newSeated)
End Sub
Public Sub addNewRow(---constructor----)
---additional code----
end Sub…
o it would cause troubles with unfolding and fabricating... that's why I used Extrude point component- it will give you similar result, but all surfaces are planar.. you can control extrusion direction with a tip point in rhino...
2)I changed tagging so every tube has 8 points form list A and 8 points from list B... first number of tag is a number of point within one tube... last number of the tag is order of tubes (I draw a little picture in GH, hope you'll understand)...I think original way of tagging wasn't really usefull.. but you can change tagging by yourself...
3) the definition is really messy, sorry about that, but it's just quite complicated task...
4)if you find some incorrect order of tagging, use the slider that controls Shift List component ... it will shift tagging..
5) if you won't be using this definition or find some better way, pleeeease don't tell me - I'll jump out the window :D ... it took me whole day to make it work :D
6)I can't guarantee you anything- I hope it works, but if not - at least I tried... so check everything (especially order of tags and points) twice before you fabricate it.. or print few tubes and make them paper first..
7)there is a part of original definition, that is not useful anymore.. I left it there, but you can delete it (I called it "UNUSED PARTS OF ORIGINAL FILE")
..good luck
Dimitri…
e. We know you want to concentrate on your design, rethink the spaces, the material and more other beautiful and important topics. You will learn the power of parametric design in examples, challenges and develop your own systems to optimize your work, make changes, variations and convert your design into a full BIM model in real time : )
Who should take the course?
Everybody who is new, beginner or excited about Algorithmic design and the Rhino Inside Revit game changer development. The skill level of the workshop is BEGINNER.
The Workshop finish with a Discussion + Virtual Beers with PAZ Academy ;D !
https://pazacademy.com/workshops/rhino-inside-revit-3h-online/…