Importing data
3D Data
One of the key differentiators of Dessia Technologies is the ability to perform advanced calculations on 3D data, unlocking the true potential of generative engineering.
Supported Formats
Using our robust 3D data library, volmdlr, we enable users to import and export geometry in the STEP file format efficiently. Additionally, we support faceted geometry imports from STL files, providing flexibility for different use cases.
Why STEP?
In line with industry standards, we have adopted the STEP file format as our standard for 3D data interoperability. STEP has become increasingly popular for exchanging data between various software applications, including CAD, PDM, and analysis tools. Its versatility and widespread adoption ensure seamless integration and data consistency.
Standard Workflow for Importing 3D Data from a STEP File
On the Dessia platform, 3D data is managed using an object called VolumeModel
. This object provides a convenient class method, from_step
, for importing STEP files. The typical workflow involves the following steps:
- Open your workflow builder in bot store → new
- Add block → ClassMethod
- In the form choose in the method type filed volmdlr → model → VolumeModel and then search for from_step_steam method. You can give a name to this block in the Optional fields section and them click save. In our case, step data is imported as a VolumeModel, so as we have a classmethod that instantiate a VolumeModel the workflow consist in only one block.
- You are almost all set up! You just need to select an output for the workflow. To do this, either double-click on the desired output or right-click, then choose the Set as workflow’s output option. It will be highlighted in red.
That’s it, if you want to visualize the imported file you can add a cadview block as shown bellow
Standard Workflow for Importing 3D Data from a STL File
The same logic precious logic applies to STL files. But currently, as we’re talking about a faceted representation we will import directly as a Mesh3D object.
Follow steps 1 and 2 from previous tutorial and when setting up the classmethod block search for: volmdlr → display → Mesh3D and then select the method from_stl_stream
Others CAD file formats
The importing of poprietaty CAD files, like, CATIA V5/V6, JT files are also supported with the add-on volmdlr_converter
First, make sure that volmdlr_converter is well installed in you environment, you can check this, going on https://your-platform.dessia.cloud/admin/applications (opens in a new tab):
Note:
volmdlr_converter
is not included in the standard Dessia package. If you need to import third-party proprietary data, you must request to have this add-on included in your platform license.
Then, open your workflow builder and follow steps below:
-
Add block → ClassMethod
-
In the form choose in the method type filed volmdlr_converter → core→ CADFile and then search for from_file_stream method
-
In the optional fields you can give a custom name to this first block. Finally you can click on save and this first block should appear in your workflow builder:
Then we will add another block, this time we will use a model method of CADFile, that allow to convert the content of the uploaded file into a VolumeModel, that is the data model used in dessia platform to manage 3D data.
- Add block → ModelMethod
- In the form choose in the method type filed volmdlr_converter → core→ CADFile and then search for to_volume_model method.
- Again you can choose a name for this block and finally click on save.
To conclude you need to connect the return value of the first block that is a classmethod and will return a CADFile object into the entry of the to_volume_model model method of CADFile. Finally, you double-click in the return of to_volume_model block to indicate that this is the result of the workflow. It should turn into red.
If you want to visualize your CAD file, right after importing it you can add a cadview block.
I think at this level you got the logic of the workflow builder, but as the return is a VolumeModel, when you select the cadview you should choose, volmdlr → model → VolumeModel
Catia V5
For CATIA V5 file we have two scenarios: .CATPart, .CATProduct
For .CATPart file you can use the same approach as in the previous workflow, but for .CATProduct we will need to use others classmethods from the CADFile because .CATPRoduct is a file that references others files that can be .CATPart or .CATProduct, so we need to provide all the files that are going to be called during the reading. For this, we’ve provided two options:
from_multi_files_stream
from_zip_file_stream
The workflow is the same as before, you just need to edit the first block and choose on of the mentioned methods above:
You can now save and run this workflow, in the required fields you will be asked to select you file, make sure the file appear in the select file window to the right of the Drag & Drop zone after you have selected it from your local machine. You need also to give a name to the task. So you can submit this task.