Scale after building the model

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
mehrdad roustaei
Posts: 16
Joined: Wed Oct 03, 2018 10:40 pm

Scale after building the model

Post by mehrdad roustaei » Sun Feb 02, 2020 6:22 am

Hi,

I have used images with custom resolution to build my model (0.5 um resolution is considered as 1 length unit). Is there any way to scale the geometry after model is built or it can only be done when importing the image?

Thank you.

Best,
Mehrdad

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

Re: Scale after building the model

Post by David Parker » Mon Feb 03, 2020 10:28 am

Hi Mehrdad,

The SV Modeling Tool does not have scaling. You can scale the model written by SV to a .vtp file using VTK. You can use the script here https://github.com/ktbolt/cardiovascula ... olydata.py to do that.

Cheers,
Dave

User avatar
mehrdad roustaei
Posts: 16
Joined: Wed Oct 03, 2018 10:40 pm

Re: Scale after building the model

Post by mehrdad roustaei » Wed Feb 05, 2020 5:24 pm

Thank you!

User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

Re: Scale after building the model

Post by Charlie Bright » Thu Dec 10, 2020 1:25 pm

Hi Dave,

I was just wondering if there are any similar methods for scaling a Parasolid model?
I'm having trouble setting up a 1D simulation and I'm guessing my scale is the culprit.

Thanks,
Charlie

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

Re: Scale after building the model

Post by David Parker » Thu Dec 10, 2020 9:29 pm

Hi Charlie,

There is currently no way to scale a Parasolid model in SV. I am planning on adding that to the Python API some day.

The 1D simulation assumes CGS units so you will need to scale your model.

You could scale the model using SolidWorks if you have that. If not then you would need to scale it programmatically using C/C++ and the Parasolid modeling kernel. I could write that for you if you want.

Cheers,
Dave

User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

Re: Scale after building the model

Post by Charlie Bright » Fri Dec 11, 2020 7:21 am

Hi Dave,

Cheers for the speedy reply and for clearing up the units. :)

I hadn't thought about opening the .xmt_txt in Solidworks - the txt threw me off.
Scaling through there worked like a charm (though to future readers: you may need to rename the exported .x_t files back to .xmt_txt)!

I think my issue should be sorted now, although I do think a C script would be useful addition to SV, especially for those using a Mac.

Thanks for all your help,
Charlie

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

Re: Scale after building the model

Post by David Parker » Fri Dec 11, 2020 11:13 am

Hi Charlie,

I'm glad you were able to use SolidWorks to scale the model, nice simple solution!

I will add model scaling to the SV GUI and Python API next year, a few issues with the SV modeling API I need to clear up first.

Cheers,
Dave

POST REPLY