3D Data

Modified on Thu, 17 Aug, 2023 at 10:53 AM

Description

With this function you import 3D data into a notebook.


Application

If your use case involves 3D data you need this function to import that data before starting any data processing or modelling.


How to use

Please refer to the article What are the supported file types for 3D data? to check which file types can be imported with this manipulator.

The 3D importer dialog consists of four sections as shown in the image below.

  1. Selected files are displayed in this region
  2. Click this button to add files to the selection or edit the current selection. Refer to the article on How to select files for more info.
  3. This code section allows you to define the IDs of your 3D samples. By default the filename is used.
  4. Assign a name to the dataset which is created from the imported file(s). All other functions are going to refer to the imported dataset via this name.
  5. Option to automatically tabularise the 3D data on import.

If Also generate a table of 3D data is enabled a tabular dataset will be generated additionally. This will contain one row for each mesh point for each 3D sample in your dataset. The table will look like this:

xyzIDField1Field2
..................

The table contains the coordinates for each data point and the ID it belongs to. If the 3D file contains any fields (e.g. pressure, temperature, stress) each field will be added as a column.


More on this step

If your filename isn’t the ID which should be used for the 3D objects you can change the method filename_to_id to change the ID. The filename is the only input which is available in the method. Make sure that all IDs you generate are unique. Otherwise, you won’t be able to distinguish your samples. The 3D import will run through but you get a warning afterwards:

WARNING: Some mesh file names could not be resolved into unique mesh_ids.

Below are some examples how to change the ID. You can change and/or combine them to adapt to your situation.

Split filename by '-' and use first element of result

filename.split('-')[0]

Replace a string by something else

filename.replace('old', 'new')

Delete a sub-string from filename (replace by empty string)

filename.replace('old', '')

Split and replace combined

filename.split('-')[0].replace('old', 'new')

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article