Page 1 of 2 12 LastLast
Results 1 to 12 of 13

Thread: Using Rhinoscript to produce g-code

  1. #1
    Registered
    Join Date
    Jul 2009
    Location
    us
    Posts
    7
    Downloads
    0
    Uploads
    0

    Using Rhinoscript to produce g-code

    Hi,
    Wondering if anybody else is writing rhinoscript code. I've been able to take a curve in Rhino and produce g-code to machine it. I could post some simple code if anybody is interested. I use :
    Rhino.ConvertCurveToPolyline to convert curve ,
    Rhino.PolylineVertices to produce produce array of 3d points,
    Rhino.Pt2Str to convert to text,and add proper text to produce g-code.
    I use Scripting.FileSystemObject, to write the file.
    Working on a program to take gcode and simulate the results of the machining operation. I see no reason to buy any other plugins to do what I want to do. I love Rhino-3d.
    -Paul


  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,306
    Downloads
    0
    Uploads
    0
    There was a program here a few years ago that created code for 3D surfaces, if I remember correctly. You might be able to find it using the Google search for Rhinoscript.

    I create my g-code in AutoCAd using similar methods, and VBA.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Registered
    Join Date
    Jul 2009
    Location
    us
    Posts
    7
    Downloads
    0
    Uploads
    0
    that does sound like the same sort of thing, never understood the difference between VBA and VBscript, on which rhinoscript is based.


  4. #4
    Registered
    Join Date
    Aug 2009
    Location
    Canada
    Posts
    8
    Downloads
    0
    Uploads
    0
    Here is an older link with some script that generates g-code.
    here
    I know nothing about this stuff.
    Hope this helps though


  • #5
    Registered
    Join Date
    Jul 2007
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0
    Paul,

    I've been using/writing a Rhinoscript to essentially post *ANY* curve you can make in Rhino to GCode (and actually some Heidenhain too). Like everyone, I fantasize that the script/plugin is good enough to be marketable. I personally have used it to make many many many RELIABLE programs.

    At any rate, I have enough experince in this area to be able to help.

    Kevin


  • #6
    Registered
    Join Date
    Jul 2009
    Location
    us
    Posts
    7
    Downloads
    0
    Uploads
    0

    rhinoscript cnc

    Kevin:
    I've been able to convert curves to g-code as well. I'm not sure if you can make a commercial product in rhinoscript since people could just read the code and change it enough to make it their own. Have you done anything with vb.net or c# to run your scripts outside of rhino? seems like that would be the way to do it as it hard (for me at least so far) to build a good human interface in rhino script.
    -Paul


  • #7
    Registered
    Join Date
    Jul 2007
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0
    RhinoScript can be encrypted into a plugin. Code can be kept confidential.

    RE: the Rhino interface... I use the same method that the internal rhino commands use for options. It may not be (isn't) the sexiest method, "but" it is very "Rhino" like :-)


  • #8
    Registered
    Join Date
    Jul 2009
    Location
    us
    Posts
    7
    Downloads
    0
    Uploads
    0
    Thanks for the tip. Downloaded the trial version of rhino4 with the monkeyscript editor and compiler. I wasn't aware of these tools. I like the rhino interface, but I haven't figured out how to add command line options to scripts.


  • #9
    Registered
    Join Date
    Sep 2004
    Location
    Switzerland
    Posts
    264
    Downloads
    0
    Uploads
    0
    Basically, you need to just start asking the user for input via Rhino.GetString, then do something with the input in the script. You can present the user with command line choices of strings (options)... Have a look in the RhinoScript Help under User Interface methods. There is a limited amount of stuff you can do as far as UI, it is scripting, after all, you are not programming with C++... But it can be made reasonably user-friendly. You can also script all the regular the Rhino commands directly (with their own UI) by using Rhino.Command... --ch
    Last edited by chmillman; 10-21-2009 at 03:26 PM. Reason: clarity


  • #10
    Registered
    Join Date
    Jul 2007
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0
    phedd...

    did ya find any of the Rhino2Gcode (NcCurveS) stuff posted helpful/interesting?


  • #11
    Registered
    Join Date
    Jul 2009
    Location
    us
    Posts
    7
    Downloads
    0
    Uploads
    0

    NcCurves

    thanks for posting this program I can't say I understand it all, but it looks like you're using the same technique to write the g-code. My script produces just g0 and g1 instructions, which is all I need for my 3 axis router. I'm working on a program to take the g-code file. to simulate the the surface produced by the g-code with a v-bit , ball end or flat router bit.


  • #12
    Moderator
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    817
    Downloads
    0
    Uploads
    0
    I don't want to rain on anyone's parade, but having written my own programs for Rhino to do 3 and 5-axis drilling, and simultaneous 5-axis engraving, I think I'm qualified to make a comment or two on this subject.

    How much time are you willing to spend on this project, and what is your time worth to you? I have 6 years invested in my programs and if it wasn't for the fact that it surpasses what is commercially available (for our applications) I would have to question the sanity of it all. If you are looking to do standard milling, profiling etc. why not just buy madCAM and save all the aggravation? If you are thinking about making a product to sell, think about the demands on your time for supporting it.

    Just something to think about...take it or leave it.

    Dan
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Best way to produce small plastic parts?
      By denvermatt in forum Employment Opportunity
      Replies: 9
      Last Post: 02-26-2009, 07:18 AM
    2. Produce G-Code for you!
      By BulleTxMagneT in forum Employment Opportunity
      Replies: 2
      Last Post: 10-08-2008, 03:43 PM
    3. How should I mass produce a plastic ring?
      By bohojig in forum Moldmaking
      Replies: 7
      Last Post: 11-09-2007, 05:18 PM
    4. Did Russians (CCCP) produce cnc machine tools?
      By AKFALAR in forum General Metalwork Discussion
      Replies: 8
      Last Post: 09-28-2007, 01:38 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.