Importing and Analyzing Measured Geometries

The statistical analysis of measured geometries is typically used for uncertainty quantification or to analyze the true geometry instead of the CAD0 geometry. Often the measurements are given by 3D surface scans saved to STL files. STL files define a triangularization of the boundary of the scanned object.

You typically cannot use STL files originated by a 3D scanner directly. You must usually perform these steps before using them:

Repair the surface.

Fill holes, remove outlier points, and remove false detections.

Adjust coordinate systems.

Scale all measurements to the same physical unit (such as inches or millimeters) and translate and rotate them into the same position. oSP3D supports this process by automated coordinate alignment strategies, but in most applications a manual approach is more reliable and accurate.

Coarsen the mesh.

Try to coarsen the segmentation to a minimum number of surface triangles. Typically, you are interested in global deformation shapes. Further, the triangulation of the measurements need not be more accurate than the discretization level of the oSP3D reference mesh.

This multi-part tutorial consists of procedures for:

Importing Measurements

To import measurements:

  1. Select the reference mesh, taking into consideration these guidelines:

    • Choose one of the measurement STL files if you are interested in only the statistics of the measurements.

    • Choose a FEM mesh if you also want to quantify the deviation from CAD0.

    • Choose the FEM mesh template being used in the simulation model if you also want to generate new imperfections or apply the measurement to a FEM mesh. In this case, it is important to mesh the model once (export it to oSP3D) and keep the mesh untouched afterwards. oSP3D will refer to the same mesh topology (node and element identifiers) when exporting the morphed meshes to the CAE solver.

  2. Define carefully the required named selections, taking into consideration these guidelines:

    • A fixed node set is the part of the boundary that is not to be modified and must remain unchanged. If the whole boundary is not part of the reference node set, you should define a fixed node set to avoid spurious rigid body motion in morphing.

    • A reference node set is the part of the boundary that is used to store the relevant information from the measurements. Relevant information consists of the coordinate deviations between reference mesh and measurement. This typically excludes boundary regions where:

      • The consideration of geometric deviation is not important

      • The deviations are measured erroneous

      • Clamps, sensors, fixations, or other devices are located that are part of the scan but are not part of the considered structure


    Note:  The fixed node set should always cover symmetry planes. Between the fixed node set and the reference node set, it is required to place a number of free node or element rows that relax the geometric morphing between the directly changed and unchanged parts.


  3. Collect all measurements in a design directory structure just as if you are performing a DOE in optiSLang:

    project dir
      Design0001/measurement.stl
      Design0002/measurement.stl
      ...
      Design00xx/measurement.stl
    

    For more information, see Performing a DOE in optiSLang.

    Instead of using STL files, you can use FEM mesh file formats. The registration of the geometric deviations is identical. For this tutorial, in oSP3D_examples\lsdyna\metal_forming__eroded_elements\sampling, you can use the LS-DYNA Dynain file ref-mesh.k as the reference mesh and Design0001/NW/mesh.k as the measurement.

  4. To import multiple measurements, select File > Process multiple designs > Import field designs.

  5. On the Reference design page, click Add File to define the template for the import.

  6. Select the file format LS-DYNA Dynain and then the file ref-mesh.k.

  7. For Path of reference design, select oSP3D_examples\lsdyna\metal_forming__eroded_elements\sampling\Design0001/NW to use the measurement mesh file mesh.k.

    Once oSP3D detects a mesh file is among the files to be imported, it provides the options to import:

    • The nodal coordinate deviations along the x, y, z axis

    • The nodal coordinate deviation along the normal vector (either as a strictly positive number or a signed distance with positive being pointing outside of the structure)

    • The nodal coordinates of the measurements (with respect to the node numbering of the reference mesh) along the x, y, z axis

    Typically, you are interested in:

    • The nodal coordinate deviations along the x, y, z axis, which you use to create a cross-correlated empirical random field model for the generation of morphed meshes

    • The nodal coordinate deviation along the boundary normal, which you use for:

      • Analysis of correct data mapping

      • Statistical analysis of material wear (removal) or growth (addition)

      • Synthetic random field models for generation of morphed meshes and, therefore, deactivate NodeCoordinates from import

  8. Select the mash mapper, which defines by which algorithm the coordinate deviates.

    Consider these guidelines for selecting the mesh mapper:

    • If the FEM meshes are compatible (have identical node and element numbering), you should select the Compatible mesh mapper. This mapper captures the true deviation vectors of all nodes, including the interior nodes.

    • The default selection, Incompatible (assuming a smooth boundary), creates normal vectors at each boundary node of the reference mesh and search long this direction to find a projection point on the measurement surface. If there are holes in the measurement, they are collected and highlighted as missing items and their values will be restored in oSP3D by interpolation. Missing items also include all interior nodes and the FEM boundary nodes that are located at topological areas like sharp edges where a nodal normal vector cannot be computed robustly.

    • The Incompatible (explicit closest point projection) mapper searches along rays that are not necessarily parallel to the boundary normal vector to try to find the closest point on the measurement surface that is closest to each boundary node of the reference mesh. This mapper may be inefficient for large search distances and find meshes.

    • The User specified direction mapper is a special case. In this mapper, you can define a direction along which to search the intersection of the ray, starting from each reference mesh boundary node with the boundary segments of the measurement. This is interesting when dealing with data that is typically associated with flat surfaces.

    • Most other mesh mappers are special mappers for grids (like matrix, image, or signal data) or for mapping point cloud data without geometric deviations. These mappers are not applicable here.

  9. Click Settings to specify settings for the mesh mapper.

    Here are descriptions of some of the important settings:

    Maximum search distance

    This is the maximum distance of allowed deviation that will be detectable by the mapping algorithm. If the maximum search distance is smaller than the distance of a projection point, the projection point will be marked as missing and the corresponding deviation value will be interpolated in oSP3D based on the neighboring values.

    If the magnitude of geometric deviation is known, use this value. Otherwise, start with a large value. You may typically need to import all data twice: First with a large search distance. Then analyze if any erroneous detections appeared. This can happen at sharp corners or at the boundaries, but sometimes it can also happen in between (mostly due to numerical round off errors). To find and resolve erroneous detections:

    1. Compute the lower and upper envelope over all designs of CoorDeviationNormal by selecting Statistics > Value ranges and then Minimum sample values and Maximum sample values. For more information, see Calculating a Range of Minimum Sample Values and Calculating a Range of Maximum Sample Values in the optiSLang 3D Post-Processing User's Guide.

    2. Visualize both side by side.

    3. For the minimum sample value plot, identify the smallest (negative) value that is acceptable. For the maximum sample value plot, identify the largest (positive) value.

    4. Delete all imported data.

    5. Reimport the data with a modified maximum search distance that cuts off the erroneous detections.

    Adjust coordinate system

    For some cases, oSP3D can align the measurements automatically to the position of the reference mesh by applying a rigid body motion before the nodal coordinate deviations are computed and the data mapping is applied. The default is no, but you can choose from these transformation types:

    • Auto translate: Moves the measurement according to center of origin.

    • Auto translate and rotate (simple): Moves the measurement according to the center of origin and rotates by comparing the inertia tensor.


      Caution:  For nearly symmetric bodies this approach may lead to the wrong rotation.


    • Auto translate and rotate (best fit): While similar to Auto translate and rotate (simple), this iterative algorithm minimizes the average coordinate deviation between the measurement and the reference mesh that is obtained by the closest point projection. The closest point projection algorithm is applied according to the selected mesh mapper.

    • Auto translate and rotate pre-aligned (best fit): The only difference between this option and the previous one is that this option does not apply the simplified move and rotation based on the inertia tensor. This option, which can be used for pre-aligned data, tries to avoid that the auto-rotation may produce erroneous results when dealing with symmetric bodies.

    If FEM meshes are used for the reference mesh and measurement and nodal named selections are stored in the mesh files, then you can specify the auto-alignment algorithms in such a way that they do not align with respect to the whole boundary but only to the boundary nodes being part of the named selection. You can use this feature to define reference points or reference areas in the measurements.

  10. Click OK to save your settings.

  11. Before continuing the statistical analysis, verify that the mapping algorithms are working properly:

    1. In the visualization, check the histogram of the value palette for potential outliers (very small or very large deviation values).

    2. If there are missing items, check the distribution for CoorDeviationNormal by selecting Statistics > Errors and differences > Minimum sample values. The result shows you the percentage by which a projection could not be found for each FEM node. This may be acceptable for sharp edges or at free boundary edges or for interior nodes but not for larger areas, which is a sign for a bad coordinate system. Use the traffic light plot here and choose a small number such as 0.0001 as the lower bound to highlight areas with false projections.

    3. Identify the designs for which the error appears. Select some nodes in the areas with erroneous missing items. In the visualization, select the command Create scalars. List in the data object table all scalar designs. For designs with missing items, no scalar was created. These need to be checked in more detail for false mesh mapping.

  12. Click Next and define the design directory names to be imported and the corresponding design numbers.

  13. Click Finish.

Analyzing Measurements

When dealing with geometric measurements, always consider using RPCA for statistical filtering. You should compare the means and standard deviations of the original and filtered quantities to check plausibility of the input data and the filter. If the filtered data is acceptable, continue all analysis based on the filtered data.

Standard statistical evaluations are for CoorDeviationNormal:

Mean

Gives "average" coordinate deviation in the production process that can indicate some dangerous trends.

Standard deviation

Shows areas with large variation. These could be areas with an unstable production process. Areas with nearly zero variation indicate post-production manufacturing steps like polishing. Always watch for these potentially critical indicators:

  • Values with a large mean and small variation

  • Values with a zero mean and a large variation

Minimum sample values

Gives the lower bound of deviation among all measurements.

Maximum sample values

Gives the upper bound of deviation among all measurements.

Range of sample values

Gives the actual range of variation among all measurements.

Quantiles

Provide for computing lower and upper bounds based on probabilistic measures, such as the 0.05 quantile (lower 5% exceedance) and the 0.95 quantile (upper 5% exceedance) values.

Mean + k-sigma values

While equivalent to a quantile computation, this metric can also be applied for small numbers of measurements.

Standard errors

Indicate if enough measurements were analyzed to have robust estimators for the mean or variance.

If enough data is available, consider creating an empirical random field model of CoorDeviationNormal. Such a model would show how many different variation patterns (production mechanisms) act on the structure and give you an idea of independent regions and number of required shape parameters.