A selection of Mark's enamel work

Making a Watch Case · 13 of 21

Making a watch case (part11), cutting the ellipsoid into the top section

22 January 2018

Front section ellipse curve g-code
Tool paths for cutting the ellipsoid

To cut the ellipsoid shape into the top ring section I've programmed the ellipse in g-code so that the lathe table will follow this shape. The cut gets incrementally closer to the final cut. In the diagram, above, the solid white lines are the tool paths yet to be followed and the red ones are the paths already done.

On the final cut I increase the lathe spindle speed to give the finest finish.

I use linuxcnc to control the lathe, here's the g-code, it's very much a work in progress and needs tidying up a bit:

(sorry about this next bit taking up so much space, I'll sort out a container with scroll bars and improve the formatting a.s.a.p)

%

(for cutting the top watch dial approach)

(zero height is the top of the watch material, start_z, and the OUTSIDE edge is start_x)

(we assume the inside edge is already at #<front_glass_delta_tight_fit>)

(NB this is not the right routine to use for the back as you don't want a domed back just a curve to a flat)

(This routine differs from top_outside_curve.ngc by starting the curve near to where the cut will be saving lots of time)
;NB routines require that the exact distance is travelled so if not a whole number of increments

;this needs to be addressed
#<front_glass_delta_tight_fit> = 0.0        ;can use this to overshoot the edge to make sure we cover the material

#<front_glass_diameter>    = 42            ;diameter of the glass to go in the front of watch (or the diameter to stop the curve)

#<top_section_height>=5.3            ;height of top section

#<watch_diameter> = 46.9            ;diameter of the watch (sets parameter a)

#<front_glass_dome_height> = 5.5        ;found empirically from blender modelling (sets parameter c)

#<diameter_to_start_cut> = 41.44        ;don't always want to cut the whole ellipse full radius
#<start_z> = 0

#<safety_height> = 1

#<start_cut_extra> = 0.1    ;start a bit higher so first cut is not so nerve racking

#<clearance_r> = 2

#<increment> = 0.1   ;steps of 0.05 mm

#<curve_gen_increment> = -0.05 ;(negative to go from the finish of the formula backwards to the start so that we do more of the curve, from a greater depth each pass)

#<feedrate> = 50

#<start_r> = 0
#<shorten> = 0;1.4        ;to reduce the cut amount  by when twiddling about
#<n_miss> = 0

#<diff_ellipse_radius_and_start_radius> = [[#<watch_diameter>-#<diameter_to_start_cut>]/2]

#<param_a> = [#<watch_diameter>/2]

#<param_c> = #<front_glass_dome_height>

#<formula_start_r> = [#<watch_diameter>/2-#<diff_ellipse_radius_and_start_radius>]

#<formula_end_r> = [[#<front_glass_diameter>]/2 - #<front_glass_delta_tight_fit>]


;find the height of the ellipse at the end

O<elipse_fn> call [#<param_a>][#<param_c>][#<formula_end_r>]

#<depth_end_ellipse> = #<_elipse_height_collect>
;find the height of the ellipse at the start

O<elipse_fn> call [#<param_a>][#<param_c>][#<formula_start_r>]

#<depth_start_ellipse> = #<_elipse_height_collect>
( print, depth_start_elipse = #<depth_start_elipse> )

;the end z is the formulaic height at the end of the formula curve and we need to offset by this to make sure the formula curve is offset correctly

#<end_z> = [#<start_z> - #<depth_end_ellipse>]
#<top_section_curve_width> = [#<formula_start_r>-#<formula_end_r>]

#<amount_to_cut> = [#<top_section_curve_width>]; + #<start_cut_extra>-#<shorten>]

#<N_steps> = [#<amount_to_cut>/#<increment>]

( print, amount_to_cut = #<amount_to_cut> )

#<count> = 0


#<count> = #<n_miss>

O100 repeat [#<N_steps> - 1 -#<n_miss>]

    ;the cut use the values at the end of the formula and work backwards to the start (increments are negative)

    ;i.e. take starting positions, from the formula, from a progressively larger radius starting at the end

    #<loop_start_cut> = [#<count> * #<increment> + #<formula_end_r>]



    ;find the height of the ellipse at this point in the loop

    O<elipse_fn> call [#<param_a>][#<param_c>][#<loop_start_cut>]

    #<depth_start_ellipse_loop> = #<_elipse_height_collect>

    #<loop_z> = [#<start_z> - [#<depth_end_ellipse> -#<depth_start_ellipse_loop>]]
    g01 z[#<start_z> + #<safety_height>] f#<feedrate>

    g00 x[#<start_r> + #<clearance_r>]

    g00 z[#<loop_z>]

    g01 x#<start_r>

    O<do_elipse_fn> call [#<param_a>][#<param_c>][#<loop_start_cut>][#<formula_end_r>][#<curve_gen_increment>][#<end_z>][#<start_r>]

    #<count> = [#<count> + 1]

O100 endrepeat
g01 z[#<start_z> + #<safety_height>] f#<feedrate>
(msg, final cut)

M1 (stop here)

    #<loop_start_cut> = [#<count> * #<increment>+#<formula_end_r>]
    ;find the height of the ellipse at this point in the loop

    O<elipse_fn> call [#<param_a>][#<param_c>][#<loop_start_cut>]

    #<depth_start_ellipse_loop> = #<_elipse_height_collect>

    #<loop_z> = [#<start_z> - [#<depth_end_ellipse> -#<depth_start_ellipse_loop>]]
    g01 z[#<start_z> + #<safety_height>] f#<feedrate>

    g00 x[#<start_r> + #<clearance_r>]

    g00 z[#<loop_z>]

    g01 x#<start_r>

    O<do_elipse_fn> call [#<param_a>][#<param_c>][#<loop_start_cut>][#<formula_end_r>][#<curve_gen_increment>][#<end_z>][#<start_r>]
g01 z[#<start_z> + #<safety_height>] f#<feedrate>

%

As you can see in the code, I was undecided on the spelling of ellipse sometimes it's ellipse and other's it's elipse. When I found out is was two l's all my parameters and functions were with one!

Back in the physical world, I run the code and the cutter makes the cuts. I'm always a bit nervous running cnc code as the machine will blindly follow my programme. I stand alert adding cutting fluid when necessary and making sure I don't get any tool crashes

cutting the ellipsoid into the top ring section.

Here it is a bit later in the routine

Later in the routine for cutting the ellipsoid.

The ellipsoid is cut and I'm happy with the result

Ellipsoid is cut,

Top ring section seen from the side.

 

The work