TCL command general issues

Issue #363 resolved
Oliver created an issue

Hello,

I am trying to produce a CNC Job from an Excellon file using the TCL command "drillcncjob".
The CNC Job objects created this way differ from those created using the GUI and are not usable.

Problems found:

  • In the plot area, the CNC Job shows only paths for "Travel" no "Cut"
  • "View CNC Code" or "Save CNC Code" from the GUI doesn't work, the console output is showing a Traceback and the message "KeyError: 'ppname_e'"
  • Writing using "write_gcode" gives an error message: "Operation failed: 'ppname_e'"

When checking the object properties with the "options" command and comparing the CNC Job created using the GUI with the one created with the TCL command, I see that the following two properties are not set in the one created with TCL:

Tools_in_use: [['Tool_nr', 'Diameter', 'Drills_Nr', 'Slots_Nr'], ['1', '0.6500', '2', '', ''], ['2', '0.8000', '8', '', ''], ['3', '1.0000', '5', '', ''], ['4', '2.0000', '2', '', '']]
ppname_e: default

Output from the TCL window:

> drillcncjob kicad_test_2.drl  -dwell 0 -dwelltime 1.0 -pp default 
Creating a list of points to drill...
Starting G-Code...
Starting G-Code for tool with diameter: 0.65MM.
Starting G-Code for tool with diameter: 0.8MM.
Starting G-Code for tool with diameter: 1.0MM.
Starting G-Code for tool with diameter: 2.0MM.
Finished G-Code generation...
Parsing GCode file. Number of lines: 102
Creating Geometry from the parsed GCode file. ...
Unifying Geometry from parsed Geometry segments: 17
[success] Selected plots enabled...
>  write_gcode kicad_test_2.drl_cnc "/tmp/TCL.cnc"
Operation failed: 'ppname_e'

Notes:

  • Using "-pp default" or not makes no difference.
  • "-dwell" and "-dwelltime" should be optional, but actually the command demands setting them. Ommiting them results in an internal error. This is another flaw in the argument handling.

Screenshots of the CNC Job are Object attached (the plot of the Excellon drill file is disabled in both screenshots), the drill file is also attached.

Affected versions:

  • Beta 8.991 and today's commit 1fa69e871440. Beta 8.99 shows the same behaviuor.
  • Older Beta versions (I checked 8.92 - 8.98) also show differences in the GUI (not Cut areas shown), but at least the GCode export was working (GCode was looking quite ok, but I didn't check this in detail.)

Thanks and regards
Oliver

Comments (17)

  1. Marius Stanciu
    • fixed bug in NCC Tool: after trying to add a tool already in the Tool Table when trying to change the Tool Type the GUI does not change
    • final fix for app not quiting when running a script as argument, script that has the quit_flatcam Tcl command; fixed issue #360
    • fixed issue #363. The Tcl command drillcncjob does not create tool cut, does not allow creation of gcode, it forces the usage of dwell and dwelltime parameters

    → <<cset 3475ae00cd11>>

  2. Oliver reporter

    Hi Marius,

    I have checked today’s latest commit b4076b1e123e from the Beta branch.

    It is half way fixed:

    • the “drillcncjob” command does now produce the expected CNC Job Object (Drills holes are shown as Cut and export works)
    • using the command without -dwell and -dwelltime still results in an error.

    Errors for the command without dwell and dwelltime:

    > drillcncjob kicad_test_2.drl 
    [ERROR_NOTCL] An internal error has occurred. See shell.
    Object (cncjob) failed because: 'dwell' 
    
    Traceback (most recent call last):
      File "/data/build/KiCad/PCB/FlatCam/git-b4076b1e123e/FlatCAMApp.py", line 4169, in new_object
        return_value = initialize(obj, self)
      File "/data/build/KiCad/PCB/FlatCam/git-b4076b1e123e/tclCommands/TclCommandDrillcncjob.py", line 186, in job_init
        if bool(args['dwell']) and args['dwelltime']:
    KeyError: 'dwell'
    
    > drillcncjob kicad_test_2.drl -dwell 0
    [ERROR_NOTCL] An internal error has occurred. See shell.
    Object (cncjob) failed because: 'dwelltime' 
    
    Traceback (most recent call last):
      File "/data/build/KiCad/PCB/FlatCam/git-b4076b1e123e/FlatCAMApp.py", line 4169, in new_object
        return_value = initialize(obj, self)
      File "/data/build/KiCad/PCB/FlatCam/git-b4076b1e123e/tclCommands/TclCommandDrillcncjob.py", line 186, in job_init
        if bool(args['dwell']) and args['dwelltime']:
    KeyError: 'dwelltime'
    

    As a workaround, both parameters can be passed with defaults:

    > drillcncjob kicad_test_2.drl -dwell 0 -dwelltime 1.0 
    Creating a list of points to drill...
    Starting G-Code...
    Starting G-Code for tool with diameter: 0.65MM.
    Starting G-Code for tool with diameter: 0.8MM.
    Starting G-Code for tool with diameter: 1.0MM.
    Starting G-Code for tool with diameter: 2.0MM.
    Finished G-Code generation...
    Parsing GCode file. Number of lines: 102
    Creating Geometry from the parsed GCode file. ...
    Unifying Geometry from parsed Geometry segments: 34
    
    > write_gcode kicad_test_2.drl_cnc "/tmp/TCL.cnc"
    

    The exported GCode file seems ok.

    kind regards
    Oliver

  3. Marius Stanciu

    Hi Oliver,

    Try the latest commit. I’ve removed the parameters ‘dwell’ and ‘toolchange’ for the the Drillcncjob and for Cncjob Tcl Commands.

    If ‘dwelltime’ is present then it will be assumed that the ‘dwell’ parameter is True, else ‘dwell’ is False.
    The same for ‘toolchange’ parameter in conjunction with the presence (or lack of it) of ‘toolchangez’ parameter.
    Also, the same for

    • ‘extracut’ parameter in conjunction with the presence (or lack of it) of ‘extracut_length’ parameter in case of cncjob Tcl command.
    • ‘multidepth’ parameter in conjunction with the presence (or lack of it) of ‘depthperpass’ parameter in case of cncjob Tcl command.

    Best regards,
    Marius

  4. Oliver reporter

    Hi Marius,

    I have checked the currently latest commit e61e90160353 from the Beta branch.

    • drillcncjob
      -dwelltime : Ok. works as expceted.

      -toolchangez :
      Parameter handling ok, but the related commands are not included in the GCode.
      The header comments show the "Z Toolchange" comment with the value as given with the parameter, but it's not travelling to the the tool change position.

      ➡ dwelltime ok, toolchangez has no effect.

    • cncjob

      -dwelltime : Ok. works as expceted.
      -toolchangez : Ok. works as expceted.
      -extracut : I don't exactly what to expect here, but I see that the paramter has an effect and produces a different GCode.
      -depthperpass : Also here, I don't exactly what to expect here, but I see that the paramter has an effect and produces a different GCode.

      ➡ Seems ok to me.

    kind regards
    Oliver

  5. Marius Stanciu

    Hi Oliver,

    In the last commit to Beta branch I fixed the drillcncjob Tcl Command to have the the toolchange event active. Before that it was not working that’s why you saw no effect with toolchangez parameter presence.

    In cncjob TclCommand:

    • extracut_length will activate the extracut feature. If this is active but the value of extra_length is 0, when an isolation of a copper feature finish (let’s say a trace) surrounding the entire ‘trace’, the isolation geometry will finish where it started but then will go further to the next point, repeating the cut for a while. This point can be very close or very far depending on the first point location on the trace. This will ensure that there is no copper leftovers at the end of isolation, will just pass over it in case there is something still hanging. If the value is a non-zero value then the extra cutting length will cut over as many points in the trace as needed, interpolating along the trace, to the specified length (it may be one point or many).
    • depthperpass parameter, when present, will create as many paths as needed (at a progressively increased depth) until it will reach the depth of cut (z_cut parameter). Each step in the depth is the depthperpass value but if the last step is more (absolute value) then the z_cut value, it will not go over the z_cut meaning that the last step may be smaller then the set value (depthperpass). This is so the cut at a certain depth may be done in multiple passes, over the same trajectory but at progressive depth. It allows cutting in stronger materials with a smaller cutting bit. The effect is that you will see not one path in the GCode but multiple at different depths until z_cut is reached.
      For example: with a z_cut = -1.7mm and depthperpass = 0.5mm we have 4 passes: 3 complete: -0.5, -1.0, -1.5 and one smaller (only 1.7-1.5=0.2mm) = -1.7

    I hoped I was clear, if not let me know.

    Please understand that this is going slowly because I personally don’t use those Tcl commands and usually it’s a “place” that I don’t change much except on requst. That’s the reason that some of the features I implement may break them, since I don’t check them, it’s wasted time for me. Time is limited and I focus on what I personally use.

    Best regards,
    Marius

  6. Oliver reporter

    Hi Marius,

    thank you for your explanation. I just haven't yet thought about using these features and thus I haven't checked deeper in the documentation as I probably should have.

    I should probably also mention, that I can't check the GCode produced with the cncjob command in depth.
    I don't have access to an drilling mill (would like to have one, but I don't want to operate one on the kitchen table...). My target "machine" is an good old HP7475A HPGL pen plotter - and this knows only tow z-values - "up" and "down". :-)

    Based on your explanation I have tested a bit deeper, and unfortunately I have some findings.
    I am sorry to say this, because I have the feeling that this issue report is moving from one issue to the next. And I am not sure which of the remaining issues is a side-effect from your fixes and which has been there before.
    Anyway, I hope this helps to stabilize the TCL commands (at least the basic commands / basic functionality). Specially because one of the use cases for my project is now failing in "cncjob".

    Ok, based on your explanation for the "extracut" (and my imagination for the real world use) I tested two different scenarios:

    1. An isolation geometry created with only one pass
      (few issues)
    2. An isolation geometry created with 3 passes and the combine option (the number of passes doesn't matter)
      (more trouble here)

    I did the tests with the (currently) latest commit d491b3c0d2b7.
    That will be a longer story now...

    I try to explain step-by-step with all files attached.

    Summary is at the end

    Scenario A - Geometry with one pass

    Preparation:

    • Remove existing config files ("rm -fr ~/.FlatCAM"), start FlatCAM once and close again.
      This step ensures that we have a new set of default settings.

    Generate Geometry:

    • Open FlatCAM (again)
    • Open Gerber "kicad_test_2-CuBottom.gbr" (attached)
    • Select the object and generate the isolation geometry.
      Settings: Tool Dia 0.2mm, Passes 1, Overlap 10%, don't combine (others: default)
      This generates "kicad_test_2-CuBottom.gbr_iso"
    • In "kicad_test_2-CuBottom.gbr_iso", set the Tool diameter to 0.1mm (for better visibility)
    • Save Project as: "Project_363_onepass_01.FlatPrj"

    Generate CNC Jobs from GUI (for Reference):

    • In "kicad_test_2-CuBottom.gbr_iso": Generate CNC Job.
      Settings: no multi-depth and also otherwise defaults.
      This generates: "kicad_test_2-CuBottom.gbr_iso_cnc"
    • Again in "kicad_test_2-CuBottom.gbr_iso": Generate CNC Job.
      Settings: Multi-Depth = 0.8000, otherwise defaults.
      This generates: "kicad_test_2-CuBottom.gbr_iso_cnc_1"

    Export GCode files and Project

    • Save "kicad_test_2-CuBottom.gbr_iso_cnc" as "kicad_test_2-CuBottom-defaults.gbr_iso_cnc"
    • Save "kicad_test_2-CuBottom.gbr_iso_cnc_1" as "kicad_test_2-CuBottom-multidepth.gbr_iso_cnc"
    • Save project as "Project_363_onepass_01_gui_with_cnc.FlatPrj"
    • Close FlatCAM

    Prepare for TCL commands:

    • Open FlatCAM (again)
    • Open Project: "Project_363_onepass_01.FlatPrj"
    • Open TCL Shell window

    cncjob GEOMETRY

    • Run command "cncjob kicad_test_2-CuBottom.gbr_iso"
      -> no errors
    • Set to "Plot enabled" and save as "kicad_test_2-CuBottom-TCL-defaults.gbr_iso_cnc"
    • Compare file with "kicad_test_2-CuBottom-defaults.gbr_iso_cnc" created above (GUI, no TCL):

    Results:

    • Differences (different filename and timestamp ommitted, , '-' = GUI file, '+' = TCL file):
    -(TOOL DIAMETER: 0.1 mm)
    +(TOOL DIAMETER: 0.2 mm)
    
    • In the GUI, the CNC object has the Tool Dia set to 0.2mm (not 0.1mm as in the geometry).
      This is also visible in the Plot Area.

    cncjob GEOMETRY -depthperpass 0.8

    • Run command "cncjob kicad_test_2-CuBottom.gbr_iso -depthperpass 0.8"
      -> No errors
    • Set to "Plot enabled" and save as "kicad_test_2-CuBottom-TCL-multidepth.gbr_iso_cnc"
    • Compare file with "kicad_test_2-CuBottom-multidepth.gbr_iso_cnc" created above (GUI, no TCL):

    Results:

    • As in the step before.

    (Save project as: "Project_363_onepass_01_tcl_with_cnc_01.FlatPrj")

    cncjob GEOMETRY -extracut_length 0.0

    • Run command "cncjob kicad_test_2-CuBottom.gbr_iso -extracut_length 0.0"
      -> no errors
    • Set to "Plot enabled" and save as "kicad_test_2-CuBottom-TCL-extracut.gbr_iso_cnc"

    Results:

    • Checking in the GUI, I see again that the tool diameter is 0.2mm (visible also in the Plot Area)
    • The File as also "(TOOL DIAMETER: 0.2 mm)" in the top.
      It looks like that the file has one more small movement step at the end of each trace, of approx. 0.05mm,
      Example (the '+' line is the additional line):
     G01 X13.5465 Y2.6245
    +G01 X13.8998 Y2.6245
    

    cncjob GEOMETRY -extracut_length 3.0

    • Run command "cncjob kicad_test_2-CuBottom.gbr_iso -extracut_length 3.0”
      -> no errors
    • Set to "Plot enabled" and save as "kicad_test_2-CuBottom-TCL-extracut-3.gbr_iso_cnc"

    Results:

    • Checking in the GUI, I see again that the tool diameter is 0.2mm (visible also in the Plot Area)
    • The File as also "(TOOL DIAMETER: 0.2 mm)" in the top.
    • I see a significant amount of additional movements at the end of each trace. I can't check this in detail, but it seems reasonably according to your explanation.

    Save project close and reopen FlatCAM here:

    (Save project as "Project_363_onepass_01_tcl_with_cnc_02.FlatPrj" / Close FlatCAM / Open FlatCAM (again) Open Project: "Project_363_onepass_01_tcl_with_cnc_02.FlatPrj" / Open TCL Shell window)

    cncjob GEOMETRY -extracut_length 0.0 -depthperpass 0.8

    • Run command "cncjob kicad_test_2-CuBottom.gbr_iso -extracut_length 0.0 -depthperpass 0.8"

    • Set to "Plot enabled" and save as "kicad_test_2-CuBottom-TCL-extracut-0-depthperpass-0.8.gbr_iso_cnc"

    Result:

    • Some invalid CNC paths taken (copper cut away in the top of the PCB)
      See picture: TCL-extracut-0-depthperpass-0.8.jpg

    Scenario B - Geometry with more than one pass, combined:

    Preparation:

    • Remove existing config files ("rm -fr ~/.FlatCAM"), start FlatCAM once and close again.
      This step ensures that we have a new set of default settings.

    Generate Geometry:

    • Open FlatCAM (again)
    • Open Gerber "kicad_test_2-CuBottom.gbr" (attached)
    • Select the object and generate the isolation geometry.
      Settings: Tool Dia 0.2mm, Passes 3, Overlap 10%, combine (others: default)
      This generates "kicad_test_2-CuBottom.gbr_iso"
    • In "kicad_test_2-CuBottom.gbr_iso", set the Tool diameter to 0.1mm (for better visibility)
    • Rename the geometry to "kicad_test_2-CuBottom-MP.gbr_iso"
    • Save Project as: "Project_363_multipass_01.FlatPrj"

    Generate CNC Jobs from GUI (for Reference):

    • In "kicad_test_2-CuBottom-MP.gbr_iso": Generate CNC Job.
      Settings: no multi-depth and also otherwise defaults.
      This generates: "kicad_test_2-CuBottom-MP.gbr_iso_cnc"
    • Again in "kicad_test_2-CuBottom-MP.gbr_iso": Generate CNC Job.
      Settings: Multi-Depth = 0.8000, otherwise defaults.
      This generates: "kicad_test_2-CuBottom-MP.gbr_iso_cnc_1"

    Export GCode files and Project

    • Save "kicad_test_2-CuBottom-MP.gbr_iso_cnc" as "kicad_test_2-CuBottom-defaults-MP.gbr_iso_cnc"
    • Save "kicad_test_2-CuBottom-MP.gbr_iso_cnc_1" as "kicad_test_2-CuBottom-multidepth-MP.gbr_iso_cnc"
    • Save project as "Project_363_multipass_01_gui_with_cnc.FlatPrj"
    • Close FlatCAM

    Prepare for TCL commands:

    • Open FlatCAM (again)
    • Open Project: "Project_363_multipass_01.FlatPrj"
    • Open TCL Shell window

    cncjob GEOMETRY

    • Run command "cncjob kicad_test_2-CuBottom-MP.gbr_iso"

      → Several errors because of parameter handling:

    > cncjob kicad_test_2-CuBottom-MP.gbr_iso
    ERROR: 'extracut_length'
    Python traceback: <class 'KeyError'>
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/tclCommands/TclCommandCncjob.py", line 216, in execute > local_tools_dict[tool_uid]['data']['extracut_length'] = args["extracut_length"]
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/tclCommands/TclCommand.py", line 343, in execute_call > self.output = self.execute(args, unnamed_args)
        while executing
    "cncjob kicad_test_2-CuBottom-MP.gbr_iso"
    

    > cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 
    ERROR: 'depthperpass'
    Python traceback: <class 'KeyError'>
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/tclCommands/TclCommandCncjob.py", line 217, in execute > local_tools_dict[tool_uid]['data']['depthperpass'] = args["depthperpass"]
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/tclCommands/TclCommand.py", line 343, in execute_call > self.output = self.execute(args, unnamed_args)
        while executing
    "cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 "
    

    > cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 -depthperpass 3
    [ERROR_NOTCL] An internal error has occurred. See shell.
    Object (cncjob) failed because: int() argument must be a string, a bytes-like object or a number, not 'NoneType' 
    
    Traceback (most recent call last):
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/FlatCAMApp.py", line 4184, in new_object
        return_value = initialize(obj, self)
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/FlatCAMObj.py", line 5147, in job_init_single_geometry
        tool_no=tool_cnt)
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/camlib.py", line 3513, in generate_from_geometry_2
        self.spindlespeed = int(spindlespeed) if spindlespeed != 0 else None
    TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
    

    > cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 -depthperpass 3 -spindlespeed 0
    [ERROR_NOTCL] An internal error has occurred. See shell.
    Object (cncjob) failed because: int() argument must be a string, a bytes-like object or a number, not 'NoneType' 
    
    Traceback (most recent call last):
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/FlatCAMApp.py", line 4184, in new_object
        return_value = initialize(obj, self)
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/FlatCAMObj.py", line 5147, in job_init_single_geometry
        tool_no=tool_cnt)
      File "/data/build/KiCad/PCB/FlatCam/git-d491b3c0d2b7/camlib.py", line 3513, in generate_from_geometry_2
        self.spindlespeed = int(spindlespeed) if spindlespeed != 0 else None
    TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
    
    • This combination finally worked:
    > cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 -depthperpass 3 -spindlespeed 300
    Indexing geometry before generating G-Code...
    Starting G-Code...
    Starting G-Code for tool with diameter: 0.1MM.
    Finished G-Code generation... 35  paths traced.
    [success] G-Code parsing in progress...
    Parsing GCode file. Number of lines: 10665
    Creating Geometry from the parsed GCode file. ...
    [success] G-Code parsing finished...
    [success] Finished G-Code processing...
    
    • Save as "kicad_test_2-CuBottom-TCL-attempt-1-MP.gbr_iso_cnc"

    Results:

    • In the GUI, the tool diameter is correct (0.1mm) and it looks ok in the Plot Area
    • The file headers shows that depthpercut has been limited to 2.4mm (the default depth) and the it will do 1 pass (that was my intention by setting depthperpass to 3).
      It also shows toolchangez as 0.0mm, and the spindle speed as 300 (which I was forced to set)
      The codes show an M3 with spindlespeed and also a small movement at the end of each trace (like above with the singlepath geometry)
      ('-' = file generated using GUI, with default settings, '+' = TCL file)
    +(DepthPerCut: 2.4 mm <=>1 passes)
    
    -(Z Toolchange: 15.0 mm)
    +(Z Toolchange: 0.0 mm)
    
    -(Spindle Speed: None RPM)
    +(Spindle Speed: 300 RPM)
    

    cncjob GEOMETRY -extracut_length 10 -depthperpass 3 …

    • Run command "cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 10 -depthperpass 3 -spindlespeed 300"
    • Save as "kicad_test_2-CuBottom-TCL-attempt-2-MP.gbr_iso_cnc"

    Results:

    • In the GUI, the tool diameter is correct (0.1mm) and it looks ok in the Plot Area
    • File headers as in the previous step.
    • More movement at the end of each trace, seems to be the extracut as per your description.

    cncjob GEOMETRY -extracut_length 0 -depthperpass 0.8 …

    • Run command "cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 -depthperpass 0.8 -spindlespeed 300"
    • Save as "kicad_test_2-CuBottom-TCL-attempt-3-MP.gbr_iso_cnc"

    Results:

    • Some invalid CNC paths taken.
      See Picture: TCL-attempt-3-MP.jpeg

    cncjob GEOMETRY -extracut_length 10 -depthperpass 0.8 …

    • Run command "cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 10 -depthperpass 0.8 -spindlespeed 300"
    • Save as "kicad_test_2-CuBottom-TCL-attempt-4-MP.gbr_iso_cnc"

    Results:

    • Some invalid CNC paths taken.
      See Picture: TCL-attempt-4-MP.jpeg

    (Save project as "Project_363_multipass_01_tcl_with_cnc.FlatPrj")

    cncjob GEOMETRY -depthperpass 0 …

    • Run command "cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 -depthperpass 0 -spindlespeed 300 -timeout 120000"
    • CPU goes to 100% (one core)
    • Stops with timeout after two minutes:
    > cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 -depthperpass 0 -spindlespeed 300 -timeout 120000
    Indexing geometry before generating G-Code...
    Starting G-Code...
    Starting G-Code for tool with diameter: 0.1MM.
    ERROR: Unknown error: Operation timed outed! Consider increasing option '-timeout <miliseconds>' for command or 'set_sys global_background_timeout <miliseconds>'.
        while executing
    "cncjob kicad_test_2-CuBottom-MP.gbr_iso -extracut_length 0 -depthperpass 0 -spindlespeed 300 -timeout 120000"
    

    Summary

    Summary for Scenario A - Geometry with one pass:

    • The tool diameter is not taken from the Geometry object.
    • extracut_length in combination with depthperpass causes incorrect CNC paths.
    • Everything else looks ok, as far as I can tell.

    Summary for Scenario B - Geometry with multi pass:

    • Parameter handling incorrect:

      • extracut_length must be set -> can't disable the extracut feature
      • depthperpass must be set
      • spindlespeed must be set
      • spindlespeed = 0 is not accepted
    • depthperpass = 0 seems to cause an infinite loop

    • extracut_length in combination with depthperpass causes incorrect CNC paths

    Regarding the problems related to the combination of extracut and depthperpass:
    My feeling is that there is something wrong deeper in the algorithms for these features, and this is not related to the TCL commands. Personally I would be perfectly happy if you would concentrate on the parameter handling of the TCL commands.

    Otherwise I fear that this issue # 363 will become an endless story and that you will not bring the Beta to an end.
    This is also reasonable considering the the extracut feature is not available from the GUI screens (at least I haven't found them).

    So, it would be fine with me if we keep this issue with the TCL parameters.

    kind regards
    Oliver

  7. Marius Stanciu

    Hi Oliver,
    Those issues require a bit of digging and I have something else now to do. After I finish remaking the NCC and Paint tools I will attend to those too. But next time try to make a new issue (issues) if possible.

    Thanks,
    Marius

  8. Oliver reporter

    Hi Marius,

    no worries, take your time. Full understanding from my side.
    And yes, you are right - somehow this issue moved away from the initial problem. I’ll try to do better next time.

    Have a nice day.

    Oliver

  9. Marius Stanciu

    Hi Oliver,
    I had a little time and I evaluated the Scenario A with the following conclusions.

    Summary for Scenario A - Geometry with one pass:

    • The tool diameter is not taken from the Geometry object.
    • extracut_length in combination with depthperpass causes incorrect CNC paths.

    The tool diameter is not taken from the Geometry object.

    Whatever changes you do in the GUI Selected tab does not impact the object itself. Therefore there is a separation between the GUI work and TCL commands. Whenever you change something in the GUI Selected tab, those parameters will be used when clicking to generate CNCJob. Just like the Tcl command uses the parameters that are served in the same line.
    If you want to change the tool diameter when using the Tcl command cncjob then use the -dia parameter.

    extracut_length in combination with depthperpass causes incorrect CNC paths.

    True, this was a bug that I did solved. Actually I improved the “extracut” feature in the sense that when the extracut_length is non zero, a new cut is added starting from half the mentioned distance (extracut_length) before the end of the isolation, will cut along the isolation, will cut over the end of the isolation which coincide with the start of isolation, and will continue to cut another half of extracut_length distance, again along the same path.
    Then it will return the same path to the end/start of the isolation so there are no issues with multidepth parameter that expects that each cut to start in the start/end point of the isolation. The start point coincide with the end point when doing isolations.

  10. Oliver reporter

    Hi Marius,

    sorry, I haven’t found time earlier to look into your response. Time is flying…

    Your explanation for die diameter in scenario A makes sense, I will check using the -dia option.

    For the other fixes, actually I don’t see a commit containing these changes (latest available commit is from 2020-01-10). In case you commit this earlier than the beta, I can recheck based on this. Otherwise I will wait for the Beta 9.992.

    Thank you very much.

    regards,
    Oliver

  11. Marius Stanciu

    Hi Oliver,

    I have not made commits to the Beta branch since you mentioned. All the changes are in my working copy as I am trying to fit everything together. I may push the changes in the next few days but that’s not certain, I am trying to fix some issues right now (PyQt versions > 5.12.1 have some issues and when using Python 3.8 the application close signal is ignored).
    Best regards,
    Marius

  12. Marius Stanciu

    Hi Oliver,
    I just pushed the big update on the repo.
    If you have the time to check how the Tcl commands work it will be nice since I’ve done only some cursory checks and everything is now changed.

    Best regards,
    Marius

  13. Log in to comment