Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exporting non-STL formats causes slicing issues #1262

Open
tsdexter opened this issue Jun 24, 2023 · 9 comments
Open

exporting non-STL formats causes slicing issues #1262

tsdexter opened this issue Jun 24, 2023 · 9 comments

Comments

@tsdexter
Copy link
Contributor

Is there a way to download an STL with multiple parts? I'm using the mentioned model below as part of a multi part model with parts that fit exactly together (ie: the word is cutout of a box but also placed exactly back inside as a separate model for easy colouring in the slicer), when I download as an STL and import it's all one solid object with no word or separate parts.

This is causing me to have to use 3MF as file format, which does separate parts well, however, it presents the issue below:

Expected Behavior

Exporting an STL or a 3MF should export a file that slices the same

Actual Behavior

STL slices good, but 3MF or AMF have some weird features and cannot be printed. The geometry looks the same in all 3 files, ie:
image

However, once I sliced it the 3MF and AMF have some weird features that make them unprintable:
image

Notice:

  • the dot over the i is only roughly half as thick on 3mf/amf
  • the top corner of the i has some weird indentations
  • the o is only 1 layer thick, has no hole, and the single layer that is there exists floating at layer 7

Steps to Reproduce the Problem

  1. Use the model https://gist.github.com/tsdexter/add64749db71add39908f6640fef20c3
  2. Export STL/AMF
  3. Import and slice

Specifications

  • Version: 2.11.1
  • Platform: Mac
  • Environment: consistent in browser and node CLI downloading
@tsdexter
Copy link
Contributor Author

tsdexter commented Jun 24, 2023

note: if I exported the name and the box with the name cutout separately as 2 STLs and then import them into BambuStudio slicer at the same time and select 'yes' to "do you want to load these files as 1 object with multiple parts" they import well and I can easily colour just the name, however, this means I have to export twice, once with each part commented out. Ideally there is someway to easily export it (via CLI) once and get multiple files.

@z3dev
Copy link
Member

z3dev commented Jun 25, 2023

@tsdexter You are correct. STL does not support the concept of parts, just one mesh.

You can use DXF, 3MF, or X3D to exports parts. Of course, you design should return an array of parts from main(). Most people assign colors to each part in order to see the parts in slicers.

We can probably help out if you can provide the exported 3MF file.

@tsdexter
Copy link
Contributor Author

@z3dev thanks for the quick reply.

Here are all the exported formats: https://drive.google.com/file/d/1p2cjMt2xzQUMMU-qf7eIRQ2bsf2_WSLT/view?usp=sharing

@tsdexter
Copy link
Contributor Author

@z3dev it appears to be an issue with non-manifold edges... the 3mf has roughly 10x as many non-manifold edges as the stl does, see: bambulab/BambuStudio#1955 (comment)

Also noticed that Cura slices the 3mf fine but Bambu/Prusa do not, I think this is because Cura "fixes" the model, whereas bambu/prusa do not (at least not on mac yet)... any ideas about the non-manifold edges?

As well, I've added a PR to get around this issue for me, for now. It adds multipart -> multiple files to the CLI export see #1263

@z3dev
Copy link
Member

z3dev commented Jun 25, 2023

@z3dev it appears to be an issue with non-manifold edges... the 3mf has roughly 10x as many non-manifold edges as the stl does.

That would be strange as both exports start with snap & triangulation.

Do you mind adding one more format; JSON? This will export the exact shape of the geometries being created. I'd like to see the results of the design.

@tsdexter
Copy link
Contributor Author

@z3dev json should be in the zip file on the google drive link, also here: https://gist.github.com/tsdexter/add64749db71add39908f6640fef20c3

@tsdexter
Copy link
Contributor Author

@z3dev I don't know a tonne about the math/mechanics of generating the underlying model but I've colorized all the polygons to visualize it a little better, it looks like it's making faces with many vertices rather than triangles, which I think explains all the non-manifold edges... is this normal or should it be making triangle faces/polygons to avoid non-manifold?

I'm getting the shape by extruding a path2
image
image

@tsdexter
Copy link
Contributor Author

actually, it looks like it triangulated the polygons during export, so perhaps that's irrelevant?

@z3dev
Copy link
Member

z3dev commented Jan 14, 2024

@tsdexter i took a longer look at this, starting with the JSON file which was uploaded. The JSON format should export the 3D model as represented internally in JSCAD. I was able to export both as STL and 3MF.

I opened the STL in Meshlab (probably the best mesh application), and examined the STL. Meshlab did not find any issues with non-manifold vertices or faces. That's a good sign.

Then I opened the 3MF in PrusaSlicer (It's probably my favorite). PrusaSlicer (and Prusa) recommend 3MF for all multi-color 3D models, and I test with this often. PrusaSlicer didn't have any issues with the 3MF, and sliced the model perfectly.

So... what to look at now? If you can provide the JSCAD code, or maybe the starting SVG then I could investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants