I had some time, so I decided to try creation of a spiral path on 3d surface mesh. I cannot think of a particular use case for this except maybe overlay welding or repair welding of castings, but I do not have an actual use case for this. I created a spiral on a sphere mesh and so far the preliminary results look good. It is not ready, and of course on other surfaces this may fail.
For those interested please find attached the scripts and parts for the spiral path creation. You need to have scipy installed. My scipy.__version__ is '1.4.1', which works with FreeCAD 0.19. In case someone need to create own points of the outline of another part you can download weldslicer workbench. Explanation here https://forum.freecadweb.org/viewtopic. ... 1abf5e149a or directly
https://www.weldslicer.com/examples/
Spiral path on 3d surface mesh
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Spiral path on 3d surface mesh
- Attachments
-
- spiral curve_1.FCStd
- (653.56 KiB) Downloaded 20 times
-
- spiralpath_clean.py
- (11.24 KiB) Downloaded 20 times
-
- pts.csv
- (99.3 KiB) Downloaded 13 times
-
- basesphere_clean.FCStd
- (101.6 KiB) Downloaded 17 times
Re: Spiral path on 3d surface mesh
spiralpath_clean.py", line 165, in <module>jbi wrote: ↑Fri Jul 22, 2022 2:30 pm I had some time, so I decided to try creation of a spiral path on 3d surface mesh. I cannot think of a particular use case for this except maybe overlay welding or repair welding of castings, but I do not have an actual use case for this. I created a spiral on a sphere mesh and so far the preliminary results look good. It is not ready, and of course on other surfaces this may fail.
sphere_with_spiral.jpg
mesh=sf[0].Object.Mesh
<class 'IndexError'>: list index out of range
Re: Spiral path on 3d surface mesh
you need to pick the surface with in the GUI, and afterwards you run the 2 lines
from there one you can copy the entire code and paste into the python console.
Code: Select all
#load the stl mesh
sf = FreeCADGui.Selection.getSelectionEx() #pick the surface first at the GUI
mesh=sf[0].Object.Mesh
Re: Spiral path on 3d surface mesh
jbi wrote: ↑Sun Sep 10, 2023 9:59 am you need to pick the surface with in the GUI, and afterwards you run the 2 linesfrom there one you can copy the entire code and paste into the python console.Code: Select all
#load the stl mesh sf = FreeCADGui.Selection.getSelectionEx() #pick the surface first at the GUI mesh=sf[0].Object.Mesh
Re: Spiral path on 3d surface mesh
use "baseface" from spiral curve_1.FCStd