Import SolidWorks parts to OpenSim
- John Rogers
- Posts: 45
- Joined: Fri Feb 24, 2012 11:47 am
Import SolidWorks parts to OpenSim
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. 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.
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. 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 921 times
- Chris Bates
- Posts: 15
- Joined: Fri Feb 24, 2012 11:50 am
Re: Import SolidWorks parts to OpenSim
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.
- John Rogers
- Posts: 45
- Joined: Fri Feb 24, 2012 11:47 am
Re: Import SolidWorks parts to OpenSim
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
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
- Chris Bates
- Posts: 15
- Joined: Fri Feb 24, 2012 11:50 am
Re: Import SolidWorks parts to OpenSim
John,
That would make sense, wouldn't it.
Thanks,
Chris
That would make sense, wouldn't it.
Thanks,
Chris
- Ronald Joy
- Posts: 1
- Joined: Fri Feb 21, 2014 11:15 pm
Re: Import SolidWorks parts to OpenSim
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?
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?
- Ayman Habib
- Posts: 2238
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Import SolidWorks parts to OpenSim
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
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
- Maryam Ashkbous
- Posts: 4
- Joined: Thu Jun 20, 2013 6:08 am
Re: Import SolidWorks parts to OpenSim
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
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
- Davide Simonetti
- Posts: 6
- Joined: Wed Apr 23, 2014 5:47 am
Re: Import SolidWorks parts to OpenSim
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
Regards,
Davide
- Ayman Habib
- Posts: 2238
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Import SolidWorks parts to OpenSim
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
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
- Davide Simonetti
- Posts: 6
- Joined: Wed Apr 23, 2014 5:47 am
Re: Import SolidWorks parts to OpenSim
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
Davide