December GC SIG - Lists Juggling

Great SIG, Volker!

A lot of detail (squeezed into an hour!)... still, I hope that this will be the norm going forward.

Shows how the text-based foundations that underpin GC really shine when dealing with lists... compared with graphic node-based apps like GH.

Some questions:

Introduction

1. Slider > Function Node with Lambda Expression > List methods: name of node.value.ToList{}.To.String{}

2. functionCall3.Average{}

3." from double d in functionCall3 order by d" is a "carry expression"? What are these?

Nested Lists + Transpose

4. Or more Polygon by Point Grid. Are the resultant polygon edges indexed some how? How does the Polygon by PG Node sequence or 'draw' the polygon edges?

5. Autotranspose replication patent. To.List trick should be mentioned in the Help?

6. Great way of generating a rectangular volume.

a. It would good to see if this functionality can be added to the new Grid Node?

b. What would be awesome if the GC Wall, Slab etc Node would then be able to recognise and hook onto the points, edges, faces of the defined volume. Offsets?

c. A quick review of how to get indexing info onto the Tooltips would be great. Points seem to be automatic. What about edges and faces?

Waynes' Example

7. Function that generates separate nested lists based on a Start, Span and nth Row parameter values. Presumably, it would be a doddle to generate another function that would either add or subtract points before sending the 'tartan' point grids to the Polygon By Grid Node.

GNT Example

8. Use of the Sublist method / technique to start and stop the list of points, thereby allowing the user to differentiate the perimeter or edge polygons. Used with a second node to flip the orientation of the GNT. A bit more info on how this works would be great. .

Sublist of Nested Lists (Array)

9. A more localised variation of Wayne's Example. Presumably, this can be used to 'cull' another point list? Also, it would be useful to explore how (or when it is useful) to generate a localised index that would start the 0 index. Taking the Nested Lists + Transpose example above, which generates the walls, floor and ceiling to a 'room' within the 3d grid, it would be good to have a simplified indexing system for the upper NW corner of the box (0,0,1).... that would also pop up in the Tooltip.

Ragged Arrays

10. Use of recursion. Hmmm.

Call for Future topics:

1. A follow on the February 2018 talk on Teamwork, now that we have these new exiciting U4 nodes for Imported GC Models and Model Output Properties would be great. Interesting to note the new developments with XGD. As mentioned elsewhere, maintaining parametric continuity (Relational Modeling) across models is pretty useful.

2. Transactions: Re-build, Split, Suppress, Consolidate

3. Geometry Controllers: it would be very helpful to have a session how to hook parameters up to 3d Controllers that the user can manipulate on screen, not the off screen ones or dialog box hosted one like Sliders. One example from the Unity world.

4. Accessing information in Mstn or ABD objects. Presumably needs to be done using C#. An update on ByElement / Promotion techniques? It would also be good to know if a BuildContent Node could be used to extract DataGroup, Family+Part (or Item Type, Element Template) info from an ABD object.

5. Database Nodes were introduced in U3

6. Optimiser Node introduced in U3 looks very interesting. 

  • Hi Dominic,

    Wonderful, that you appreciated our December 2018 GC SIG. Thank you for your feedback and questions. Here are the responses:

    1. Because the Text node wants to generate text that shows the input property it does not evaluate the expression that it receives. It generates it as text. That is why in this case it is necessary to use ToList( ) which the Text node displays as a series of numbers and ToString( ) so that the Text node displays it as the string that contains a list, with curly brackets and list items separated by commas. In most other cases, nodes will evaluate input expressions to the expected input value type, or indicate an error if that is not possible. Lambda expressions were discussed in GC SIG April 2018 - Query Expressions, Recursion, Curves.
    2. In this demo functionCall3 to FilledList( ) is simply a means to generating a list with numeric values. On lists with numeric values (wherever they originated) several "statistics" methods can be used, like Average( ), Median( ), Minimum( ), Maximum( ).
    3. Pardon my accent. I meant Query Expressions, which were inspired by LINQ (Language-Integrated Query) expressions in C#. These were discussed in above-mentioned GC SIG April 2018 - Query Expressions, Recursion, Curves.
    4. The polygons are generated in the same organization as the point grid. For example, in a point grid generated by replicating X and Y coordinate values, the polygons will be (in Top view) organized in vertical columns (x as first index moving left to right, y as second index moving bottom to top). In each polygon the points are collected from bottom left in counter-clockwise orientation, i.e. for polygon[i][j] the list of vertices is {point[i][j], point[i+1][j], point[i+1][j+1], point[i][j+1]}. The individual segments of the polygons can be accessed as polygon1[i][j].ControlPolygon.LineSegments[k].
    5. Good suggestion.
    6. Also great suggestions. Wall.ByLines could be used, first using some Line technique to derive the lines needed. Wall generation offers the same controls as the placement tools in ABD, including offsets. Fly-over information is available for nodes and sub-nodes. Polygon segments are not sub-nodes (CoordinateSystem.XDirection, however, is).
    7. Generation of Tartan grids could also be based on providing the Tartan spacing as list of distances.
    8. The GNT scripts are included in the hands-on material. The axis-lines for the cones are generated based on the passed-in index. Script snippet inserted below.
    9. Interesting suggestion. Within the sublist, the indexing is localized. An approach would be to create the sublist in an expression into which users then can index the end of that sublist as sublist.Last().
    10. Recursion is very powerful especially when traversing data of unknown structure, i.e. width and depth. The nature of navigating from one data member to the "next" would need to be known, though, also how a leaf node in the data can be recognized. Recursion was discussed in a bit more depth in the April 2018 GC SIG Query Expressions, Recursion, Curves.

    Thank you for your topic suggestions.

    Teamwork follow-up is tentatively scheduled for the September 2019 SIG.

    Optimizer node was discussed in the May 2018 SIG.

    I will add the other topics to our topic backlog. Topic sequence and dates will change depending on number of requests, communicated relevance, and other factors.

    Best success,

         Volker

    function (Polygon poly, int bIndex)
    {   
        Point basePnt = new Point();
        
        int nextPnt = bIndex + 1 < poly.Vertices.Count ? bIndex + 1 : 0;
        
        basePnt.CentroidOfSet({poly.Vertices[bIndex], poly.Vertices[nextPnt]});
        
        int corner1Ix = bIndex + 2 < poly.Vertices.Count ? bIndex + 2 : bIndex + 2 - poly.Vertices.Count;
        int corner2Ix = bIndex + 3 < poly.Vertices.Count ? bIndex + 3 : bIndex + 3 - poly.Vertices.Count;
        
        Line ln = new Line(this).ByPoints(basePnt, poly.Vertices[corner1Ix]);
        ln = new Line(this).ByPoints(basePnt, poly.Vertices[corner2Ix]);
        ln = new Line(this).ByPoints(poly.Vertices[corner1Ix], poly.Vertices[corner2Ix]);
    }