Import SolidWorks parts to OpenSim

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
John Rogers
Posts: 45
Joined: Fri Feb 24, 2012 11:47 am

Import SolidWorks parts to OpenSim

Post by John Rogers » Sat Jul 28, 2012 10:56 am

Several people have asked on the forum about importing cad models to OpenSim.
Here is my progress so far using SolidWorks.
Transferring whole assemblies is not possible as of version 2.4.

See the attached pdf file for detailed instructions

In this example a part is added to an OpenSim model of the pelvis-femur, Fig. 1. The part is free to rotate.
solidworks part in OpenSim.jpg
solidworks part in OpenSim.jpg (7.07 KiB) Viewed 4961 times
Summary of steps:
Determine the coordinate system used by the OpenSim model.
Design the parts in SolidWorks paying attention to the coordinate system.
Find the mass properties from SolidWorks (Evaluate tab > Mass Properties). Find:
Mass
CG location
Inertia matrix about CG
Add bodies, joints, and coordinates via XML to the OpenSim model.
Attachments
SolidWorks parts to OpenSim.pdf
(350.3 KiB) Downloaded 939 times

User avatar
Chris Bates
Posts: 15
Joined: Fri Feb 24, 2012 11:50 am

Re: Import SolidWorks parts to OpenSim

Post by Chris Bates » Wed Aug 01, 2012 9:20 am

Great write up. Have you had problems with scaling issues? Any time I draw something in SolidWorks to import into OpenSim I have to scale the geometry down to 0.001 for all x, y, and z to get the correct size. I'm guessing it could be the "Do not translate STL output data to positive space" as I haven't done that when making it an stl file.

User avatar
John Rogers
Posts: 45
Joined: Fri Feb 24, 2012 11:47 am

Re: Import SolidWorks parts to OpenSim

Post by John Rogers » Sun Aug 05, 2012 3:53 pm

Hi Chris,
Set your units in Solidworks to meters.
The default in SolidWorks is millimeters, and OpenSim uses meters.
Tools > Options... > Document Properties tab > Units > select MKS.
Cheers,
John
setSolidWorksUnits.jpg

User avatar
Chris Bates
Posts: 15
Joined: Fri Feb 24, 2012 11:50 am

Re: Import SolidWorks parts to OpenSim

Post by Chris Bates » Mon Aug 06, 2012 8:44 am

John,

That would make sense, wouldn't it.

Thanks,
Chris

User avatar
Ronald Joy
Posts: 1
Joined: Fri Feb 21, 2014 11:15 pm

Re: Import SolidWorks parts to OpenSim

Post by Ronald Joy » Sat Feb 22, 2014 6:15 pm

Hey John,
I followed the instructions you had on the pdf, which were great by the way. Problem is, the CAD part has been uploaded, but the skeletal model has disappeared. Any ideas?

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Import SolidWorks parts to OpenSim

Post by Ayman Habib » Thu Feb 27, 2014 11:36 am

Hi Ronald,

Could it be a units issue where the size of the part you added is much bigger than the rest of the OpenSim model so the model either ends up too small or embedded inside the imported part? I'd suggest you hide the imported part and see if the model is still visible.

Please let us know how it goes,
-Ayman

User avatar
Maryam Ashkbous
Posts: 4
Joined: Thu Jun 20, 2013 6:08 am

Re: Import SolidWorks parts to OpenSim

Post by Maryam Ashkbous » Fri Feb 28, 2014 9:47 am

Hello
I have Chris's problem and I tried Ayman's suggestion. But the problem has not been solved yet! Do you have any other suggestion Ayman?

Thanks
Maryam

User avatar
Davide Simonetti
Posts: 6
Joined: Wed Apr 23, 2014 5:47 am

Re: Import SolidWorks parts to OpenSim

Post by Davide Simonetti » Mon Apr 28, 2014 1:47 am

Thank you very much for the pdf guide. Because i'm new in XML sector, could you suggest me a free editor to start writing XML?
Regards,
Davide

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Import SolidWorks parts to OpenSim

Post by Ayman Habib » Mon Apr 28, 2014 10:09 am

Hi Davide,

You can use Notepad++ from http://notepad-plus-plus.org/. Check the documentation page below for more details.

http://simtk-confluence.stanford.edu:80 ... el+Editing

Best regards,
-Ayman

User avatar
Davide Simonetti
Posts: 6
Joined: Wed Apr 23, 2014 5:47 am

Re: Import SolidWorks parts to OpenSim

Post by Davide Simonetti » Tue Apr 29, 2014 1:30 am

Thank you Ayman! I've seen the file and I started using Notepad++. Now i've got another issue: if i have to import a group of parts from Solidworks (.SLDASM), do I have to import one by one or there is a way to get them all together?

Davide

POST REPLY