Author Topic: Cambam plugin to support hot wire foam cutting  (Read 15884 times)

Offline bert

  • Ewok
  • *
  • Posts: 2
    • View Profile
Cambam plugin to support hot wire foam cutting
« on: January 09, 2008, 18:03:18 pm »
Hello all,

I just finished building a hybrid type of cnc-router/hot wire cutter.
This 5-motor CNC equipment in its hot-wire configuration has:
An x-axis along one side of the table, and in parallel, on the other side, an u-axis.
It also has an y-axis on one side, and a v-axis parallel on the other side.
(x,y) is where one side of the hot wire is attached, (u,v) where the other side of the hot wire is attached. (the lenght of the hot wire can vary from 70 to 140 cm, depending on the end's positions)
x,y,u,and v can move independently.
In the middle of the table is also a rotary table, driven by a c-rotary axis motor. This allows turning the workpiece during or in-between cutting.

The cnc-router can be configures, by placing an additional axis between the u and v axis.  The x and u axes are then slaved, and so are the y and v. This setup allows for a moving gantry over the table, with 2.5D capabilities.

Now the question:
I am trying to develop a plugin for the hot-wire cutting g-code generation.
The movement of the hot wire would be determined by two polylines in xyz space.
When I use Cambam functionality to convert the polyline to a point set, the point set DOES NOT follow the polyline in 3D.  The point-set more or less does not interpolate the z-coordinates in space.
I have the impression this is a BUG remaining in the conversion. Can anyone comment?

Question 2:
After some calculations, the movement of the hot wire is moddeled.
Now I need to generate G-code, with movement of 4 axes at tghe same time.
(as an example, I need to be able to generate something like:
g0 x0 y0 u0 v0
g1 x10 y13 u8 v26
Any idea how this would be possible, in the plugin, or somewhere else?

Thanks a lot for your support.

Greetings, and best whishes for 2008.

Offline 10bulls

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 2163
  • Coding Jedi
    • View Profile
Re: Cambam plugin to support hot wire foam cutting
« Reply #1 on: January 09, 2008, 23:07:25 pm »
Hello Bert,

This certainly sounds an interesting and ambitious project and I will try to help you as best I can.

Question 1.

I agree, the 3D polyline to point list routines should be improved to interpolate the Z values.
I will add this to the todo list.

Question 2.

While there are routines you could call to turn toolpaths to gcode, these are all limited to 3 axis.
I plan to experiment with some 4 axis routines soon, but this would be polar coordinate stuff and not entirely what you are after.

I have had a number of people asking for foam cutting functionality but I would have to say that specific routines would be a long way off.

However, it sounds like you are quite advanced in getting the maths of it sorted.  I may be able to help with the gcode generation.  The current gcode generation routines are getting a little old and I would like to review and rewrite them soon.  To make them easier to maintain and also more flexible with respect to some future machining operations I have planned.  In the process of this I will investigate ways of making the routines more flexible so they could be of use in a plugin such as you have described.

Offline bert

  • Ewok
  • *
  • Posts: 2
    • View Profile
Re: Cambam plugin to support hot wire foam cutting
« Reply #2 on: January 24, 2008, 10:23:53 am »
Hello 10bulls,
In attachment some of the things I did during last week.
In the .cs file, you basically can see the plugin code.
What it does is take a selection of 2 polylines, convert this into two synchronised sequences of line segments.  Then transform to physical coordinates, and write out Gcode to a file.
Some of the code is quite rudimentary, but before spending effort on beautifying, I prefer to get results.
You can check the plugin working on the example file included in the .zip.
You can also view the results from the results file, and the generated gcode.
With the generated code, the sound of the stepping motors is a symphony....
Now this is what a "real" implemetation should look like in my opinion:
1. Select two polylines.
2. Select a (to be defined) machine operation called "foamcut"
3. Fill in the transformation parameters in the MOP
4. Generate toolpath should generate the surface envelope in user coordinates.
5. Generate Gcode should generate the surface in machine coordinates, display it, and write Gcode to the selectable file.

I know you are quite busy those days, but any comments and suggestions on possible improvement, extension, and implementation would be most welcome.