Jump to content
LGGreen

Exporting STL files

Recommended Posts

LGGreen

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.

 

1279831158_Screenshot2019-12-16at17_27_31.thumb.png.e2572ae9265046024a5aa56c9023b38e.png

 

When exported the stl file is then imported in to a 3D printing programme. The result is good.

 

446115177_Screenshot2019-12-16at17_29_18.thumb.png.d023e7946dd1f220cc6bc333db72fed5.png

 

I then add another component to the outside of the coach as shown below.

 

480249440_Screenshot2019-12-16at17_27_45.thumb.png.1b1f2a78ef5d3d44bdb672814ee15826.png

 

When imported into the 3D printing software some components are missing.

 

962048854_Screenshot2019-12-16at17_31_39.thumb.png.8a551ec37eb6cf8e6900282a386106f8.png

 

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?

 

Share this post


Link to post
Share on other sites
LGGreen

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.

Share this post


Link to post
Share on other sites
Cad64

My next suggestion would be to run an AUDIT to see if Autocad discovers any errors?

Share this post


Link to post
Share on other sites
steven-g

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 by steven-g

Share this post


Link to post
Share on other sites
LGGreen
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.

 

Share this post


Link to post
Share on other sites
LGGreen
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.

Share this post


Link to post
Share on other sites
LGGreen

I have reduced my dwg file to just the relevant layers. As shown below is the dwg file in AutoCad.

 

1516333998_Screenshot2019-12-18at14_19_08.thumb.png.17c7e889fa41dd066b780c62bdcbf4de.png

 

Once I select all the components and export to an stl file the resultant stl file does not contain all the components.

 

340482270_Screenshot2019-12-18at14_19_17.png.5962550d52d2ef89ae5144863aa09e93.png

 

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.

 

 

 

Share this post


Link to post
Share on other sites
LGGreen

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

Share this post


Link to post
Share on other sites
Cad64

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.

Meshlab Import.jpg

LNWR_Coach_V9-Unioned.dwg LNWR_Coach_V9.stl

Share this post


Link to post
Share on other sites
LGGreen

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.

Share this post


Link to post
Share on other sites
LGGreen

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.

Share this post


Link to post
Share on other sites
Cad64

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.

Coach Problem.jpg

Share this post


Link to post
Share on other sites
LGGreen

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!

Share this post


Link to post
Share on other sites
Cad64

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.

Share this post


Link to post
Share on other sites
LGGreen

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.

Share this post


Link to post
Share on other sites
Cad64
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.

Share this post


Link to post
Share on other sites
LGGreen

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.

Share this post


Link to post
Share on other sites
BIGAL

Ready to slice ? from Cad64 stl

image.thumb.png.fcd0c8e6aa9847f40213e8275f11ca98.png

  • Like 1

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...