User Tools

Site Tools


wiki:sns:intactgh:ex_7

This is an old revision of the document!


Sampling Custom Points

The files for the geometry and setup can be downloaded here: sampling_points.zip

This example will show you how to sample points of an object using the solution sampler block.

First, a point need 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 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 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 to manipulate 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 a large number of points.

wiki/sns/intactgh/ex_7.1691098204.txt.gz · Last modified: 2023/08/03 15:30 by eli