InStep Studio

INSTEP STUDIO

Surface WrapPolygons: Wrap

Time to read: ~3 min

The Wrap tool allows existing data to be completely re-meshed and potentially repair major issues that would otherwise prevent processes from completing. The approach uses all available/selected data and first samples that surface data using a grid and then generates a new set of surfaces using the sample data and the user provided mesh resolution

Example

Clicking on the main Wrap tool bar will switch to the Wrapping tool details in the left hand, Repairs Tab panel. A before view of the standard Blender Monkey (Suzanne) file is shown here:

Image showing original data
Original Monkey Data

Note that this file would generally (without performing one of a number of repair options) not be a successful conversion. The application will, by default, report that the data contains multiple bodies and should be split, which was, in this example, skipped.

Option: Samples

One of the two major choices is the number of samples to use. The values are a power of 2: 32, 64, 128... with a maximum of 512 as this will often represent a case that can be quite demanding of most computers. This number represents the number of cubes that the bounding box is divided into along each side. So if, for example, the data loaded measures 10 x 5 x 3 cm, then a value of Samples of 128 would mean that the largest edge of the box (10cm) is divided into 128 cubes (so 0.78mm) and the data sampled along the X, Y and Z coordinates using this resolution. Doubling this value to 256 has the effect that the overall number of cubes is increased by a factor of 8 (2 for each coordinate). In the worst case where all sides are the same, a resolution of 512 means breaking up the data into 512^3 (134.2 Million) cubes and testing each cube for intersection with the data. This should explain why the upper limit has been set...

Option: Mesh Divisions

The Mesh Divisions are closely related (and use the same logic) but apply to the output rather than the sampling: Once the original data has been sampled, a new set of surfaces are generated using the sampled data to define where data was originally defined.
It is therefore possible to sample and re-mesh at different resolutions, though it is generally recommended that the two be kept somewhat similar with the Mesh Divisions being the same value as the samples or smaller (using a larger value just packs more cells into the result but does not otherwise provide any benefit).

One additional item to mention is that the tool uses a parameter from the Application Settings, under the Repair group: UseParallelForRepairs. This option defines whether the sampling and meshing is to be run on a single thread or in a multi-threaded manner. For smaller files and lower resolutions, the result is not greatly noticeable but for larger files it may consume all available threads and slow other processes down, therefore the default is set to not use the parallel capabilities.

Option: All, Selected, Preview, Clear & Apply

As with the majority of the Repair tools, the possibility exists to apply the tool's capabilities to All currently loaded data or only those selected (if there are multiple bodies). Using the Preview button will show what the result (for the selected bodies only) looks like before making changes. Clearing the preview resets the display data to its current state and the Apply option makes the changes permanent.

Example: Samples at 32, 64 and 256, (Mesh Divisions using the same value)

wrap at different resolutions
Monkey Wrapped at 32, 64 and 256 Samples, using the same values for Mesh Divisions

One item to point out here is that, depending on the sample resolution, some regions may become collapses (as with the ear).

Example: Sample at 32, Mesh Divisions at 128

wrap at different resolutions
Monkey Sampled at 32 and Meshed at 128 cells

From this it can be seen that using a lower sampling rate but higher mesh divisions does not always result in useful data even though the output contains more cells.