🧰The files for the geometry and setup can be downloaded here: sampling_points.zip
*Legacy* files for Rhino 7 can also be found here: sampling_points_rhino7.zip
This example will show you how to sample points of an object using the solution sampler block.
First, a point needs to be placed on/in the geometry. This works with many points, but for this example, we will just sample one. The point is located on the geometry here.
It is necessary to use a point or geometry object to reference this point from Grasshopper. This can be done by right-clicking and setting the point.
Now, the solution sampler object can be placed. Connect the solver output to the solution input on the solution sampler. The sampler will display the results from the last solved simulation. Note that the material input is left empty since all components in the assembly are of the same material (Aluminum 6061).
The outputs of the solution sampler are (T) is a list of the solution quantities and its corresponding index. The index corresponds to the values (V). The final output is a list of the points (P) that were sampled.
It is notable that the (V) output was flattened. This makes the solution quantities all appear in one branch. It is recommended to connect a panel and experiment with what flatten, graft, simplify, and reverse do for manipulating data.
To isolate a specific solution quantity, it is useful to use a list item object. Set the index of the solution quantity you'd like to sample, and the output will correspond. For example, this is how you sample the von mises stress at the point. This is especially helpful when sampling many points.
The list of points and their indexes can be found by connecting a panel to the points (P) output.