Reinforcement mesh generation for 3D printing

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
lexitus
Posts: 1
Joined: Sat Feb 19, 2022 5:28 pm

Reinforcement mesh generation for 3D printing

Post by lexitus »

I was watching CNC Kitchen's video on reinforcing 3D printed parts by increasing the infill based on FEM simulations. Stefan uses Fusion 360 and Ansys in his video, but I wanted to see if I could get some similar results in FreeCAD.

Using the famous test hook. I had some difficulty finding a workflow, but here are my notes in case you also want to experiment with this. I ended up going via Paraview, credit to this thread which had most of the details I needed.
2022-02-19 18_42_14-FreeCAD 0.19.png
2022-02-19 18_42_14-FreeCAD 0.19.png (58.2 KiB) Viewed 1863 times
  1. Create body, or import mesh and convert to solid in Part workbench
  2. Switch to FEM workbench
  3. Create FEM analysis container
  4. Create material for part, e.g. PET
  5. Add fixed constraint on some faces
  6. Add force constraint on some other faces
  7. Add mesh. Can be problematic, I found gmesh ok, but best to start with coarse mesh and see how it goes.
  8. Open "SolverCcxTools"
  9. Select "Static" and "Write .inp file"
  10. Run Calculix
This should then produce a CCX results object. This can be interacted with to view displacement, strain and so on. ScalarClip shows a mesh that is something like what we want, but I couldn't find a way of exporting it. Happily the FEM results can also be exported to a .vtk file, which is understood by Paraview.
2022-02-19 18_46_20-FreeCAD 0.19.png
2022-02-19 18_46_20-FreeCAD 0.19.png (132.01 KiB) Viewed 1863 times
  • Import .vtk file into Paraview
  • Here we can visualize stress etc. as in Freecad. I based the reinforcement mesh on the von Mises stress, following Stefan.
  • Select "clip" filter, select clip type = scalar, choose a value and select invert. Select "apply"
  • Add "extract surface" extractor to remove internal geometry etc.
  • "Save data" allows export as stl
2022-02-19 18_47_50-ParaView 5.10.0.png
2022-02-19 18_47_50-ParaView 5.10.0.png (205.87 KiB) Viewed 1863 times
With this stl we can then modify the output of the slicer. In PrusaSlicer:
  • Import original mesh
  • Right-click, add modifier, load...
  • Choose saved output from Paraview. It should line up exactly with the existing mesh
  • Right-click on the modifier mesh and select the desired reinforcement infill level.
2022-02-19 18_48_33-_Untitled - PrusaSlicer-2.4.0 based on Slic3r.png
2022-02-19 18_48_33-_Untitled - PrusaSlicer-2.4.0 based on Slic3r.png (695.39 KiB) Viewed 1863 times
And we're done! PrusaSlicer handles the modifier mesh ok, although there are some weird bits of 100% infill where there are holes in the modifier mesh. Good enough to be usable though. Looking forward to trying this out with a real project :)
Post Reply