prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.75k stars 1.93k forks source link

OBJ Toolpath Export Missing Ironing #13183

Open PilotMatt opened 3 months ago

PilotMatt commented 3 months ago

Description of the bug

Using "Iron Topmost Layer" in the slicer and "Export Toolpaths to OBJ" ironing is never rendered out to the OBJ.

Project file & How to reproduce

Slice a file w/ Ironing on .
File -> Export -> Export toolpaths to OBJ. RESULT: No ironing on OBJ.

Checklist of files included above

Version of PrusaSlicer

Version 2.8.0+win64

Operating system

Win 11

Printer model

Custom Printer (used for Rendering without the Purge line)

u89djt commented 3 months ago

It turns out the ironing paths are in the obj, but they're half a layer height too low. If you increase ironing spacing to 0.5mm, you'll see where they are because they don't merge into a confusing single layer that's hard to recognize - they're separate lines that you can see between the main extrusions: image Here's a comparison of where they're shown in the slicer and where they appear in the obj: image image And the project file and obj shown there: ironingpathshalfheighttoolow.zip I used layer heights 0.15 and 0.3 to test whether the half height difference is consistent.

PilotMatt commented 3 months ago

awesome thank you! Is there a way to generate the toolpath OBJ from the CLI?

On Wed, Jul 31, 2024 at 7:27 AM Dave T. @.***> wrote:

It turns out the ironing paths are in the obj, but they're half a layer height too low. If you increase ironing spacing to 0.5mm, you'll see where they are because they don't merge into a confusing single layer that's hard to recognize - they're separate lines that you can see between the main extrusions: image.png (view on web) https://github.com/user-attachments/assets/ac61c34b-b903-44c7-9d8e-a3e69c8ba400 Here's a comparison of where they're shown in the slicer and where they appear in the obj: image.png (view on web) https://github.com/user-attachments/assets/1b227d89-9c27-4b4e-9dad-7d40af1b5bac image.png (view on web) https://github.com/user-attachments/assets/58b8ca6e-f828-4cd2-bfcf-1ac973cda334 And the project file and obj shown there: ironingpathshalfheighttoolow.zip https://github.com/user-attachments/files/16440534/ironingpathshalfheighttoolow.zip I used layer heights 0.15 and 0.3 to test whether the half height difference is consistent.

— Reply to this email directly, view it on GitHub https://github.com/prusa3d/PrusaSlicer/issues/13183#issuecomment-2260296540, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGU7KY7EK4HJCACHGKZEGDZPDCZJAVCNFSM6AAAAABLXXN5GGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQGI4TMNJUGA . You are receiving this because you authored the thread.Message ID: @.***>

u89djt commented 3 months ago

(I'm just another user) there's an open issue indicating that you can't get paths out via the CLI, but I haven't tried it https://github.com/prusa3d/PrusaSlicer/issues/5076 In fact we seem to have a messy luxury - here's an older piece mentioning that the triangles are taken from the graphics card's data https://github.com/prusa3d/PrusaSlicer/issues/3046 and if that still pertains, we won't get anything via the command line. I think the ironing paths appearing in the centre of the previous extrusion is a mistake/bug, since it appears in the right place in the on-screen graphics. If you can share what you want to do with the data, there are other folk following the repository issues who might know something helpful.

PilotMatt commented 3 months ago

I'm trying to use blender to render the OBJ in a script. No matter what I do, line spacing, setting iron flow to 100%, the ironing lines don't seem to show up. Attached render where the ironing flow is set to 100%. It's very visible in the gcode viewer. And I can see the ironing lines when I import it into Fusion. But they get lost in Blender.

PER047_output_all_toolpaths

u89djt commented 3 months ago

Oh, bespoke product preview? Nice. I would expect prusa to enjoy a valuable application for the export function. So it's "just" a matter of adding half the layer height to the z coordinate of the triangles of the ironing pass. They're treated as part of the layer they're added to in the preview system so I guess that offset was lost in translation somewhere. If you iron it two different percentages and perform a diff, you'll presumably see which are the ironing triangles. If you're using a uniform layer height, that's your workaround for now, I guess.

PilotMatt commented 3 months ago

Yes, it's something like that! :) https://auntlosupplyco.etsy.com

u89djt commented 3 months ago

Good stuff. If you put together a pipeline for fixing the ironing location, you could post it to printables?

PilotMatt commented 3 months ago

I didn't didn't actually fix anything My workaround is just print config with very narrow top infill lines!

u89djt commented 3 months ago

Heh, this is the way.