Grasshopper

algorithmic modeling for Rhino

Hi all,

I have been consolidating ideas on making a CAM plugin for GH. This is due to the fact that more and more RH/GH people are working with a CNC router, with a plugin that adds the ability to parametric create 2D or 3D cuts are definitely helpful.

I'm still at the stage of drafting the goal and audience description for the plugin. and the next stage is to programme it. I don't have all necessary skills yet but will try, hopefully someone will join the team.

Goal (Draft)

A plugin that is easy enough for most GH users to use. It aims at creating toolpaths in a parametric way, allowing reuse of definition settings, quick design change, and able to process large batch of information without error.

Audience (Draft)

  • GH users who designed structures in GH, own or work closely with a CNC machine.
  • CNC machine owners who need a easy to use and reliable CAM package. Esp handling large batch of cuttings.

Functions - Toolpaths

  • 2D , 2.5D Curve following - with multi-level 
  • Drilling, Drilling cycles
  • 2.5D Profiling - with multi-level 
  • 2.5D Pocketing (Next Stage)
  • 2.5D Facing (Next Stage)
  • 3D Roughing (Next Next Stage)
  • 3D Sweeping (Next Next Stage)

Functions - Outputs

  • Direct NC File Generation (Easy to use header and footer info)
  • Multiple possibilities for postprocessor (Cater different machines)
  • Toolpath optimization for unorganized input
  • Support multiple tools (works with ATC machine)
  • Per toolpath based control for lead-in, lead-out methods, feed rates
  • Per toolpath based definition of cutters.
  • Combine multiple tool paths in NC file.
  • Handles data trees of input

Implementation

Geometry engine will rely on Rhino SDK (Offsets, Transformations, 3D)

Most logic can be written in VB.net (I'll test write as custom VB component)

Package distributed as a plugin (I don't know how to do that at the moment)

---- On going edits to the post as ideas unfold ----

Todo List

  • Make an action plan on mile stones for the software development
  • Make a list of the required programmers role and who to fulfill it.
  • Start UI / logic design, create dummy scenario (usage case study) for brainstorming.
  • Discuss and decide on whether Open Source or not
  • Study and compare existing CAM software on market. (eg:MasterCAM, RhinoCAM, V-Carve Pro,MadCAM)
  • Study other plugins and look for potential to collaborate or integrate and to clearer define this project's stance. (eg:Beaver,Lobster,CAMel)

Views: 11427

Replies to This Discussion

I can help you with this and that, as I'am interested in developing a simple 3d cnc plugin too. I have a 2x1,5m 3d cnc cutter, so I can say I know the basic problems with generating the paths. I know vb.net a little, and I'am familiar with making gha files.

The main problem is to keep it clear (I mean the code) - at this moment I imagine making a class "generator" which will have some methods and properties enabling it to work with multiple data types. On the other hand "generator" component would have a lot of inputs - this won't make the component user-friendly. One strategy says (vide Kangaroo) to get some smaller components which would be connected to "generator"... but it would be nice to think if it's the right idea to do the same with G-code....

Hi Mateusz,

I am glad to hear from you. Thank you for your comment on the design of the logic. I'm equally concerned with the cleanliness of the UI, which is fairly important for beginners to be able to pick up. I have the Kangaroo model in mind too, just need to add an extra way to specify the sequence of tool paths. But lets keep it open at the moment for other ideas too.

I'll make an action plan in a few days, gather my thoughts and see how best to start. I have been programming VB.net components for a few years already, I don't know how to do the gha part, but I can try pick it up. I never written programme with anyone else or participated in a multi-developer scenario, which might need more of your help if possible. I have pretty good coding conduct to write comments and organise,I can handle custom class too.

Lets see how it goes. I have a full time job, so I'm afraid the whole coding exercise will take some time.

The formal question is : is this gha should be freeware or open source ?

EDIT :

Functions - Outputs

  • Handles data trees of input

That would be nice concept for generating multiple files with one setup at once.

Hi Mateusz,

I am leaning onto the side of open source development, mainly on the values and philosophy of it. It seems to provide more room for collaborative development and more flexibility for future growth. I can imagine a Open Source Development as a platform where codes can still continue to grow even if the initial programmers all left the development.

But to be honest, I don't think I know enough about the difference between them to decide. I'm open for discussion, someone must have more insights on this.

Hi Victor,

I've recently updated Lobster, and was looking at maybe releasing a new version, perhaps there's some potential to integrate.

Personally I find it clearest to work with lists of Grasshopper Plane objects as the primary way of passing positions/orientations around the canvas. The built in tools for generating and manipulating them are good, and they clearly and unambiguously specify orientation. They do have one more degree of freedom than used for 5-axis machining, but this can simply be ignored when not needed, and having it there means one can use the same tools for 6 axis robots.

For Lobster I've now written separate Inverse and Forward Kinematics components, and some general geometric tools, such as orientation interpolation, and conversions for various ways of specifying rotations - Euler angles / RPY, quaternions, Axis-Angle, transformation matrices etc.

Keeping everything language/brand neutral and purely geometrical as far as possible seems like it would maximize the common usefulness, then there can be options at the end for generating the necessary syntax for specific tools - whether that is G-Code, RAPID for ABB robots, KRL for Kuka, Staubli, UR, etc etc...

Seems to me that a completely open-source cross-brand CAM/Robotics solution could be something many people might be interested in developing and using.

Hi Daniel,

Thank you for showing interest. It is amazing to see all your contribution in the community so long. I have been amazed by Lobster too, but to be honest, I know how complex reverse kinematics is, but I actually know very little about it. I have never worked with anything more then a 4 axis, nor I have access to it, so I honest don't know how the maths and the codes work.

I generally work with 3 axis milling using CATIA's machining workbench, so I do have some background on what a proper CAM software might have or may feature. Which I think some are very useful but omitted in major CAM software.

Thank you for your tip on using the planes to pass positions, it is a nice idea that help keep future possibilities to 5/6 axis open. Thank you very much. On the possibility of integration, I like the idea, but I don't know how can this be done. I'll study your Lobster again and I'll see what is possible. Please advice too. It would be nice if works are not repeatedly done.

I like your vision to keep the code generation "brand neutral", which I complete agrees.  I have similar thoughts in mind too.

Hi Daniel,

  I love your idea here, and I hope it all comes together.  I wish I could offer some support with coding, but I'm afraid I wouldn't offer a whole lot!  I am more than willing to test it out as it comes along.  Bridging the gap between traditional CAM software and methodology with modern CAD, particularly Grasshopper is something that the fabrication community needs in a big way.  It has been interesting to see the development of 3d printing tools occur largely independent of the traditional CNC community, and the UI results have demonstrated so far what can be done to make all of this more accessible, powerful and fun to use.  I have a 3 axis router that I built and continue to modify, and it is always depressing to have to use a CAM program to generate my gcode.  CAM programs (I mostly use Mastercam) do what they need to do and are quite useful, but they are fundamentally different in their operation than CAD programs in that they are merely the lastest incremental improvement of whatever the original CAM program was many moons ago.  Because of that, they are not a lot of fun to use unfortunately.  I remember trying RhinoCam a few years back, thinking that it would be more seamless to use because it was integrated into Rhino, but I was not impressed at all!  I for one am very much looking forward to what you come up with. 

I've tested rhinoCAM too, but I don't get what you don't like about it... Do you have any particular idea ? That would be a good point here to get some ideas for this development, making it more fun to use...

It was a while back, but I just found it counterintuitive, as most CAM programs seem to be in their own way.  I know a lot of people really like it, and I'm certainly not averse to trying it again, but I am proficient with Mastercam, which is more or less an industry standard, so that's what I use.  I would jump at the opportunity to have something that is elegent and integrated with GH and Rhino though.

Daniel,

Sorry to jump on an old message. I've been searching for something to calculate Euler angles though, and this post is one of the few to turn up. These conversion components you mention - are they in Lobster? The ghx file I got from your Lobster page didn't seem to have them, but maybe I'm missing something? I think I can figure out the math, but I thought I'd see if someone else had already done my work for me. Thanks!


Trygve

I think it would also be interesting to think about building the CAM controller into Grasshopper.  I currently use MACH3 because it is dirt cheap but I hate it.  It would be so nice to design, create tool paths, and drive the machine all from the same interface.  Might allow for realtime generation and execution of tool paths.  This could lead to potential disasters but it'd be fun to control the machine with a few sliders.  

http://www.grasshopper3d.com/video/gcode-writer-for-surface

personally I would be super cautious to have grasshopper control my cnc, Mach 3 have its problem but it is very well tested.

yarek,

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service