kachurovskiy / lathecode

Text format for lathe parts and other objects with circular symmetry
MIT License
10 stars 3 forks source link

Ball end G-code generator - eliptic curve #4

Closed KyrreKnive closed 7 months ago

KyrreKnive commented 8 months ago

Hi Maxim,

I am trying to generate a ball end, but my input seems to generate an unevan curve on the left side. STOCK D10 TOOL ROUND R0.2 L1.5

L4 DS0 DE8 CONV

L3.464 DS8 DE4 CONV ; 3.464 is the legth from center where the diameter = 4 L4 D4

kachurovskiy commented 8 months ago

Did you mean RECT tool instead of ROUND?

First workaround is to define the full sphere but use the cutter that can't cut into the deep part e.g. parting blade:

image

Second workaround is draw the picture on figma.com with your exact dimensions (1px = 0.01mm) and use From image button.

KyrreKnive commented 8 months ago

Thank's for the workarounds! Can you post the calculation (program lines) for the curve /elipse function (L3.464 DS8 DE4 CONV ) ?

kachurovskiy commented 8 months ago

Can you post the calculation (program lines) for the curve /elipse function (L3.464 DS8 DE4 CONV ) ?

@KyrreKnive is https://github.com/kachurovskiy/lathecode/blob/main/src/planner/painter.ts#L86 what you're looking for?