Skip to content

generated 3mf file mesh objects aren't equivalent to input mesh objects #2

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

Closed
w531t4 opened this issue Apr 10, 2025 · 4 comments
Closed
Labels
help wanted Extra attention is needed

Comments

@w531t4
Copy link

w531t4 commented Apr 10, 2025

Context:

  • to_3mf version: 0.1.0
  • python 3.11.11
  • prusaslicer version: 2.9.1
  • fileA and fileB (see archive.zip) were produced with gflabel (https://github.com/ndevenish/gflabel) 9a7278eb50c5e421788a798da3ea7fa9c8e7a342

Action:
stl_to_3mf([fileA, fileB], 'test_result.3mf')

Expected Outcome:
fileA, fileB would behave the same (in PrusaSlicer) [when performing Split -> To Parts].

Outcome:
When

  1. test_result.3mf is opened in PrusaSlicer 2.9.1
  2. and either of the attached files (see below) have Split -> To parts performed on them,

Then

  1. PrusaSlicer UI shows some of parts as having open edges,
    • Image
  2. and visually there are components missing and or distorted
    • Image

Whereas

  1. When these same actions are performed with the raw STL files, no errors show up, and the files appear correctly.

Archive.zip
Archive.zip contains:

  • test_result.3mf
  • row3-m4x16r-m4x16-1x1-d2.stl
  • row2-m4x12r-m4x12-1x1-d2.stl

I'll try to dig and see what's up, but these days my availability seems to change every 15m. I like the idea with your project - The behavior of taking many STL's and pushing them in a m3f accomplishes an objective related to a different goal of mine. I need this functionality AND

  1. i'd like to press the "arrange" button in Prusaslicer,
  2. press the "Split -> To parts" action for each object in Prusaslicer
  3. Mark the an extruder for each part according to a pattern

Hopefully my overall objective helps to clarify my usecase - please note i'm not expecting or asking this project to perform the additional functionality.

@owebeeone
Copy link
Owner

There could very well be bug in the triangle conversion. The vertex mapping requires exact equivalence (no round off errors) otherwise this problem is what to expect.

I wonder if you can try recreating the STLs, maybe like in meshlab and rewrite it. It'll be a little wile before I can get to this.

Probably due to the vertex matching. Maybe I can add a dumb vertex matcher just one index per vertex, no compressing.

I'm real busy right now, may take a while before I can get to this.

@w531t4
Copy link
Author

w531t4 commented Apr 11, 2025

There could very well be bug in the triangle conversion. The vertex mapping requires exact equivalence (no round off errors) otherwise this problem is what to expect.

I wonder if you can try recreating the STLs, maybe like in meshlab and rewrite it. It'll be a little wile before I can get to this.

Probably due to the vertex matching. Maybe I can add a dumb vertex matcher just one index per vertex, no compressing.

I'm real busy right now, may take a while before I can get to this.

thanks for the quick reply. I can relate. No rush - I've just learned that if i don't document these things when they happen, they never get written ;) - take care!

@owebeeone
Copy link
Owner

I tried to repro at least, I don't get errors on either Prusa or Orca - I had to split the parts to see the geometry, looks like it's a weird file, it seems to have holes.

So I used PrusaSlicr 2.7.4 - a bit old. I use Orca more recently and it had no artifacts too.

So, it's either a bug/feature in your more recent PrusaSlicr.

I think we can leverage manifold3d in to_3mf to possibly clean things up.

So, it would be nice to have some tests on Orca too.

BTW, I ran to_3mf and it created exactly the same output model file (not the zip container).

I'm working on generating stl models directly from pythonopenscad, part1 is mostly working, includes a rudimentary python 3D viewer too should be out in the next few weeks. Maybe I can add a viewer to to_3mf...

@owebeeone owebeeone added the help wanted Extra attention is needed label Apr 11, 2025
@w531t4
Copy link
Author

w531t4 commented May 5, 2025

@w531t4 w531t4 closed this as completed May 5, 2025
@w531t4 w531t4 closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants