View Full Version : Problem Roller cam coding

10-21-2010, 06:50 AM
I'm not sure if this is the best place to ask, but...
I'm running diy 3 axis using ubuntu 8.04/EMC2, and I want to machine some nylon roller cams.
Does anyone know of an open source ( ie free !) piece of software that will help in simplifying the process of going from a specification to g-code ?
I'm aware of Inkscape's G-code tools, but I was thinking more along the lines of entering radius, and angle of start and finish, rather than drawing it out first, then having possible problems getting the path interpreted correctly.

Dan Falck
10-22-2010, 10:49 AM
Could you post a pic of what you are needing? I'm just curious.
I could have a go of it with HeeksCAD and the python scripting inside it and then show you how I would do it.


10-22-2010, 12:32 PM
Hi Dan.
I'm running this same query on linuxcnc forum, but I'm happy to see other ways it might be done.
At the moment I'm looking at a complete re-build, adding rollers to the levers, and making the cams out of 3mm nylon, but I'll post my cam shapes for a start.
I also added a photo of the current build laid out.
The right hand assembly turns over and drops onto the left group.
The solenoid pulls the pawl, which is mounted in line with the separator layer, the transparent section below.
The left hand group have 25 teeth/lobes, and the right hand set has 24, so that with one pulse every 6 seconds, it would take an hour for the stepping pattern to repeat.

Dan Falck
10-23-2010, 10:13 AM
Ok, I opened the dxf. It appears to be a closed profile made up of small line segments.
What approach are you taking to get this far?
What kind of approach would you like to try to automate the generation of these? Could a formula or algorithm be used?
Maybe define the rules needed for a functional part first- then come up with an algorithm/function for generating these lobes.
I could see setting up a function in python to generate radius' that are tangent to each other- with some randomness.

10-23-2010, 10:38 AM
Hi Dan, and thanks for your interest.
The project is to add a random eye movement to a large model chameleon that my daughter is building.
The idea is to use a single solenoid to drive two cams, each at a slightly different rate, and two followers on each to provide x and y movement. By crossing over the output from the two cams, I can acheive a pattern of movement that takes an hour to repeat on a 6 second pulse.
I was hoping that the script to do something like producing a cam profile from entering data into a table, rather than draw/convert to code, might already exist.
What you have suggested as an approach would certainly get to the end result, but as my current project hardly justifies adding the development time to the practical problems of the build that I'm already encountering, I'll leave it as an open suggestion that such a piece of software might be very handy for others.
Besides which, the present specification is "Daddy, make it work" ;)

Dan Falck
10-23-2010, 12:37 PM
"Daddy, make it work" ;)

Totally understandable. I have three kids myself and run into that one a lot.

My idea was to use HeeksPython - a python plugin for HeeksCAD that can actually draw geometry automatically. I have been writing additional functionality for it recently and can see that we could come up with something interesting.
I'll keep thinking about it. This type of project might be useful later on.


10-23-2010, 01:28 PM
With my lack of programming skills, that's more eeeks...python !

Please keep me posted.