Objective:
Learn what a list is and how to use them.Procedure:
What is a list?
Creating Lists
List Errors
Lists in Lists
List Properties
Manipulating Lists
Auto-Populated Lists
Lists of One (1)
Groups
Using Lists
What is a list and list processing?
All blocks in nTop can exist as singular entities or as a list. A list contains multiple items of the same type in a block, like a list of points. When a process runs on a list block, it runs the process on every list item. Working with list blocks is called List Processing.
Creating Lists
To create a list of any type, type ‘list’ into the search bar, along with the block type you would like to create. Lists are denoted in nTop by three small rectangles of increasing width in the bottom left corner of the data type icon. The list size is shown in parentheses next to the Block type. Not all lists are created from the search bar; some are made unintentionally or automatically with certain blocks. Some blocks turn a singular entity into a list, and some merge lists together.
List Errors
- Invalid list item at index:
- Input list length mismatch.
Lists in Lists - Inputting a list block within another list block
A list block can’t be input into another list block. However, if you want to input a list into a block that doesn’t accept lists, you can create a Custom Block to run the list instead. This works because the inputs of a notebook are contained in variables, and variables cannot process lists. However, once it’s being used as a Custom Block, it’s a block like any other and, therefore, can process lists. This is not equivalent to putting the list into the input but rather running the Custom Block workflow multiple times, once for each element.List Properties
List block properties contain a set of Properties at the top under the Properties chevron and individual properties for each item under the List Elements chevron. The individual properties can be dragged from a List to create an individual item. The arrow next to the individual entities can be expanded to reveal more information on each individual list entity. You can click and drag the individual chips into the notebook to create a new single variable separated from the list.
Manipulating Lists
There are two methods to add blocks to a list:- Drag a new block into a List block. Remember that all entities in a list must have the same block type (i.e., they must have the same icon in the top left corner of the block).
- Select the ’+’ next to the View Block Details icon to add more inputs. If you add too many, use the ’-’ on the left of the input to remove them.

-
- List Element: Extract a single entity from a list based on its index number.
- Insert: Combine two lists into one by inserting a list into another at a specified index location.
- Sub List: Extract a smaller list from a larger input list based on a starting index and the desired size of the sub-list.
- Remove: Remove one or more entities from a list based on a starting index and the number of removed entities.
Auto-Populated Lists
Some blocks use list inputs and combine them into a singular entity. An example is the Boolean Union block, which takes in a list of bodies and generates a single unioned body. Blocks like this are auto-populated with an empty list, which is useful for quickly dragging bodies inside to complete the operation.

Lists of One (1)
You may encounter a situation where you try to add your parts to a block that accepts a list of inputs, and it won’t let you.

Groups
Groups in nTop are the same as lists, except they can contain a combination of block types. For example, the group below consists of a point, a sphere, and a cube. The same list manipulation operations described can be performed on groups.
Using Lists
- Add a Sphere List (notice the list icon on top of the sphere icon).
- Add a Sphere block into each input of the Sphere List. Change the x-value center point of each sphere to 0, 10, and 25, respectively. Then change the radius to 3, 5, and 8 mm.

- Add a Spherical Volume Lattice block, a Walled TPMS Unit Cell, and enter Approx. thickness of 0.5mm. Now insert the Sphere List into the Body input. This runs the operation on each object in the list.


