I have found what I think is undesired behaviour with the path workbench. I create a job and a tool path using the profile operation. When the operation is generated, the tool path shows that the tool moves back to the origin several times. In this particular instance, 42 times. I have confirmed the origin in the gcode output as well.
I attempted to upload the FCstd file but the file size attachment limit prevents me from doing so (file is 1.6MB). If I zip the file, it only compresses to 1.5MB.
EDIT: I removed a feature to reduce file size and attached it to the next message in this thread.
Here is the gcode file and a sample taken from the file. Note how there appear to be several redundant movements in the Z before the path to the origin.
steve123 wrote: ↑Tue Aug 30, 2022 7:37 pm
If I zip the file, it only compresses to 1.5MB.
The FCStd file is already a zip file, so re-zipping it will not do very much. However, it may be possible to shrink the FCStd file. In Edit >> Preferences >> General >> Document there is an option to adjust the amount of compression in the FCStd file. I believe the default is "3", but it is possible to increase the amount of compression.
The compression is always lossless, but high levels will cause slower save and open times.
I usually leave the compression at the default 3, but once in a while it is useful to shrink the file size below 1 MB.
It appears that "Use Compensation", "Process Holes", and "Process Circles" are not really compatible in this case. For example, the small holes appear to be the same diameter as the milling cutter. Compensation is not going to work.
Also, if I select either Process Holes or Process Circles the multiple returns to origin disappear. I would break the path into two profile steps, one for holes and one for circles.
I think what is happening is that the algorithm is switching back and forth between holes and circles, and resetting the start position each time the transition is made.
There may be other optimizations you could try, such as completely separating the outline profile from the holes and "mouse ears" shapes.
GeneFC wrote: ↑Tue Aug 30, 2022 9:19 pm
It appears that "Use Compensation", "Process Holes", and "Process Circles" are not really compatible in this case. For example, the small holes appear to be the same diameter as the milling cutter. Compensation is not going to work.
Also, if I select either Process Holes or Process Circles the multiple returns to origin disappear. I would break the path into two profile steps, one for holes and one for circles.
I think what is happening is that the algorithm is switching back and forth between holes and circles, and resetting the start position each time the transition is made.
There may be other optimizations you could try, such as completely separating the outline profile from the holes and "mouse ears" shapes.
Gene
Thank you for the feedback I did not think to try changing those parameters.
Regarding the holes that are the same size as the tool, I noticed that they are not included in the tool path. Is there a reason they are not included? If I increase the hole size slightly, to say 3.2 mm instead of 3.175, they are included.
GeneFC wrote: ↑Tue Aug 30, 2022 9:19 pm
Also, if I select either Process Holes or Process Circles the multiple returns to origin disappear. I would break the path into two profile steps, one for holes and one for circles.
I tried to generate a drill path for the 3.175mm holes but encountered a python exception:
17:20:37 Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathUtils.py", line 71, in new_function
res = function(*args, **kwargs)
File "/Applications/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathOp.py", line 820, in execute
result = self.opExecute(obj)
File "/Applications/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathCircularHoleBase.py", line 194, in opExecute
self.circularHoleExecute(obj, holes)
File "/Applications/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathDrilling.py", line 276, in circularHoleExecute
PathFeedRate.setFeedRate(self.commandlist, obj.ToolController)
File "/Applications/FreeCAD.app/Contents/Resources/Mod/Path/PathFeedRate.py", line 80, in setFeedRate
if _isVertical(machine.getPosition(), command):
File "/Applications/FreeCAD.app/Contents/Resources/Mod/Path/PathFeedRate.py", line 72, in _isVertical
return PathGeom.isVertical(Part.makeLine(currentposition, endpoint))
File "/Applications/FreeCAD.app/Contents/Resources/Mod/Path/PathScripts/PathGeom.py", line 180, in isVertical
if type(obj.Curve) == Part.Line or type(obj.Curve) == Part.LineSegment:
<class 'Base.FreeCADError'>: Unknown exception while reading attribute 'Curve' of object 'TopoShape'
17:20:38 Recompute failed! Please check report view.
steve123 wrote: ↑Tue Aug 30, 2022 9:53 pm
Regarding the holes that are the same size as the tool, I noticed that they are not included in the tool path. Is there a reason they are not included? If I increase the hole size slightly, to say 3.2 mm instead of 3.175, they are included.
I do not think there is any significant tolerance required, but with rounding of floating point numbers it is quite possible that the nominal same size means the hole is slightly smaller than the tool.
The rounding is not just the common floating point uncertainty in the 15th digit (or thereabouts). Instead there is rounding to 6 or 7 digits several places in FreeCAD, including in the OCC kernel itself. There is also a user-settable tolerance in the Path WB that is often no more than 5 digits.
All of those things mean that trying to exactly match edge-on-edge is a risky proposition.
steve123 wrote: ↑Tue Aug 30, 2022 11:22 pm
I tried to generate a drill path for the 3.175mm holes but encountered a python exception
Drilling is a bit broken for complex objects like this. The drilling operation automatically selects anything that the drill can fit into, including inappropriate openings. That is where the "curve" errors come from.
If you go in and laboriously select only the small holes the drilling works fine. Or alternatively deselect the openings that should not be drilled.
If you tick the box "Use Start Point" in the Profile operation tab the path does not return to origin every time. If I was doing this job I would have used 3 different profile operations as you have some inside cuts and some outside. How you did it works but I'm not sure why, Freecad seems to have worked it out for itself.