Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Dimensions and Coordinates look off when importing STL file in COMSOL

Please login with a confirmed email address before reporting spam

I am trying to import a STL file in COMSOL. On importing the STL file created with solidworks, the dimensions and the coordinate axis seems to be off. In the solidworks model, I define the coordinate center (0,0,0) to be at the center of my object. In COMSOL, the coordinate center of the imported STL is at the leftmost edge of the object. In addition, the geometric shape of the object looks fine, however the object seems to be scaled differently, thus showing incorrect dimensions. Is there a way to fix this?

My license does not include the CAD Import Module or LiveLink for SolidWorks.

I have attached the mph,stl, and sldprt files here for reference.



2 Replies Last Post 8 juil. 2021, 15:57 UTC−4
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 7 juil. 2021, 17:30 UTC−4
Updated: 3 years ago 7 juil. 2021, 17:32 UTC−4

I can help you on the scaling part of your question. In your .mph file, under Global Definitions, you'll see Mesh Parts, and Mesh Part 1. Click on that. Under Settings, you can find Units. The default is m (meters). You can change that to whatever the actual units are (for example, inches) of the object you are importing. Then, if you look under Geometry, you'll find that meters is still the default unit system there, but your imported object has now been scaled appropriately in accordance with what you set under Mesh Parts above. In regard to positioning, all I know to suggest is that if you don't like where it is when you import it, move it with a Move operation (Geometry --> Transforms --> Move). There may be a better way than that, but I hope that helps.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
I can help you on the scaling part of your question. In your .mph file, under Global Definitions, you'll see Mesh Parts, and Mesh Part 1. Click on that. Under Settings, you can find Units. The default is m (meters). You can change that to whatever the actual units are (for example, inches) of the object you are importing. Then, if you look under Geometry, you'll find that meters is still the default unit system there, but your imported object has now been scaled appropriately in accordance with what you set under Mesh Parts above. In regard to positioning, all I know to suggest is that if you don't like where it is when you import it, move it with a Move operation (Geometry --> Transforms --> Move). There may be a better way than that, but I hope that helps.

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 8 juil. 2021, 15:57 UTC−4

Thank you so much for the response!

I couldn't get the scaling to work with your suggestions. I have my SLDPRT/STL geometry defined in meters and I followed the steps you provided. However, the COMSOL version geometry is still scaled large compared to the original version.

The move feature worked. Thank you!

Thank you so much for the response! I couldn't get the scaling to work with your suggestions. I have my SLDPRT/STL geometry defined in meters and I followed the steps you provided. However, the COMSOL version geometry is still scaled large compared to the original version. The move feature worked. Thank you!

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.