Texture extraction along a path
This feature allows users to define paths in the geometry and to extract simulation data from the textured facets surrounding the paths.
Usage
The feature is available through Tools/Texture extraction... window.
In general, extracting texture data with this tool consists of two steps:
- defining paths,
- using one of the paths to extract data.
The tool's window organization corresponds to these steps – the top part is used for creating paths, while the bottom part plots the extracted data.
Defining a path
Paths are defined as ordered sets of 3D points. The order of points matters, since each pair of consecutive points defines a vector. Thus, paths are essentially composed of concatenated vectors, as can be seen in the image below.
The top part of the Texture Extraction window is used to create a path. To start creating one, choose the New path... option from the dropdown at the top. By default, the path will be named PathN, where N is equal to the number of existing paths increased by 1. The name can be updated to an arbitrary one.
The Add points panel can be used to add points to the path. As shown in the image below, there are four ways to define a single new point. Multiple points can be added using the Load CSV and Paste from clipboard options.
Once the points have been added, they will appear in the table. The points can be rearranged using the Move up/down buttons, deleted using the Remove sel. row button, or updated by directly altering the values in the table.
Clicking apply will confirm the table of points and create a new path which will be visible in the geometry. Afterwards, the path's set of points and its name can still be updated. Clicking the Clone button will initiate the creation of a new path with the same set of points as the one that is cloned.
Extracting data along a path
To start extracting data, first, a path must be selected from the dropdown at the very top of the window.
The next step is to select the facets that the data should be extracted from. Any existing facet can be chosen, but only those that are textured will be included in the actual extraction. Furthermore, only those texture cells whose centers can be orthogonally projected to the path will be included. Consider the simple example in the image below:
Out of the two selected facets (the two with red edges), only the top one—the one with 20 high-resolution texture cells, shown in different colors—will be included in the extraction. The bottom one will be excluded since it does not have a texture. Out of the 20 texture cells in the top facet, the two on the far left and the two on the far right will be excluded, since their orthogonal projection does not intersect with the path. The image below, taken from another angle, better represents this. It shows that there is no intersection between the path and a vector which originates from the texture cell's center and is perpendicular to the path's direction.
If a path is not a straight line (not all the vectors are colinear), the projection from the texture cell's center will be attempted with all the vectors that define a path. If any of them can be intersected perpendicularly with a line that originates from the cell's center, the cell will be included in the extraction.
Once the path and the facets have been chosen, the only thing left before extracting data is the definition of bins. Bins determine the precision of the data extraction. The selected path is split into a certain number of equal-sized bins. Each texture cell is associated with the bin it orthogonally projects to. If a cell can orthogonally project to muliple vectors of a path, and thus to multiple bins, it will be assigned to the closest one (the smallest distance between the cell's center and the projection point).
Bins are defined in the bottom part of the texture extraction window. The user can specify either the number of bins to split the path into, or the length of each bin. When a value is entered for one of these options, the other will be automatically calculated.
Note: Bins are not visible in the geometry. They are only used to define the precision of the extraction.
After defining the bins and clicking on Add curve for sel. path, a curve will be added to the plot:
The bottom part of the window includes several options and actions:
- Refresh – Due to a potentially big number of texture cells included, the data plot is not refreshed automatically. Clicking this button will refresh it.
- Physical mode – The type of data to extract from the texture (e.g. pressure, impingement rate, particle density...). Default is pressure.
- Avg or Sum – If Avg, each bin shows the average of the data from the projected texture cells, weighted by the texture cell's area. Otherwise, bins present the sum of data. Note: For the # of texture cells physical mode, only Sum is allowed.
- X scale – The scale of the X axis. One of:
- Length – scaled to the absolute length of the path in cm,
- Percent – scaled to 100%,
- Bin index – scaled to the chosen number of bins; each value on the X axis is the index of a bin.
- Copy all data – For perfomance reasons, a maximum of 3000 bins can be plotted. If there are more bins, this button will copy all the data to clipboard and allow pasting to an external tool (e.g. Excel).
- Added curves – Shows a list of all the plotted curves. When one is chosen, it can be combined with:
- Remove curve – removes the selected curve from the plot,
- Select curve facets – selects in the geometry the facets that were used when plotting the selected curve.
- Remove all – Removes all the added curves from the plot.
Path visualization details
The defined paths are visualized as sets of points connected by arrows. The arrows indicate the order of the points.
When the texture extraction window is open, all the existing paths are visible. The path that is selected in the dropdown at the top of the window is visualized differently from the rest. Also, when a point is chosen in the list of points, it is highlighted in the geometry and its coordinates are also rendered.
When the texture extraction window is closed, paths can still be visualized if the Paths option is checked in the 3D Viewer settings sidebar.
Apart from selecting them in the texture extraction window, path points can be selected using a specialized cursor mode. This cursor mode is available in the bottom right corner of the application window.
When this cursor is selected, points belonging to any path can be chosen. The selected point will again be highlighted and rendered with its coordinates. If the texture extraction window is open and the selected point belongs to path selected in the dropdown, the point will automatically be selected in the points list.
Note: Automatically selecting a point in the geometry when one is selected in the points list, and vice versa, works only for the paths that are applied and are not in edit mode. When a path is in edit mode, a small icon and an Editing... message will appear next to the path's name:
A path is in edit mode if its points list or its name have been altered, but not yet applied.