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.

Tips for STL Import?

Please login with a confirmed email address before reporting spam

Hello all,

I've been struggling with the import of a simple coil. Was wondering if anyone had any tips for how to build an STL file for the best success. I've attached a few images, no matter what combination of Normal/Surface deviation I use, I can't seem to get a clean import.

Any help is greatly appreciated. I am aware there is a CAD module, but it is out of our budget at the moment, so I am stuck with trying to get STL to play nice.

Thanks!


1 Reply Last Post 4 mar 2016, 06:06 GMT-5
COMSOL Moderator

Hello Thomas Ales

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 8 years ago 4 mar 2016, 06:06 GMT-5
Hello Thomas,

The first thing you should make sure is that the stl is well-defined: no intersections, no holes, all triangles nicely attached to each other... Most programs that generate stl surfaces have functions to check these. I have no experience with Autodesk so cannot help you specifically with that.

The next important thing to realize is that Comsol applies a 'boundary partitioning' algorithm when importing STL's. This algorithm fits smooth, curved surfaces through the STL triangles, reducing the number of boundaries in the geometry. This algorithm is (as far as I know) rather blackbox and not very reliable for complicated STL's. My solution for this is to omit this step. How this is done depends on the Comsol version you use. If you use 5.2, importing an STL happens in a Mesh Part node. In the Import node, select 'Detect faces' for the option 'Boundary partitioning'. Then, set 'Maximum boundary naighbor angle' to 0 and disable 'Detect planar faces'. If your version is older than 5.2, these settings are in the import node of Geometry.

This is the safest way to import stl's. The (big) drawback here is that the Comsol mesher is then bounded to preserve the triangle edges, which could results in a mesh that is finer than necessary and possibly in worse element qualities. Therefore, I suggesd to make the STL as coarse as you are comfortable with before importing it in Comsol.

Hope this helps! If you have other insights on this topic in the meantime, please share because I have struggled in the past with importing stl's and have not yet found a perfectly satisfying solution.

Kind regards,
Daniel
Hello Thomas, The first thing you should make sure is that the stl is well-defined: no intersections, no holes, all triangles nicely attached to each other... Most programs that generate stl surfaces have functions to check these. I have no experience with Autodesk so cannot help you specifically with that. The next important thing to realize is that Comsol applies a 'boundary partitioning' algorithm when importing STL's. This algorithm fits smooth, curved surfaces through the STL triangles, reducing the number of boundaries in the geometry. This algorithm is (as far as I know) rather blackbox and not very reliable for complicated STL's. My solution for this is to omit this step. How this is done depends on the Comsol version you use. If you use 5.2, importing an STL happens in a Mesh Part node. In the Import node, select 'Detect faces' for the option 'Boundary partitioning'. Then, set 'Maximum boundary naighbor angle' to 0 and disable 'Detect planar faces'. If your version is older than 5.2, these settings are in the import node of Geometry. This is the safest way to import stl's. The (big) drawback here is that the Comsol mesher is then bounded to preserve the triangle edges, which could results in a mesh that is finer than necessary and possibly in worse element qualities. Therefore, I suggesd to make the STL as coarse as you are comfortable with before importing it in Comsol. Hope this helps! If you have other insights on this topic in the meantime, please share because I have struggled in the past with importing stl's and have not yet found a perfectly satisfying solution. Kind regards, Daniel

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.