Time for some dogfood.

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Time for some dogfood.

Post by herbk »

Hi Sliptonic,
Right about here was bug #3 where I almost broke a cutter. The cause: When the project post processes, the Machine node adds a G0 X0 Y0 Z0. But if the top of the part is above zero, this will crash the cutter. While this fix also was easy,
Did you fix it with "set tool to start depht"? (i think so)
It would be better to set the toll to save hight. "Start depht" is the hight for the first cutting round and wth this hight the tool can still demage the workpeace.
Gruß Herbert
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Time for some dogfood.

Post by sliptonic »

Path uses two kinds of Python Features;

'Path objects' generate and store Path commands (very simplified gcode). Path objects include Profile, Pocket, Engrave, etc. A tool controller is a Path object. So is the Machine object.

'Path Compounds' objects store Path objects. They work like groups. The Project object is a compound. You can create other compounds to group operations together, but the Project is created automatically for you and includes the first tool controller and the Machine.

You can post-process either a Path object or a Compound. When you post-process the Project, it runs through everything under and the returned gcode is the consolidated commands from all the Path objects passed through the post-processor script.

When you post-process a tool-controller, you get the gcode to perform a tool change. The Machine object has some properties that are useful, but what gcode should it return on its own? Probably none! Pre-ambles and homing routines are unique to the specific machine so they are generated from the specific post-processor script.

The problem was that the machine was returning a hard-coded 'G0 X0 Y0 Z0' . Obviously that's wrong and was probably just left over from early development. I removed it.

It might actually be useful to have the machine return something. I could see the machine outputting the entire tool table as comments. Then when you're looking at gcode and see a tool change, you can refer to the comments to see tool details. Is there anything else interesting that the machine object should produce?
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Time for some dogfood.

Post by herbk »

Hi Sliptonic,
The problem was that the machine was returning a hard-coded 'G0 X0 Y0 Z0'
If i only eport the path then its without "G0 X0 Y0 Z0".
FreeCAD writes stil a "G0 X0 Y0 Z0" line to the GCode if i export the projekt. For me that is nearly OK, i change to Z "retract high". I use a portal mill, so i know where the tool is...


Is there anything else interesting that the machine object should produce?
Nothing i missing right now... :) The task window has one more bug, but for that i'l make a report on bugtracker... ;)
Gruß Herbert
Post Reply