Separate 3D Surface and Waterline (new feature) [Merged]

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Russ4262
Posts: 462
Joined: Sat Jun 30, 2018 3:22 pm

Re: Separate 3D Surface and Waterline (new feature) [Merged]

Postby Russ4262 » Wed Jun 03, 2020 7:31 am

Good morning Walter,
roerich_64 wrote:
Sun May 31, 2020 1:31 pm
... Waterline:
open W1.) The Tasks 'Cut Pattern' have no 'Offset'. At the drop down in 'Property view' at 'Cut Pattern' there we found 'offset'.
open W2.) everything except 'offset' continues through the part.
open W3.) When i simulate the path, it was simulated two times... ('Clear last layer' = OFF)

3D-Surface:
open S1.) Task 'Cut Pattern': In english we found 'Offset'. In german there comes 'versetzen' and generated an error:
At the drop down in 'Property view' at 'Cut Pattern' there we found 'offset' also in german and all is be ok.
...
open S2.) at the moment 3d-surface is no longer usable ... 'avoid Last_X_Faces' have no effect when we take it at 'tasks'.
open S3.) when I use 'Avoid_last_X_Faces' in 'Property View' it comes an error:
...
Okay, here is the update:
Waterline:
pending W1.) Fixed
pending W2.) Fixed, but needs more testing.
open W3.) No fixes attempted because I cannot reproduce the dual simulation. Using the inspect g-code tool, I only see one copy of the path code. Running the path simulator produces one simulation.

3D-Surface:
open S1.) I cannot reproduce this, nor find any easily-recognizable clues in the code or UI panel files that would cause just the "Offset" option to be translated.
pending S2.) Fixed
pending S3.) Fixed with S2 above.

I submitted Path: 3D Surface and Waterline fixes per forum identification #3556 as it is.

We will have to continue investigating the unresolved issues listed here.

Many thanks for helping with testing and feedback, Walter. Very helpful in the advancement of the PathWB and quite a help to developers!

Russ
User avatar
roerich_64
Posts: 1212
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: Separate 3D Surface and Waterline (new feature) [Merged]

Postby roerich_64 » Wed Jun 03, 2020 4:52 pm

Russ4262 wrote:
Wed Jun 03, 2020 7:31 am

Okay, here is the update:
Waterline:
pending W1.) Fixed
pending W2.) Fixed, but needs more testing.
open W3.) No fixes attempted because I cannot reproduce the dual simulation. Using the inspect g-code tool, I only see one copy of the path code. Running the path simulator produces one simulation.

3D-Surface:
open S1.) I cannot reproduce this, nor find any easily-recognizable clues in the code or UI panel files that would cause just the "Offset" option to be translated.
pending S2.) Fixed
pending S3.) Fixed with S2 above.

I submitted Path: 3D Surface and Waterline fixes per forum identification #3556 as it is.

We will have to continue investigating the unresolved issues listed here.

Many thanks for helping with testing and feedback, Walter. Very helpful in the advancement of the PathWB and quite a help to developers!

Russ
Hi Russ,

pending W2.) Fixed, but needs more testing.
I have done more testst and it works. i have no issues found ;)

open W3.) No fixes attempted because I cannot reproduce the dual simulation. Using the inspect g-code tool, I only see one copy of the path code. Running the path simulator produces one simulation.

I can reproduce it:
The two time simulation comes with clear the stock and only with 'Single Pass' and 'Offset'. Here a file:
Stern_III_B.FCStd
(187 KiB) Downloaded 5 times



open S1.) I cannot reproduce this, nor find any easily-recognizable clues in the code or UI panel files that would cause just the "Offset" option to be translated.
Ok. Have you switched to 'Deutsch' in the global preferences?
Global_Preferences.jpg
Global_Preferences.jpg (34.01 KiB) Viewed 435 times
Then add in the File 'Stern_III_B' a 3d-Surface and open the drop-down-menu at 'cut pattern'. There i found 'versetzen'. But it should be 'offset'.
(Can not make a screenshot with open drop-down-menu at Linux Mint. Sorry)

Walter
Russ4262
Posts: 462
Joined: Sat Jun 30, 2018 3:22 pm

Re: Separate 3D Surface and Waterline (new feature) [Merged]

Postby Russ4262 » Thu Jun 04, 2020 3:12 am

Hello Walter,
We make a great team. You have the knowhow and good looks and I seem to find the time for coding. :lol:
roerich_64 wrote:
Sun May 31, 2020 1:31 pm
... Waterline:
open W1.) The Tasks 'Cut Pattern' have no 'Offset'. At the drop down in 'Property view' at 'Cut Pattern' there we found 'offset'.
open W2.) everything except 'offset' continues through the part.
open W3.) When i simulate the path, it was simulated two times... ('Clear last layer' = OFF)

3D-Surface:
open S1.) Task 'Cut Pattern': In english we found 'Offset'. In german there comes 'versetzen' and generated an error:
At the drop down in 'Property view' at 'Cut Pattern' there we found 'offset' also in german and all is be ok.
...
open S2.) at the moment 3d-surface is no longer usable ... 'avoid Last_X_Faces' have no effect when we take it at 'tasks'.
open S3.) when I use 'Avoid_last_X_Faces' in 'Property View' it comes an error:
...
Okay, here is the update:
Waterline:
pending W3.) Using the additional instruction you provided and some comments from @Sliptonic, I believe this is fixed. It was an error in all cut patterns when using single-pass layer mode.

3D-Surface:
pending S1.) Okay. With your added instruction, I am able to see the translated version.
I fixed this with a more robust method to support multi-lingual translations in the Tasks panel. Unfortunately, I don't have the same multi-language support for the Property View list. The fix here might be replaced with another English-only fix so that the options displayed in both the Tasks panel and the Property View will be synchronized. This current fix leaves the `Versetzen` in the Tasks panel, allows for additional translations for other CutPattern and ProfileEdges options (in the same manner this one came about, whatever triggered it), and is now functional with the actual operation and code behind the Tasks panel.
I do not know who provided, or the programmatic source of, the translation that is occurring. Being a Spanish teacher, I am for full support of multi-lingual support throughout the entirety of FreeCAD; however, I do know such support requires great coding knowledge and skill that might not be available in order to implement complete multi-lingual support throughout. I might do some research here in the forums to learn about the translation process and how that process flows through FreeCAD in the code. It would be great if we could get the Property View to use the available translations as our CutPattern property has so begun in the Tasks panel. Seeing the technical terms in one's native language is a comfort as well as an aid in understanding the choices being made for the textual inputs.

Have a great day!
Thanks for collaborating with me to improve the PathWB. :)

Russell
Attachments
Translation_issue_1.png
Translation_issue_1.png (103.95 KiB) Viewed 407 times
User avatar
roerich_64
Posts: 1212
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: Separate 3D Surface and Waterline (new feature) [Merged]

Postby roerich_64 » Thu Jun 04, 2020 12:52 pm

Russ4262 wrote:
Thu Jun 04, 2020 3:12 am
Hello Walter,
We make a great team. You have the knowhow and good looks and I seem to find the time for coding. :lol:
...
Thanks for collaborating with me to improve the PathWB. :)
If the coder can be helped quickly in this way, it is fun to find the bugs :)
roerich_64 wrote:
Sun May 31, 2020 1:31 pm
a little description:
open : found bug
pending : The corrected part of the code is waiting to be merged. Then it should be tested again.
(Fixed) : The programmer found and corrected the issue

Waterline:
pending W1.) (Fixed) The Tasks 'Cut Pattern' have no 'Offset'. At the drop down in 'Property view' at 'Cut Pattern' there we found 'offset'.
pending W2.) (Fixed) everything except 'offset' continues through the part.
pending W3.) (Fixed) When i simulate the path, it was simulated two times... ('Clear last layer' = OFF)
open W4.) When i select 'Cut Pattern'= Offset then 'Cut Mode'= Climb and/or 'Cut Pattern Reversed'= True have no effect to the path

3D-Surface:
pending S1.) (Fixed) Task 'Cut Pattern': In english we found 'Offset'. In german there comes 'versetzen' and generated an error...
pending S2.) (Fixed) at the moment 3d-surface is no longer usable ... 'avoid Last_X_Faces' have no effect when we take it at 'tasks'.
pending S3.) (Fixed) when I use 'Avoid_last_X_Faces' in 'Property View' it comes an error...

Ok. I have updated the list.

Hmm, could we found a way to 'test again' in a faster way?
I know about the 'git pull' and 'git checkout "version" '...

At Linux Mint there is a Path .FreeCAD/Mod/... when i could clone the modul 'path' to there, i can do a faster debugging...
But i have seen, that you have also edited *.ui files...

Walter
Russ4262
Posts: 462
Joined: Sat Jun 30, 2018 3:22 pm

Re: Separate 3D Surface and Waterline (new feature) [Merged]

Postby Russ4262 » Mon Jun 22, 2020 3:26 am

Hi Walter!
Sorry I've been quite on this topic of late. As usual, I've been jumping around on FreeCAD coding projects.
roerich_64 wrote:
Sun May 31, 2020 1:31 pm
a little description:
open : found bug
pending : The corrected part of the code is waiting to be merged. Then it should be tested again.
(Fixed) : The programmer found and corrected the issue

Waterline:
...open W4.) When i select 'Cut Pattern'= Offset then 'Cut Mode'= Climb and/or 'Cut Pattern Reversed'= True have no effect to the path

3D-Surface:
...
I will try to look into this open issue this week. Starting to burn out a bit on the FC front.

Thanks again for the great feedback and testing. You've been a valuable part of moving 0.19_pre forward, not to mention helping me better understand machining processes I'm trying to code for PathWB.

Have a wonderful week, Sir.

Russell
User avatar
roerich_64
Posts: 1212
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: Separate 3D Surface and Waterline (new feature) [Merged]

Postby roerich_64 » Sun Jun 28, 2020 9:53 pm

Russ4262 wrote:
Mon Jun 22, 2020 3:26 am
Ping pong ;)
Hi Russel,

yes looks great :) but there are old and new issues...

i am here:

Code: Select all

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21775 (Git) AppImage
Build type: Release
Branch: master
Hash: 1f741aa511e898849e46ed14515fce416fe32acb
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)



a little description:
open : found bug
pending : The corrected part of the code is waiting to be merged. Then it should be tested again.
(Fixed) : The programmer found and corrected the issue


Waterline:
open W4.) When i select 'Cut Pattern'= Offset then 'Cut Mode'= Climb and/or 'Cut Pattern Reversed'= True have no effect to the path
open W5.) Task 'Cut Pattern': In english we found 'Offset'. In german there comes 'versetzen' and generated an error:

Code: Select all

<Exception> 'Versetzen' is not part of the enumeration
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathOpGui.py", line 240, in pageGetFields
    self.getFields(self.obj)
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathWaterlineGui.py", line 66, in getFields
    obj.CutPattern = str(self.form.cutPattern.currentText())
ValueError: {'sclassname': 'N4Base10ValueErrorE', 'sErrMsg': "'Versetzen' is not part of the enumeration", 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': "'Versetzen' is not part of the enumeration", 'btranslatable': False, 'breported': True}
open W6.) When i select in the Task Panel the tool 'T3_3mm_flach'`there comes an error (with tool 'T2_2mm_flach' all is be ok):
Found the issue by my self... In the template-file at the 'T3_3mm_flach' options there was defined the "tooltype": "Undefined". It must be "tooltype": "EndMill"... Hmm could we have a Note to see what is going on?

Code: Select all

PathWaterline.INFO: 
Begin Waterline operation...
Failed to map selected tool to an OCL tool type.
PathWaterline.ERROR: Canceling Waterline operation. Error creating OCL cutter.

3D-Surface:
open S4.) When i select 'Cut Pattern'= Offset then 'Cut Mode'= Climb and/or 'Cut Pattern Reversed'= True have no effect to the path
open S5.) When i select in the Task Panel 'Scan Type' = 'Rotational' there comes an error:

Code: Select all

Surfacing Select Mode
Face selection is unavailable for Rotational scans.
 Ignoring selected faces.
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathUtils.py", line 62, in new_function
    res = function(*args, **kwargs)
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathOp.py", line 515, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathSurface.py", line 620, in opExecute
    CMDS.extend(self._processCutAreas(JOB, obj, m, FACES[m], VOIDS[m]))
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathSurface.py", line 732, in _processCutAreas
    final.extend(self._processRotationalOp(JOB, obj, mdlIdx, COMP))
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathSurface.py", line 1599, in _processRotationalOp
    return self._rotationalDropCutterOp(obj, stl, bb)
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathSurface.py", line 1720, in _rotationalDropCutterOp
    scanLines = self._indexedDropCutScan(obj, stl, advances, xmin, ymin, xmax, ymax, layDep, sample)
  File "/tmp/.mount_FreeCAQqC441/usr/Mod/Path/PathScripts/PathSurface.py", line 1825, in _indexedDropCutScan
    path.append(lo)         # add the line to the path
<class 'UnboundLocalError'>: local variable 'lo' referenced before assignment
2.506e-06 <App> Document.cpp(3760): Failed to recompute Stern_III_B#Surface: local variable 'lo' referenced before assignment
Recompute failed! Please check report view.


open S6.) When i select in the Task Panel the tool 'T3_3mm_flach'`there comes an error (with tool 'T2_2mm_flach' all is be ok):

Found the issue by my self... In the template-file at the 'T3_3mm_flach' options there was defined the "tooltype": "Undefined". It must be "tooltype": "EndMill"... Hmm could we have a Note to see what is going on?

Code: Select all

Failed to map selected tool to an OCL tool type.
PathSurface.ERROR: Canceling 3D Surface operation. Error creating OCL cutter.
PathOp.WARNING: Add Tool Controller Rapid Speeds on the SetupSheet for more accurate cycle times.

The File:
Stern_III_B.FCStd
(382.72 KiB) Downloaded 4 times
The Template-File (please delete .txt):
job_Mehrschicht.json.txt
(2.63 KiB) Downloaded 5 times
Bests
Walter
User avatar
roerich_64
Posts: 1212
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: Separate 3D Surface and Waterline (new feature) [Merged]

Postby roerich_64 » Tue Jun 30, 2020 12:56 am

Wow!

I can separate now with 3D-Surface directly what face should be milled:
Stern_III_B.jpg
Stern_III_B.jpg (362.84 KiB) Viewed 144 times
Hmm, with Waterline 'Avoid_Last_X_Faces' it have no effect to cut only the stock outside the part:
Stern_III_B_I.jpg
Stern_III_B_I.jpg (497.55 KiB) Viewed 136 times
Stern_IV_Basics_I.FCStd
(605.53 KiB) Downloaded 5 times
Walter