LGGreen Posted December 16, 2019 Posted December 16, 2019 I am having problems exporting to STL files. I am using Autocad 2018 for MAC on OS Mojave. The first picture shows a compartment for a model railway coach. When exported the stl file is then imported in to a 3D printing programme. The result is good. I then add another component to the outside of the coach as shown below. When imported into the 3D printing software some components are missing. The problem is in the exporting to the STL file. I am just using the 3D software to illustrate the resulting STL file. I can export most components successfully, it is only a combination of components that cause the problem of missing components. It seems to be random as to which components result in the errors. I have tried redrawing some of the components that I thought could be causing the problem to no avail. I am convinced there is some sort of corruption within the AutoCad drawing but I am having trouble finding what is wrong. Any ideas anyone? Quote
Cad64 Posted December 16, 2019 Posted December 16, 2019 The Autodesk Knowledge Base suggests saving all components as a block and then export the block using the STLOUT command. Quote
LGGreen Posted December 16, 2019 Author Posted December 16, 2019 That didn't work! Saving the block worked but stlout still only saved some of the components in the stl file. I also tried to union all the components but some parts would not go into the union (a clue?) and still not all components went into the stl file. Quote
Cad64 Posted December 16, 2019 Posted December 16, 2019 My next suggestion would be to run an AUDIT to see if Autocad discovers any errors? Quote
steven-g Posted December 17, 2019 Posted December 17, 2019 (edited) I'm no expert on this, but I do use a 3D printer occasionally, it sounds as though there is some confusion between what Autocad exports, and what your printing software is reading, at a guess I would say that if your model won't go into a single unioned solid then that is your issue. A 3D print has to be a single watertight element (you can place multiple elements but they have to be placed individually into the printing software). I don't know how stl export works but it could be that Autocad is smart enough to work out when certain objects are 'touching' and put them into one stl element, but where there is a gap the stl file is created with several elements and your 3D printing software is just picking out the first element it can find. I would look at getting the union command to work by making sure you model elements are touching. EDIT try this with thanks to @BIGAL (in another current post) once you have exported to stl try then to convert that back to dwg and see what is brought back into Autocad, in theory at least it should be a single object and if it is made up of more objects you might be able to see the area you need to look at for making changes. Edited December 17, 2019 by steven-g Quote
SLW210 Posted December 17, 2019 Posted December 17, 2019 I moved your thread to the AutoCAD 3D Modelling & Rendering Forum. It might help if you could share the .dwg. Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 23 hours ago, SLW210 said: I moved your thread to the AutoCAD 3D Modelling & Rendering Forum. It might help if you could share the .dwg. OK Thanks for that. I didn't think the Modelling and Rendering Forum was applicable for my problem! I am working on a slimmed down dwg file for sharing. Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 On 12/17/2019 at 7:06 AM, steven-g said: I'm no expert on this, but I do use a 3D printer occasionally, it sounds as though there is some confusion between what Autocad exports, and what your printing software is reading, at a guess I would say that if your model won't go into a single unioned solid then that is your issue. A 3D print has to be a single watertight element (you can place multiple elements but they have to be placed individually into the printing software). I don't know how stl export works but it could be that Autocad is smart enough to work out when certain objects are 'touching' and put them into one stl element, but where there is a gap the stl file is created with several elements and your 3D printing software is just picking out the first element it can find. I would look at getting the union command to work by making sure you model elements are touching. EDIT try this with thanks to @BIGAL (in another current post) once you have exported to stl try then to convert that back to dwg and see what is brought back into Autocad, in theory at least it should be a single object and if it is made up of more objects you might be able to see the area you need to look at for making changes. My model is made up of several elements, all of which are watertight and can be printed individually. It is only when some random elements are exported that the problem occurs. A single watertight model can contain several elements not necessarily in contact. This enables multiple models to be exported to a single stl file for printing. Elements being in contact usually helps and even a gap of 0.0001mm can cause printing problems. Better, as you say to touch, or overlap if possible. I still haven't sorted out the union within Autocad but I am working on it. As far as I am aware AutoCad will not import an stl file. I am using the printer slicing software to view the stl file. Also the stl file can be viewed as a thumbnail in 'finder'. Hence I am 100% certain the stl file is not properly exported from Autocad. Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 I have reduced my dwg file to just the relevant layers. As shown below is the dwg file in AutoCad. Once I select all the components and export to an stl file the resultant stl file does not contain all the components. Tried to union all the components in each layer in turn and then unioning with the previous layer. The stl file was OK until the union failed with the following error “Modelling operation error, the Boolean operation on solid and/or surface bodies failed, error code 84028”. When the union failed I tried unioning in a different layer order. The failure did not occur at the same layer. Once the union fails then the stl file will not export correctly. I will now try to reduce the dwg file to below 4.88Mb. Currently it is 4.9!! Then I will post the file. Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 OK I have removed the nice comfy seats! Any help on how to export this into a complete stl file will be helpful. A good starting point seems to be in trying to union all the components into one single component reliably. I feel if this can be done then the stl file will be good. I am using AutoCAD 2018 for Mac on Mojave OS. LNWR Coach V9.dwg Quote
Cad64 Posted December 18, 2019 Posted December 18, 2019 I was able to union everything together, except for one side of the model which would not cooperate. So I moved it out of the way and mirrored the good side across to the other side. Then I was able to union the whole thing and export to .stl. I imported the .stl into Meshlab to check it out, (see image below), and everything is there. By the way Meshlab is a free program and it's very useful for importing and viewing many different file types. You might want to download a copy. I have attached the unioned .dwg file and the .stl file. LNWR_Coach_V9-Unioned.dwg LNWR_Coach_V9.stl Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 I can't do that! I can union the model when I leave out both sides. When I do try to union the whole thing it doesn't union anything, so how did you latch on to the one side been the problem? I may try deleting the two sides and redrawing the two sides. Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 Downloaded Meshlab. Looks good so far but quits unexpectedly when I try to import some of my stl files. Probably settle down as I get used to it. Quote
Cad64 Posted December 18, 2019 Posted December 18, 2019 I did have some trouble with the Union of certain objects, so I ended up doing a series of small Union's, building up the model as I went along. When I tried to Union everything at the same time it didn't work. And that one side of the model wouldn't cooperate so I got rid of it, then I Unioned the other side and mirrored it across. Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 Hmmm. I tried that. I got rid of the problem side and still I couldn't union the rest of the model. I tried unioning in a different order and the sides union OK but the end s of the model failed to union then! Quote
Cad64 Posted December 18, 2019 Posted December 18, 2019 Yeah, it was a little trial and error for me. I would try to Union one way and it would fail, so I would try a different way and it would work. If I have time later, maybe I can go back through the process and create an illustration to show what worked for me. Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 There must be some way of checking what is wrong, rather than have to do it in a trial and error method. I only know the trial and error method as well. Perhaps as I draw a new batch of components try to unionise at each step and redraw if necessary. Just a thought. Quote
Cad64 Posted December 18, 2019 Posted December 18, 2019 33 minutes ago, LGGreen said: Perhaps as I draw a new batch of components try to unionise at each step and redraw if necessary. Just a thought. That would be a good idea. What I would do is keep all the individual pieces on a hidden layer and then copy them to another layer to Union them. That way, if you need to go back and change things later, you will still have all the individual pieces and won't have to recreate everything from scratch. Quote
LGGreen Posted December 18, 2019 Author Posted December 18, 2019 Yes, that is what I was trying to do but it is knowing which component is the rogue one. Depending on the order I was creating the union version it was different components. Heigh ho. It is always easier second time around! Thanks for your help. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.