Correctly converting CAD files into STL files is very important in order to print accurate parts. An STL file is a triangulated approximation of a 3D CAD model. The amount of triangulation in the STL file will effect how faceted the surface of the part appears once printed. Too few triangles, and a circle becomes a stop sign. The level of triangulation, and effectively the amount of faceting, can be controlled during the CAD export to STL. Just as it is possible to have too FEW triangles define your part, you can also overshoot and have too MANY triangles which creates a large file, and a level of detail that the printers can't achieve anyways.
Convert Stl To Solidworks Part
Today we will be talking about how to adjust the settings in SOLIDWORKS to achieve a good STL file for 3D printing.
In SOLIDWORKS, simply go to File > Save As.
In the Save As window, choose STL as file type. This will unlock an 'Options' button that will allow you to manually adjust the export settings.
Clicking the Options button will bring up the following window. For best results, output as Binary, and set Resolution to 'Fine'. These settings will suffice for most parts, but in some cases, it will be necessary to use a Custom Resolution to increase the number of triangles used.
The following Custom Resolution settings are what was used for the red 'Custom' sphere shown below.
A good rule of thumb to determine whether or not your resolution is high enough is to try and count the triangles on your part. If you can easily count the number of facets across your part, you need to increase resolution, and if you can't see any faceting at all, and your file size is very large (20+MB) you may need to decrease resolution. In the example below, the Fine setting is going to print well, even though you can still see some slight faceting. The Fine setting gives us the best mix of resolution and file size. On more complex parts, the Custom settings can quickly increase the file size of a part, causing the 3D printing software to get bogged down in calculations.
Thanks,
Owen Lu | Application Engineer
51 Answers
Hello every body.
I have the same problem. I have a STL file of a human body, contains million faceted surfaces, and I want to convert this to a unite surface inorder to use in ICEM ANSYS. I try so many things and now I am really tired of it!! please some one help me to overcome this. how can I convert it to a solid body. I also try solidwords. but it said: This STL model has two many surfaces.Try to opening with the graphics body option. what should I do? thanks in advance for your help.
Try this. Worked fine for me.
Answered with a tutorial: https://grabcad.com/tutorials/how-do-i-convert-stl-graphics-to-a-solid-model
Download FreeCad then import the stl file in the 'mesh design' work space. At this point you can clean up your stl using the mesh design tools. Switch to the 'part' work space click on the stl file in the left plane then click on the part menu, scroll down to 'create part from mesh' then wait. If the mesh is very dense it may take a while. You can use other programs like MeshLab to reduce the mesh density to shorten the conversion time. Export the solid model as an stp file. Solidworks, Design Magic both will read in the file and allow its manipulation.
You can also try some reverse engineering software like Rapidform or Geomagic. But do keep in mind if you intend to use them frequently they do cost a whole lot. If it's just for one project try to get a trial version.
I know that SW users will angry with me but i should say it :) If you need it for reverse engineering first get rid of SW. Solidworks have very limited capabilities about working with STL mesh files and reverse engineering. If you want rapid solution Inus technologies can be effective(especially XOR series are very effective). However iam agree with STEF that they are not cheap solutions. If you have just single project that contain stl data and geometry isnt too complex,then Cemal's solution is enough. Also its freeware ( I mean MeshLab) Of course there are some other ways by business plan. For example if we consider you need that conversation ( STL => CAD Type) just for actual project. You can post it to some freelance sites as job posting. So Someone can do it for you with low prices. Just idea
If I recall correctly, Solidworks' STL import utility has a maximum of 20k facets. For objects with over 20k facets, I recommend opening the STL in MeshLab as Cemal recommends then exporting or saving as a .dwg file. in Solidworks you must got go file --> open and select the .dwg file extension in the drop down menu. opening will walk you through a wizard. be warned- using this utility to import files into SW is extremely processor and memory intensive. SW will create a plane and sketch for each facet of the dwg file in an attempt to make a part. There are often geometry errors that aren't always fixable within SW. Mine took overnight to import a file with ~40k fascets and i've got an intel i7 with 8Gb ram and a SSD drive. If possible, avoid importing large STL files into SW because it is extremely taxing on your system. SW will crash if you run out of RAM. It can be done, but i recommend using it as a last resort.
i converted an STL with 70k facets using Meshlab. dwg was not a format option, but dxf was. I selected solid model and curves in the dialog. the file came up 20 minutes later as a 76Mb assembly! But it worked.
Basic considerations for the less experienced with cad files
A well constructed solid model, made up of the least complex geometric entities (lines arcs, surfaces defined by them) is ideal and stable and can be shared without degradation in a solid format (STEP, parasolid, SAT )
IGES and STL files do not contain the original reference geometry to reconstruct the solid and will at the very best result in an approximation.
What happens is the resulting surfaces have many control points (both along and across) that are exponetially more complex and degraded.
As a number of these poorly defined surfaces are used to construct your model process gets time consuming, inaccurate and unstable. As your human model as stl has far to many control points to process efficiently.
A client making breast implants, laser scanned the handmade model with many thousands of points and had a team trying to manipulate the meshes.
I digitized a 9 points around to generate the drive curve, 7 from the nipple down 7 from the nipple up made the along curves and swept a surface that
was the very natural looking and easy to manipulate.
Say the tibia, leg bone, the long section can be lofted with widely spaced simple splines made of a few points from the stl. with slices more closely
spaced as the rate of curvature increases. You have far to much data. then swept.
The moral of the story is STL is pretty much last choice for making a solid
and because it is a dense mesh of triangles some means of extracting the least complex geometry to generate a stable workable model will yield professional results.
My first comment is 'STL is not a graphics file,' it's a 3D data format.
My second comment is 'STL is intended to be an output file, not an input file.'
Your best bet, if you really want to use STL to do what you're suggesting, is to get access to software designed to convert 'point cloud data' into a surface.
What is an STL file? It's basically a file which 'slices' a 3D model into a series of very thin 2D 'layers.' This output is then used to drive a stereolithography (or similar) machine which produces physical prototypes through layer-by-layer deposition.
This file format is not a CAD format, nor is it a graphics format.. it is merely the final step before making that physical part.
Each layer consists of a series of line segments, each of which consists of two end vertices. It is possible, with some data. In this case, the 3D software can convert this into an equivalent 3D surface set, which can then be transformed into a solid (if the data is complete).
That's your ONLY option, and it will not give you parametric, history-based models and assemblies. But it's enough to get you sufficient information to rebuild the part with a high degree of accuracy to the original design intent.
Almost all CAD programs have a way to save or export to the STL file format. Below follow detailed instructions for most common CAD programs.
I've did somthing like that with a 'text data text editor' which convert the coordonate of stl into a acis file (sat) The problem, after, is to find the software able to open it..
Inventor must open the .sat files. The name of the converter i used is 'reaconverter'. It is not a freware but you can do 5 transformations.
There is no way to do it with quality. Best way is redrawing it.
Or you can just try this; (you will probably have empty faces)
Download MeshLab**. Drag drop the stl file through MeshLab, save as the file .dwg Drag drop the .dwg file to Solidworks. The best way again is redrawing the stl file on solidworks.
** http://meshlab.sourceforge.net/
Ok, it's going to take a few weeks but I guess I don't have a choice.
I haven't done but you could try opening it in Rhyno changing it to nerbs which if you have less than a certain amount it will work then export it as IGES this then can be imported in solid works (but if it works then the file will be very heavy as each part of the mesh is the equiv. of a loft!!!)
It should be possible
How can I save a .dwg file in meshlab? My version (1.3.2) does not give me the choice to export as .dwg and when I force it, I have a 'unsupported extension' error.
I tried to export as DXF but end up with a 2D drawing of the mesh in SW
do as the example install mastercam direct then in mastercamdirect tick import operations tick creat edge curves tick okay work like a charm
The data structures of STL and solid model are so different that only simple STL models can be recognized and converted to a solid model by some feature detection technologies. One PhD student in our lab is working on it (for simple geometry like plain, sphere or fillet). But for some complex STL model like a human body someone mentioned above, it's impossible. If there is such method it would be a big thing in the computer graphics realm : )
Onur Aytekin is right. Solidworks software is very limited in translating STL files. Large amounts of facets in STL file and Soldworks software crashes.
True, STL files can be imported as Graphics body but who wants to spend endless hours creating sketches and solids from sketches of the picture?
It is shame that Solidworks makers are unwilling to make improvements in this area.
I am Solidworks user since year 2000 and I see not much improvement in this software from year to year. I compared Solidworks vs Inventor. Inventor is harder to sketch with when creating parts. Parts library needs to be precisely located within a folder. Inventor however has better gear design software and FEA simulation then Solidworks.
I work in the film industry and we've solved this issue using geomagic studio it's expensive but the only way to go from a sculpt in zbrush to an iges file ready for engineering in sw. Powershape can also be used but I don't know how effective it is. There's a few freelancers out there who offer to translatefrom stl to iges for a fee. As sw and other cad systems improve so will this issue.
Saw a video on YouTube showing some features of SpaceClaim, and one of them is deriving a solid from an imported STL.
I have a project STL file from Proteus 8.0 and cannot convert to Solidworks file after implementing as guide.
Freecad works, but my meshsizes are way to big what result in a crashing freecad.
I quess i have something to do this christmass..
I get it, my mesh files are too big for freecad, that it why it crashes all the time.
I've got an OBJ about 131kb and a stl of 60mb..
Is there anybody here with the expierence to open this size of files with his 'Scan to 3d' option in Solidworks?
Please let me know or send my a private message Thanks in advance
Guys way not use SolidWorks in right way at first ?It is big most powerful software .
You can do that with Spaceclaim. They have free trials. You can also use it to make edits to the STL directly.
Hi,
Maybe it's toi late but try Autodesk Inventor: http://knowledge.autodesk.com/support/inventor-products/getting-started/caas/CloudHelp/cloudhelp/2016/ENU/Inventor-Help/files/GUID-3F6D22A7-768F-4ABE-8DEE-C6B64C5A3B2A-htm.html Free student version for 3 years are given There is a plugin on Autodesk exchange too: Éric
I am working in Solidworks with large scans, .stl imports (via scanto3d) of an ATV. A 4 wheeler kind of thing. There's actually two different/similar ATV models (we actually scanned two different bikes) overlaying each other.
For reference, SW takes about 20Gb of ram to get these fired up, part&assy files are in the 3gb range. SW is sluggish at best with files of this size even on a very fast machine.
So I get these scans into solidworks and they are a mesh. I refine them some with SW's mesh tools. End of the day I've got a big (2-5mil triangles) messy mesh, but lots of 3d points I can attach to.
sadly, this does not work in an assembly which is where I spent 99% of my time designing, I have to actually open each part, create a 3d sketch and drop a point where I want to attach to the mesh. Then back out, save, switch over to the assy and do design attaching to that sketch point. slow and painful
There's no 'averaging' many points to account for error either. Like taking more than 3 points to define a circle.
I'm hoping someone will have some better tools to work with meshes than is built into solidworks
If you got solidworks 2016, you can easily convert it.
I have some experience with large complex STL graphics files (e.g. from micro-CT scans and laser topography) and successfully importing them into SOLIDWORKS automatically as a full solid model. Therefore I wanted to try and provide maybe a slightly more complete answer than most of the previous answers.
First of all, SOLIDWORKS needs your imported STL file to have a maximum of around 20 thousand facets if you wish to automatically represent the imported geometry as a solid body (through the method outlined previously by Sudhir Gill above).
If your STL file has more than 20 thousand facets but less than 100 thousand (I believe) then SOLIDWORKS can automatically represent it as surface entities (using the same method but choosing Surface Body in the import options).
My advice is to use a freely available mesh visualisation/analysis/repair/filtering software application such as MeshLab from SourceForge to open your STL file before attempting to import into SOLIDWORKS.
MeshLab will deal with multi-million facet STL files (if you have a reasonable spec PC) and will tell you at the bottom how many facets your STL file has.
MeshLab is also very useful in that it can rapidly cut the number of facets in an STL file to a given target number of facets (e.g. the 20 thousand or less required by SOLIDWORKS) although some geometrical accuracy is of course sacrificed.
If anyone would like some pointers on some of the tools in MeshLab which can be used for this job then please ask.
STL is a bunch of dumb triangles. Thats called 'Discrete Geometry'
A CAD file is mathematically perfect Geometry, called 'Continuous Geometry'. CAD interpolates points or triangles. There is no possible conversion, but must be interpolation therefore. Plenty of ways. Totally depends on the model and the needed output. Do you need it for claiming the remaining space, does it have to be smooth or as close to the facets as possible? Is it organic or more cubes & cylinders like? Best use a demo download of some sophisticated software. Geomagic WRAP creates a spiderweb style network automatically, good for organic. The same functionality sits hidden in the cheap Geomagic Design (formerly Alibre). For more analytic forms better use a true reverse engineering solution. Spaceclaim is pretty good and affordable with redrawing profiles and easily drag them into the right space. For Solidworks, use the 3DSystems Plugin. Cutting lots of sections into the STL is a good start so your CAD can at least touch something in space rather than importing a dumb STL file and looking at it. ZW3D started also some Reverse Engineering. The big gun is Geomagic Design X which may even export the history tree (good luck), but expensive. 'Converting' is nonsense. That might only give you thousands of planes, killing the performance of any system with no possible downstream process.
I was very frustrated trying to do it for several days, my mistake was to write *.* instead selecting stl extension, that was my BIG mistake, I hope it helps someone else (SolidWorks 2010)
The glaring issue with using Solidworks to convert STL to solids, is it has a 20k facet limit.
On simple parts, this isn't an issue, but on complex parts, or objects converted to STL from mesh, this makes this particular solution useless.
Best way to convert stl file to a editable format is by using SCDM. Ansys Space claim Design Modlar. here you can convert stl to stp, parasolid or to catia part file.
You can use DelCAM power shape. If you are unable to convert then mail me your 3d model i will try.
Try 3D Reshaper Meteor visit our website : www.redesign-france.com
I do this often in my line of work. Geomagic is really your best bet. I think they even make a snap-in module for Solidworks now. The software is expensive but maybe you can get a trial version.
http://www.dezignworks.net/ is what I used to solve this problem. It embeds in SW and allows working with large scan files - not native SW so you don't have to worry about the bloat. Good stuff.
I recently found myself on the same situation.
Doing some reaserch on internet I was able to find this good tutorial: http://blog.bantamtools.com/convert-stl-to-step But the FreeCAD software seams to have some limitation on handling complex shapes. It may work for you. I found a website to convert the file for me. So far they are a free platform. I recommend to give it a shot. https://www.cadmeshanalytics.com/ Good luck!
Do you Have Solidworks Pro or Premium? If so, you will have access to the scan-to-3d module, just activate it in add-ins. After that, when you go to import, you will have a new option: 'Scan-to-3D meshes.' That option allows you to import it as more than a graphics body. You can align to world origin, extract cross sections, region group (feature recognition), and surface wrap. It is pretty lightweight and it can take a lot of cleanup to get a good auto-surface, so if this is something you do a lot you are better off with one of the various Geomagic products. Like others mentioned, Spaceclaim also does surface wrapping and general scan-to-CAD it and is cheaper than Geomagic, though I can't vouch for how good the surface wrapping is.
If you do have access to Pro or premium version, check out this video on scan-to-3d, it explains a lot: http://solid.hts.vidavee.com/vidad/tribeca.vidavee.com/solidworks/solidworks/1A0CACCAD06B62BD9907B8E4A368FCEA.mp4
You can also use FreeCAD, following this http://sourceforge.net/apps/phpbb/free-cad/viewtopic.php?f=3&t=253&p=2766&hilit=mesh+to+solid#p2766
SolidWorks imports an STL file as either a Solid Body or a Graphical object. You cannot add features (Cut, extrude, etc..) to a graphics body. when opening an STL file and the STL extension is selected in the open window, click options* and select solid body.
The real question is how to convert an STL file to a modifiable Solid Works file.
The reason for this that has not been mentioned here is sometimes you already have an STL file that was created or downloaded by someone else that you want to modify to change a few things. I have often needed this for 3D printing. I have downloaded files from thingiverse and wanted to make some minor changes to the part.
The person here that said download FreeCad and save the file out as a Step file was on the right track but there is no need to do that. Here is the correct method that works.
1) Open the STL file in Solid Works as a solid body.
To do this select the file type as STL and click the options button and select 'SOLID BODY' from the radio buttons in the middle of the dialog.
2) After you open the file select 'Save AS' from the file menu. Change the 'Save As' file type to 'STEP AP214' and save the file.
3) Now open the step file and you will be able to select any surface to sketch on.
Carbon copy cloner mac. When you are done editing simply save the file as a Solid Works part file. I think this is what everyone is really looking for here.
Quite late.But I know how to do it in quick and effective way.through FEA(Finite element analysis ) approach. anyone can contact me for that.
You can find some videos about converting by these links:
https://www.youtube.com/watch?v=0hotweUI-Bc
https://www.youtube.com/watch?v=nC_bh2VPO0w https://www.youtube.com/watch?v=_b7_iWcnKFs https://www.youtube.com/watch?v=JS6F47fVFpE https://www.youtube.com/watch?v=5Mpd69lPStU
Reference model link:
You can use SALOME (it's free: http://www.salome-platform.org/).
1. Run Salome 2. Switch Salome to Geometry -> click NEW 3. File -> import (*.stl) 4. File -> Export (*.step) 5. Import (or open) STEP file in SolidWorks or any other CAD-Software
STL, can not be edited, can not be solidwords use, how to do?
If you work with 3D Printers regularly, then you know what an STL file is. And you know what a pain they can be to work with. There are some very good STL editors out there, but they tend not to be “parametric” modelers, which can be difficult to use accurately. More importantly, this style of editing can be unfamiliar to Design Engineers. Luckily, if you have access to SOLIDWORKS 2018, you may be surprised how easy it is to edit STL files. Read on to learn how.
For the uninitiated, STL has become the de facto standard file format for 3D Printing. This may be an accident of history since STL was originally used for (and is an acronym for) stereolithography, back when that was the only 3D printing technology. In a nutshell, STL files are polygonal approximations of mathematical geometry. Microsoft edge closes after opening. When a geometric model is converted to STL, all of its surfaces become represented by triangular faces of varying size and shape.
It’s very difficult to reverse that conversion and extract mathematical geometry from an STL (imagine trying to reproduce The Great Gatsby based solely on Cliff’s Notes). Although SOLIDWORKS Premium has a tool for this (ScanTo3D), it has a steep learning curve. Luckily SOLIDWORKS 2018 includes tools for working with STL files and other mesh files natively.
Today I’ll be working with the Xwing TMG Token Holder by GMBridge downloaded from Thingiverse.
This looks great for keeping my card and tokens organized for the X-Wing Miniature Tabletop Game, but it’s a bit more detailed than I need. I’d like to create a simplified version of this model that I can edit in the future.
I could File>Open the STL file using the “All Files” filter (or just drag the file into the SOLIDWORKS window). But there are some additional options you’ll only see if you use the “Mesh Files” filter.
Specifically, this is where you’ll define the import units (to avoid having to manually scale the part later), and where you choose how to import this mesh. In this article, I’ll import with the default options.
STL files can get very large and often take a while to open. When it does, I see a Surface-Imported feature in the tree with an unfamiliar icon identifying this as a Mesh Body. Mesh Bodies are new for SOLIDWORKS 2018 and allow these models to be manipulated as a single entity, rather than a (huge) collection of individual faces, as had been the case. Although I won’t be able to select individual facets or edges, performance is much better. Plus it gives me access to the new Mesh Tools, which make editing and reverse-engineering much easier.
In this case, SOLIDWORKS encountered mesh errors* in the model and was unable to generate a solid body. So I won’t be able to perform any boolean operations (e.g., cuts or bosses) directly to the model. Instead, I’ll extract usable surfaces from this mesh and use those to create a model. I’ll begin by using the Surface From Mesh tool to define a flat surface.
*(While Import Diagnostics should normally be used to fix import errors, the tool doesn’t fix Mesh Bodies in my experience).
I’ve selected (in blue) some of the polygons on top of the model which should be a planar face; pressing Calculate highlights (in brown) all the adjacent faces. STL files are approximate though, so there’s also a “facet tolerance” slider to define how close to coplanar is close enough for adjacent faces to be highlighted. Pressing OK (green check) creates a new Surface Body from my selection.
I’ll continue to use Surface From Mesh to extract as much detail from the model as I want. The command is ‘pinned’ by default, so every time I click OK, a new Surface Body is created.
If I wanted to completely reverse engineer the part, I’d extract all the surfaces in the model and eventually stitch them together. But for this tutorial, I’m keeping it simple. The faces I’ve extracted so far (colored blue here for contrast) define the top surface of the part, the position and dimensions of all the token pockets, and their depth. I’m pretty much done with the mesh at this point, so I’ll Delete that body.
Next, I’ll start a Sketch on the top surface and Convert the edges to model geometry. In the image below I’ve selected all the “Inner loops one by one” to get all the edges I need.
Notice that the circular profiles are made up of lots of very small line segments, a byproduct of the inherent faceting of STL files. If I weren’t so picky, I’d use the sketch as-is. But I want this model to be as parametric as possible. So I’ll toggle the visibility of Temporary Axes and use them to define the centers of sketch circles, which I trim back to the surrounding geometry.
Bear in mind, the STL format introduces some inherent inaccuracies, and I have no idea how this was originally modeled, so I expect some of the axes to be a bit off, and for the endpoints not to connect perfectly; that’s what Power Trim is for.
Now I can use familiar solid modeling tools to Extrude the sketch and add any other features using the surfaces to constrain them. When I’m satisfied, I’ll delete those surface bodies to clean up the model a bit. And of course, since all my editing has been done in SOLIDWORKS, it’s all parametric! I can easily edit or suppress any of the features. Below you can see the original STL, alongside my edited version.
The technique used in this blog is what I’ve used most often for editing STL files in SOLIDWORKS, but it’s not the only route. In future blogs, I’ll convert an entire Mesh Body to SOLIDWORKS geometry, and demonstrate how to make edits directly to Mesh Bodies using boolean features. If you use STL files regularly (especially if you’ve tried the ScanTo3D tool in the past), I hope you’ll give the new Mesh Tools in SOLIDWORKS 2018 a try.
Related Articles
About the Author
Dan Erickson is a student of life. With a BS in Mechanical Engineering Technology from Michigan Tech University and a penchant for tinkering, he is driven to understand how the world works and improve wherever possible. After several career iterations, Dan came to Fisher Unitech in 2011 as a SOLIDWORKS Support Engineer. He has since followed his passion for tranrsformative technology to the 3D Printing department, supporting the Sales and Marketing teams as 3DP Application Engineer.
Recently I have been working on an assignment to convert five file formats (.dae, .stl, .step, igs, obj) to .stl. using FreeCAD Python console and help from people on StackOverflow and FreeCAD forum, I was able to do that.
The last part of this assignment is to convert .sldprt (Solidworks Parts File) to .stl. Unfortunately, FreeCAD does not support importing this file format and I can not use its Python console to convert this file format to .stl.
I have been searching Python APIs that can read/export .sldprt files but I haven't been able to find any. I did find some online sources (GradCAD, Datakit Cross manager etc.) but I need to accomplish this by a Python script (preferably Python 2).
Is there another way I can convert .sldprt file to .stl using Python? Can someone point me in the right direction where to start?
Umar Dastgir
Umar DastgirUmar Dastgir
2 Answers
Since sldprt is a proprietary format, you are only able to do that if SOLIDWORKS is installed on the executing machine. This is done with the SOLIDWORKS API. With that condition out of the way, you will need to write some sort of bridge between Python and the SOLIDWORKS COM API objects which is a big hassle. If this is a school assignment, I would suggest you write a console application in C# or VB.NET that opens the file and converts it to whatever target format. You can command that application from your Python program.
There are a bunch of cloud services that can do CAD files conversion. Those can be a good alternative if you can't afford a SOLIDWORKS license or don't have access to one.
Amen JLILIAmen JLILI
1,70022 gold badges1616 silver badges3939 bronze badges
Autodesk Fusion 360 use a Python API and also import cad files from SolidWorks and export to other formats, check this examples:
efirvidaefirvida
2,27522 gold badges2121 silver badges4747 bronze badges
Not the answer you're looking for? Browse other questions tagged pythonsolidworksstl-fileformat or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |