Are there any ways to use existing STL model in SimVascular

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Zhaomin Yao
Posts: 5
Joined: Wed Jun 05, 2019 10:15 pm

Are there any ways to use existing STL model in SimVascular

Post by Zhaomin Yao » Wed Jul 10, 2019 8:07 pm

Hello, I have built the STL model, and I want to know how to do in SimVascular. I have import the STL model by "model->import solid models",but it doesn't show the 3D model. So,are there any ways to use existing STL model in SimVascular
Thanks.

User avatar
David Parker
Posts: 1677
Joined: Tue Aug 23, 2005 2:43 pm

Re: Are there any ways to use existing STL model in SimVascular

Post by David Parker » Thu Jul 11, 2019 8:28 pm

Hi Zhaomin,

When you import a model without first importing image data the coordinate extent is not set. To set the extent right-click on the top SV Data Manager node and select Global Reinit from the menu. This rescales the coordinate extent and your model should be visible.

Note that the file extension for the STL file needs to be .stl, not .STL.

STL is exported from CAD software is typically poor and may not mesh. It is better to export to STEP format.

Cheers,
Dave
Attachments
global-reinit.png
global-reinit.png (357.04 KiB) Viewed 419 times

User avatar
Zhaomin Yao
Posts: 5
Joined: Wed Jun 05, 2019 10:15 pm

Re: Are there any ways to use existing STL model in SimVascular

Post by Zhaomin Yao » Sun Jul 14, 2019 6:45 am

Hi Dave,

Thanks for your reply. I have try your advice but meet a new problem. I want to build a project for blood flow simulation and analysis. I have already a .stl or .step model.

1. I want to import .stl model. I followed the steps below:
(1).create a new SV project.
(2).right-click on the "Models" ,then click the "import solid model". I choose the .stl(PolyData).
(3).but it show a dialog box, which show "No Face Info found . Would you like to extract faces for the model? " If I choose "Yes" ,it'll show another dialog box showing "extract... Separation Angle". After clicking "OK", I right-click on the top SV Data Manager node and select Global Reinit from the menu. But my model still can't been seen. Else if I choose "No", then I right-click on the top SV Data Manager node and select Global Reinit from the menu. But my model still can't been seen.

2. After that, I try to import a model which is similar as above but it's STEP format. After right-click on the top SV Data Manager node and select Global Reinit from the menu, my model finally can be seen. But when I try to generate the "TetGen Meshing" , It shows "TetGen only works with PolyData model".
As you can see, I want to build a project for blood flow simulation and analysis. So, can you tell me how do I import the model and generate the "TetGen Meshing".
Because I'm new to this software, I would appreciate it if you could tell me the steps of "blood flow simulation and analysis".

Cheers,
Zhaomin
Attachments
2.png
The second problem
2.png (142.2 KiB) Viewed 366 times
1.3.png
The first problem
1.3.png (112.57 KiB) Viewed 366 times
1.2.png
The first problem
1.2.png (115.39 KiB) Viewed 366 times
1.1.png
The first problem
1.1.png (117.94 KiB) Viewed 366 times

User avatar
David Parker
Posts: 1677
Joined: Tue Aug 23, 2005 2:43 pm

Re: Are there any ways to use existing STL model in SimVascular

Post by David Parker » Sun Jul 14, 2019 7:23 pm

Hi Zhaomin,

STL files don't have any information about the model faces (wall or cap) so that needs to be determined by SV, thus the message No Face Info Found. I am curious about why your STL can't be seen. Can you put the model someplace (e.g. Dropbox) where I can download it?

STEP files have information about the model faces so that does not need to be determined by SV. However, you still need to identify which model faces are caps and walls, caps are at the inlets and outlets of vessel models. See the attached picture.

STEP files most likely contain NURBS surfaces which can't be meshed using the TetGen mesher. The model must therefore be converted into Polydata format (polygonal mesh). You can do this be selecting the very large Convert to Polydata... button on the SV Modeling Tool panel.

Sorry for the confusion, the documentation is not clear on these points. I'm working on improving the documentation.

Cheers,
Dave
Attachments
modeling-set-cap.png
modeling-set-cap.png (95.67 KiB) Viewed 356 times

User avatar
Zhaomin Yao
Posts: 5
Joined: Wed Jun 05, 2019 10:15 pm

Re: Are there any ways to use existing STL model in SimVascular

Post by Zhaomin Yao » Mon Jul 15, 2019 3:31 am

Hi Dave, Thanks for your advice. :D

But because some reasons your advice didn't work in my computer. :shock:

1. I have import a solid model which is .step format. I want to transform it to PolyData. But after click the model in SV Manager, the SimVascluar goes wrong. It just didn't work. See the attached picture.My operation system is Windows 10.

2. How can I give you my model. mail? Or something else?

Cheers,
Zhaomin
Attachments
1.png
1.png (137.96 KiB) Viewed 330 times
2.png
2.png (131.4 KiB) Viewed 330 times

User avatar
David Parker
Posts: 1677
Joined: Tue Aug 23, 2005 2:43 pm

Re: Are there any ways to use existing STL model in SimVascular

Post by David Parker » Mon Jul 15, 2019 10:01 am

Hi Zhaomin,

I'm not sure what is happening, seems like SV is getting stuck somewhere. What messages are being written to the SV console window (the window that SV opens when it starts)?

STEP files are small so you can zip it and attached it here and I'll have a look.

Cheers,
Dave

User avatar
Zhaomin Yao
Posts: 5
Joined: Wed Jun 05, 2019 10:15 pm

Re: Are there any ways to use existing STL model in SimVascular

Post by Zhaomin Yao » Mon Jul 15, 2019 6:27 pm

Hi Dave,

After clicking on the .step model, no messages are being written to the SV console window. It just didn't work. Attached is the picture.

I have attached my .stl and .step model. The .stl model can't be seen on my SimVascular. The .step model can't be transformed to PolyData. The model can't be attached directly, so I compress them in .zip format.

Thank you sincerely,
Zhaomin
Attachments
stl_and_step_model.zip
(465.36 KiB) Downloaded 14 times
After_clicking_step_model.png
After_clicking_step_model.png (197.98 KiB) Viewed 298 times

User avatar
David Parker
Posts: 1677
Joined: Tue Aug 23, 2005 2:43 pm

Re: Are there any ways to use existing STL model in SimVascular

Post by David Parker » Tue Jul 16, 2019 12:39 pm

Hi Zhaomin,

Thanks for the files!

I tried reading the first.stl but got the error STLReader error reading file: first.stl Premature EOF while reading extra junk. I was able to read the file using MeshMixer, export it and read it back in using SV and display it OK.

The problem with this model is that there are two ends that are capped by non-planar surfaces. SV expects vessel models that have inlets/outlets that are open (can be later capped by SV) or capped by a planar surface.

I also tried reading in the STEP file. This froze SV, just like you saw, not sure what is happening here. I was able to read the model using FreeCAD but there was a missing face at one of the non-planar caps.

I think if you removed the non-planar caps then SV could work with this model. You will also need to make a better (smoother) bifurcation between the main and branch vessel, the geometry at the intersection is a bit rough and the mesher may have a problem with that.

Cheers,
Dave
Attachments
stl-model.png
stl-model.png (342.14 KiB) Viewed 281 times

POST REPLY