587,997 active members*
1,866 visitors online*
Register for free
Login
IndustryArena Forum > CAD Software > Rhino 3D > GCode2Rhino Plugin (TEST)
Page 1 of 2 12
Results 1 to 20 of 30
  1. #1
    Join Date
    Jul 2007
    Posts
    42

    Post GCode2Rhino Plugin (TEST)

    Hi All,

    I posted on the Rhino Plugin NG, and got some response(s) but not as much as I'd anticipated.

    In a nutshell, in the last week or so, I finally took the time to write RhinoScript to directly import GCode into Rhino and it appears to be working pretty well with the code I have available to test it with.

    It's working with the basics... G0(Red) and G1(Green) linear movements, G2(Blue) and G3(Cyan) Arcs in "R" and "IJK" formats on the primary planes (G17, G18 and G19). It also names each element with the actual line or block of GCode that created it (viewable under property details). The plugin also tracks modals (Tool, Speed, Feed, Work Offest, etc.) and can "Name" each element with those tracked modals.

    This SHOULD be a good place to test for and expose bugs and get feed back from CNC users.

    I attached a plugin that is dated to expire on 10/24/2009 @ midnight for some testing... So, if anyone would, please convert some of your GCode to Rhino and see how it works for someone besides the author in a closed environment, and post results?

    kmckenn
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2004
    Posts
    201

    gcode to rhino

    i need someone to write a custom app for me for rhino for pay.
    similar to what you have done with the gcode.
    please contact me thru www.bluestoneky.com for more info if you are interested I can explain in detail.
    thanks
    j

  3. #3
    Join Date
    Jul 2007
    Posts
    42
    1ctoolfool... "you've got mail".

    kmckenn

  4. #4
    Join Date
    Jul 2007
    Posts
    42
    At the time of this posting, I've noticed a dozen "views" on the TEST code, and no feed back.

    Too new a version for most Rhino users? differing code? crash-n-burn? anyone?

  5. #5

    too late

    I am intersted in this plugin, but failed the expire date.
    Now I work with CADucopiaToolpathViewer (- doesnt work smooth, seems to have a bug in it) . Or with external progs to convert.
    Could you give me another chance to test it?

    Thanks

    My purpose is to load the G-Code , produced by RhinoCam, back into Rhino, to optimise the toolpath and generate a new G-code .
    I try to safe machining-time by eliminating edges in the G00 pathes and replacing it by 3D-Loops, or reassemby some pathes or eliminate unnecessary pathes of the roughing process,...
    For generating the new code I use a improved modified script from JVB (see thread "Rhino to G-Code " ).

  6. #6
    Join Date
    Jul 2007
    Posts
    42
    .... I'll post a new one with a different date SOON.

    Actually, the reason I wanted/wrote this GCode2Rhino application is that I have created a very extensive, and very complete Rhino2GCode application that I have used in production in 2D, 2.5D, 3D 3, 4, even 5 Axis machining, on FANUC and Heidenhain controls. It's actually very mature, and many times over manufacturing proven on $500,000+ machines.

    Kevin

  7. #7
    Join Date
    Jul 2007
    Posts
    42
    SAME "TEST"... new date November 7, 2009.

    ANYONE with feedback on this Plugin at all?


    --------------------------------------------------------------

    I cannot delete this now older version from the posting... if you are interested in this RhinoPlugin, download the version @ Post #9 below.

    Kevin (October 30, 200 @ 3:58PM EST)
    Attached Files Attached Files

  8. #8
    Thank you for the plugin.
    i tested it and first I saw nothing, second I discovered a huge thing a few meters away from the zero point, a position I normaly don't focus on my rhino screen. The thing (originally 150mm) was about one mile!
    As I dealed with the language setting problem today (see the other thread RhinoToGCode) I figured out the prob and how to solve it.
    If language setting is not "en-##" the script ignores the dots and reads 1234567 instead of 123.4567
    as the script is encrypted I have to run a script with setLocale("en-us") to change the lang. setting and not to forget to switch the setting back when doing something else on the pc.
    ist the 2. time I got confrontated with this odd lang. prob. -1. time was 2 days ago with the otherwayround-script to generate a GCode from drawing.
    All other progs I use seem to handle this, and I got used to type . instead of , when using rhino or doing anything with cnc.
    so what to do if you want tthat your plugin can be used worldwide? I am sure you can handle this , the only important thing is, if you solve this by changing the system lang. setting, to change it back after running the script whatever setting has been before.
    _________
    The script seems to run very well, but I just solved the lang. prob and am going to test it extensively

  9. #9
    Join Date
    Jul 2007
    Posts
    42
    I'm getting myself a little confused on the comma and period as decimal markers since you can apparently affect which rhino uses.

    I've decided to post this one, which it effectively just looks for any commas in real numbers and converts them to periods for numeric conversion from within the script. It worked fine on a test file, on a PC in the US... you'll have to try it in your environment.

    Same program, small change for comma's in the Euro's

    Kevin
    Attached Files Attached Files

  10. #10
    thank you, Ill try it at once.
    another request which concerns only me and the other 8% of men people being colorblind:
    The G0-Linie is drawn in a sort of lightening green, which, for my colorblind eyes, is nearly the same color to the highlighted yellow lines when selected . so i can hardly see which is selceted and which not.
    if I had access to the script I wouldnt have mentioned it but custumized it for me.
    If you are interested in this matter you can test pics for usability for colorblinds here: http://www.vischeck.com/vischeck/. On the pics attached you can see on the right one what I see.
    That was a little offtopic.

    I tested some gCode files with some garbage in it, things that occured in my files after manually working in it(and the mentioned script I used till yesterd. could not handle it)
    - Dots after numbers: e.g. X12.3. Y123 - no problem
    - too much brackets: e.g. (comment)) - no problem
    - case e.g. X3y2 - does not work!
    Attached Thumbnails Attached Thumbnails hats_norm_big.jpg   hats_deutan_big.jpg  

  11. #11
    Join Date
    Jul 2007
    Posts
    42
    :-) OK GARBAGE MAN.....

    I think I did "assume" the data would be "correct" ;-)


    so... NO decimal point, AND followed by another "GCode" (IE X, Y, blah blah blah), right???

    and, could you post some garbage for me to test with?

    Kevin

    EDIT
    ----------------------------------

    GOT IT!!! LOWER CASE!

  12. #12
    Join Date
    Jul 2007
    Posts
    42
    CASE and COMMA issues..................... FIXED...

    NEXT!!???

    woodwind.... THANKS for the input/feedback!

    Kevin
    Attached Files Attached Files

  13. #13
    I am sorry, it doesnot work, neither the 2. nor the 3rd version


    I mean the dot komma problem

    The case thing is fixed, thankyou

  14. #14
    Join Date
    Jul 2007
    Posts
    42
    I can see this problem can become very tedious.

    Whether WINDOWS is set for any conversion... whether RHINO is set for any conversion, whether the file is "DOT" or "COMMA"...

    To this point, all I did was effectively "REPLACE" any COMMA with a DOT, then submit it for processing as usual. In a USA configured computer, this worked fine.....

    I "assumed" that the Rhino/VBScript would "EXPECT" a DOT in conversion from from String to Real numbers, so I insured it would be fed DOT's.

    What is happening to you in a 123,456 becoming a 123456, is the marker is simply ignored, like I said, I fixed that to become a DOT... but now something else is in the SOUP!

  15. #15
    1. would be nice to have but
    i can handle this by running a short script

    Sub Main()
    SetLocale("en-us")
    End Sub
    2. if i , or in case of the encrypted plugin You, could set this into the script and at end of script back to "de" it would work for me (and for all other austrians, germans, and swiss)
    3. as said in the other thread "rhino to G-code "http://www.cnczone.com/forums/showth...d=1#post684193 I fixed this first time with replacing ( see the attached gcode2 file) and the second time with setLocale() see (mckennmod the adapted NC-CurveS)
    The setLocale() function is simple and works, but it would be nice, if the language will be set back to original, not to have some confusions .
    I figured out, that the lang. setting will switch back automatically if I close Rhino,

    I don't know how to read out the original language code to store it as dim and reset the lang. setting at end of script. but I think it must be possible.
    Attached Files Attached Files

  16. #16
    I think you can't test the dot comma thing by switching the lang setting in windows. I tried it and it didnt work, guess i should have rebooted the whole thing.
    On my pc I can switch with the mentioned setlocale() script.
    So I think, if you switch with this script to "de" you will get the same huge drawings as I, if you have enough numbers behind the dot.

    and here the announced attachements from last post
    Attached Files Attached Files

  17. #17
    Join Date
    Jul 2007
    Posts
    42
    This is the first that I am familiar with the SetLocal.... which without me reading up on the function, clearly implies the existence of GetLocal... So, I will "GetLocal", save it, SetLocal... run... and then SetLocal to saved Local...

    (reading up to inusre the implied assumption(s) are indeed correct, and will modify the script accordingly)

    Thank you sir!

  18. #18
    Join Date
    Jul 2007
    Posts
    42
    ... implied assumption of "SetLocale" mandates existence of "GetLocale" = TRUE! ;-)

    Script corrected!

    Dim localLocale: localLocale = GetLocale
    SetLocale(en-us)
    .
    .
    .
    SetLocale(localLocale)


    AND, now... even people in the US that get code with COMMA decimal markers will not have problems because I fixed it incorrectly the first time! ;-)
    Attached Files Attached Files

  19. #19
    i think you got it, but i can't run the plugin
    error: runtime error: "variable "en" nicht definiert"
    i think you typed "en" instead of "en-us"

  20. #20
    Join Date
    Jul 2007
    Posts
    42
    STRANGE... I did test run it, even looked at the value and it the value if en-us is "1033" (Integer). I RE-ran it after you posted the error and got the same error as you did.

    So I have hard coded the "Locale" as 1033, so it does not rely on the "en-us".
    Attached Files Attached Files

Page 1 of 2 12

Similar Threads

  1. Trouble with Galil plugin
    By cut more in forum Machines running Mach Software
    Replies: 17
    Last Post: 09-12-2018, 11:28 PM
  2. Shuttle Pro Plugin mod!!!
    By PoppaBear10 in forum Tormach Personal CNC Mill
    Replies: 1
    Last Post: 07-28-2009, 03:13 PM
  3. TurboCAD CAM plugin
    By Fluxion in forum Uncategorised CAM Discussion
    Replies: 10
    Last Post: 06-27-2009, 08:37 PM
  4. Can't get plugin to work
    By Genguy in forum Mach Wizards, Macros, & Addons
    Replies: 6
    Last Post: 01-18-2007, 08:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •