Wednesday, April 15, 2015

Back to 'Basics' with LunchBox and Dynamo

Divide a surface to get points, normals, planes, and curvature.
With the rapid expansion of Dynamo, it is easy to overlook the fact that there are still many "smaller" refinements that can be made to improve the workflow.  This is especially true of the cases of list management and basic geometry tasks.

In the latest release of LunchBox, my goal is to expand the basic list and geometry management capabilities of Dynamo. The latest release introduces new nodes for searching, sorting, and organizing list data.  I have also created geometry nodes that provide shortcuts for getting access to properties and enable workflows that I have grown accustomed to from Grasshopper.

This new release also signals the start of a lengthier migration:  I will be converting most of my Python code to a C# node library.  The advantages of doing this are numerous when it comes to how C# libraries handle list management.  I have had to develop many workarounds in my Python nodes and the custom nodes have become a chore to maintain.  Python nodes will be migrated to the "Archive" category as new C# nodes take their place.

So what's new?

Lists
My goal with these nodes is to provide some new means of managing data and fill in a few holes.  I'm also interested in how Dictionaries and DataSets can create advanced data management workflows... these are just the start
Sort and index duplicate strings... I use this for everything :)
  • Manage
    • Remove Nulls - Removes all null values from a list (converted from Python version)
    • Replace Nulls - Replaces all null values in a list
    • Randomize Order - Scramble the order of a list (with index map)
  • Dictionary
    • Create Dictionary - Create a dictionary with keys and values
    • Get Dictionary Keys and Values - Get all keys and values from a dictionary
    • Get Value From Dictionary - Get a value in a dictionary by key
  • DataSets
    • Create DataSet - Create a .NET DataSet
    • Create DataTable - Create a .NET DataTable
    • Get Tables From DataSet - Get all tables from a DataSet
    • Get Data From Tables - Get data from a table
  • Sequence
    • Random Numbers - List of random numbers using start, end, number, and seed.
    • Range Division - A range of numbers using a division (core Dynamo uses "step")
  • Strings
    • Sort Duplicate Strings - Find unique strings with sorted index map
    • Search List for String - Search for matching strings
Geometry
The functionality of many of these tools can be achieved with a combination of core Dynamo nodes.  The goal here is to combine outputs I often use into a single node to reduce the amount of canvas management.  There are a couple of new workflows sprinkled throughout.
Deconstruct PolySurface into faces and points
  • Curves
    • End Points - Get start and end points of a curve
    • Divide Curve - with outputs for points, tangents, planes, and parameters.
    • Divide Curve By Distance - with outputs for points, tangents, planes, and parameters.
    • Deconstruct PolyCurve- Get segments and vertex points of a polycurve.
  • Points
    • Deconstruct Point - Get X, Y, and Z values
    • Numbers to Point - Convert a list of 2 or 3 number to a point.
    • Point to Numbers - Convert a point to a list of numbers.
    • String to Point - Convert a string to a point value (converted from Python version)
    • Point to String - Convert a point to a string. (converted from Python)
    • Sort Points Along Curve - Takes a list of points and orders them using a guide curve.
  • Surfaces
    • Divide Surface UV - Divides a surface into points, planes, normals, and calcuated curvature.
    • Deconstruct Surface - Get the edges and corner points of a surface
    • Deconstruct PolySurface - Get the corner points and faces of a polysurface.