Thanks Filipe , i will certianly give this patch a try .
On 20 March 2016 at 15:01, Filipe Tomaz <[email protected]> wrote: > 2nd attempt > > Changes: > Signed-off > Solved when a tool table is written by Gcode such as G10 > Corrected indentation for 4 space/tab > > What I still did not do: > Documentation for the changes. I do not know where the documentation > should be placed. In this email? in a separated file that goes with the > patch? > If it could be in this email then the documentation would be: > > > 2.11. [EMCIO] SECTION > > > > * > /FANUC_TOOLTIP_ORIENTATION = 1/ - If the tool tip orientation to be used > should be equal to all known lathe machines (except linuxcnc) > > My opinion is that when the orientation was created in linuxcnc it was > wrongly "seen" probably due to the back tool lathe. This patch solves the > issue maintaining the internal calculation of linuxcnc and swapping the > tool orientation when the tooltable is read from and write from the > tooltable file. > If the user does not set FANUC_TOOLTIP_ORIENTATION = 1, or sets to 0, > then no changes result due to this patch. > > Citando Jeff Epler <[email protected]>: > > Thank you for offering this patch to improve LinuxCNC. >> >> I don't know enough about lathes or fanuc gcode to evaluate whether the >> general idea of changing orientation numbers in this way is right or >> wrong. I hope someone else will be able to do this. Instead, my notes >> below are all boring technical stuff. >> >> This patch is not "Signed-Off-By". Without this special line in a >> commit message, our policy states that we cannot incorporate your change >> into linuxcnc. See our contributor documentation for what this line >> means and how to add it to your commit message. >> >> This patch does not add documentation for the new feature. Without >> documentation, new users cannot discover the functionality for >> themselves. >> >> However, I don't see what happens to orientation when a tool table file >> is >> rewritten. For instance, the value 2 is read from a file and converted >> to 3 in memory. Later, a gcode such as G10 L10 P1 R[1/8] is executed >> (set radius of tool number 1 to [1/8]) that causes the whole tool table >> to be written. It appears to me, without testing, that the value 3 will >> be written to the table, which will not have the correct meaning when >> the table is next read in, such as when starting the machine the next >> time. >> >>> toolTable[pocket].backangle = backangle; >>> + if (fanuc_tooltip_orientation) { >>> + if (orientation == 2) toolTable[pocket].orientation = 3; >>> + else if (orientation == 3) >>> toolTable[pocket].orientation = 2; >>> + else if (orientation == 6) >>> toolTable[pocket].orientation = 8; >>> + else if (orientation == 8) >>> toolTable[pocket].orientation = 6; >>> + else if (orientation == 1) >>> toolTable[pocket].orientation = 4; >>> + else if (orientation == 4) >>> toolTable[pocket].orientation = 1; >>> + else toolTable[pocket].orientation = >>> orientation; >>> + } >>> + else >>> toolTable[pocket].orientation = orientation; >>> >> This indentation is very irregular. The 'if' shold be indented as much >> as the line above it, and all the lines inside should be indented the >> same, more like this: >> toolTable[pocket].backangle = backangle; >> if (fanuc_tooltip_orientation) { >> if (orientation == 2) toolTable[pocket].orientation = 3; >> else if (orientation == 3) toolTable[pocket].orientation = 2; >> else if (orientation == 6) toolTable[pocket].orientation = 8; >> else if (orientation == 8) toolTable[pocket].orientation = 6; >> else if (orientation == 1) toolTable[pocket].orientation = 4; >> else if (orientation == 4) toolTable[pocket].orientation = 1; >> else toolTable[pocket].orientation = orientation; >> } >> else >> toolTable[pocket].orientation = orientation; >> >> LinuxCNC's coding style is that tab characters are always displayed as 8 >> spaces, but the indentation level is 4 spaces. Either configure your >> editor to insert 4 spaces when you type tab, or always type 4 spaces >> manually to set indentation. >> >> Jeff >> >> >> ------------------------------------------------------------------------------ >> Transform Data into Opportunity. >> Accelerate data analysis in your applications with >> Intel Data Analytics Acceleration Library. >> Click to learn more. >> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 >> _______________________________________________ >> Emc-developers mailing list >> [email protected]:// >> lists.sourceforge.net/lists/listinfo/emc-developers >> > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers > > -- The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. This mail and any attachments have been scanned for viruses prior to leaving the RcTechnix network. RcTechnix will not be liable for direct, special, indirect or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on. RcTechnix reserves the right to monitor and record e-mail messages being sent to and from this address for the purposes of investigating or detecting any unauthorised use of its system and ensuring effective operation. (c) RcTechnix ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
