LibLathe - Lathe Path Generation

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
roncr
Posts: 4
Joined: Wed Apr 14, 2021 10:40 pm

Re: LibLathe - Lathe Path Generation

Post by roncr »

Hello Dan,

can you tell me where the current version of it is? (and is there a write up on how to install the add on?)

thanks,

Ron
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: LibLathe - Lathe Path Generation

Post by RatonLaveur »

Hello sir, all the links you need are in the original post.

The github link will get you all the files you need: LibLathe: https://github.com/dubstar-04/LibLathe
roncr
Posts: 4
Joined: Wed Apr 14, 2021 10:40 pm

Re: LibLathe - Lathe Path Generation

Post by roncr »

thanks!!
roncr
Posts: 4
Joined: Wed Apr 14, 2021 10:40 pm

Re: LibLathe - Lathe Path Generation

Post by roncr »

Hello,

I used a new disk with a fresh install of ubuntu 20.04, and cloned the git.

I did browse through it for a while, but have no idea how to set it up?

Is there a write up for installing it as an add-on?

(not trying to be a pain here) thanks,

Ron
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: LibLathe - Lathe Path Generation

Post by dubstar-04 »

roncr wrote: Tue Apr 20, 2021 12:50 am Hello,

I used a new disk with a fresh install of ubuntu 20.04, and cloned the git.

I did browse through it for a while, but have no idea how to set it up?

Is there a write up for installing it as an add-on?

(not trying to be a pain here) thanks,

Ron
Hi Ron,

The instructions are on the git page:

https://github.com/dubstar-04/FreeCAD_Turning_Addon

Thanks,

Dan
MechaSteve
Posts: 2
Joined: Sat May 15, 2021 6:11 pm

Re: LibLathe - Lathe Path Generation

Post by MechaSteve »

I'm having some trouble getting everything to work, but I am very excited by what I can get so far!

For tools: are the tools included with LibLathe usable in the current version?

Also, for tool definitions: It looks like there is some confusion in the libraries about edge length vs Inscribed Circle Diameter.
Quick trick to convert between the two (for parallelogram inserts):
Edge Length = ( tan( Tip_Angle) + atan( Tip_Angle) * Inscribed_Diameter

The above formula should allow for arbitrary definitions of S, C, D, and V shape inserts.
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: LibLathe - Lathe Path Generation

Post by dubstar-04 »

MechaSteve wrote: Sat May 15, 2021 6:22 pm I'm having some trouble getting everything to work, but I am very excited by what I can get so far!

For tools: are the tools included with LibLathe usable in the current version?

Also, for tool definitions: It looks like there is some confusion in the libraries about edge length vs Inscribed Circle Diameter.
Quick trick to convert between the two (for parallelogram inserts):
Edge Length = ( tan( Tip_Angle) + atan( Tip_Angle) * Inscribed_Diameter

The above formula should allow for arbitrary definitions of S, C, D, and V shape inserts.
Hi Steve,

I don't think the liblathe tools will currently work with FreeCAD due to some issues with relative paths in the toolbit library.

Do you have any examples of what makes you think there is confusion with the edge length definition?

The tool parameters are partially documented here:

https://liblathe.readthedocs.io/en/late ... oling.html

With the edge length value coming from the ISO definition.

The ANSI definition uses the IC. Maybe that's the confusion?

https://littlemachineshop.com/info/insert_charts.php

Thanks,

Dan
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: LibLathe - Lathe Path Generation

Post by MRx »

Hi,

I just tried the addon (not very successful actually).

Code: Select all

Running the Python command 'Path_TurnProfile' failed:
Traceback (most recent call last):
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/Path/PathScripts/PathOpGui.py", line 1319, in Activated
    return Create(self.res)
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/Path/PathScripts/PathOpGui.py", line 1283, in Create
    obj = res.objFactory(res.name)
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/FreeCAD_Turning_Addon/PathTurnScripts/PathTurnProfile.py", line 89, in Create
    obj.Proxy = ObjectTurnProfile(obj, name)
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/Path/PathScripts/PathOp.py", line 193, in __init__
    job = self.setDefaultValues(obj)
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/Path/PathScripts/PathOp.py", line 338, in setDefaultValues
    obj.OpToolDiameter = obj.ToolController.Tool.Diameter

'FeaturePython' object has no attribute 'Diameter'Running the Python command 'Path_TurnProfile' failed:
Traceback (most recent call last):
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/Path/PathScripts/PathOpGui.py", line 1319, in Activated
    return Create(self.res)
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/Path/PathScripts/PathOpGui.py", line 1283, in Create
    obj = res.objFactory(res.name)
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/FreeCAD_Turning_Addon/PathTurnScripts/PathTurnProfile.py", line 89, in Create
    obj.Proxy = ObjectTurnProfile(obj, name)
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/Path/PathScripts/PathOp.py", line 193, in __init__
    job = self.setDefaultValues(obj)
  File "/Applications/FreeCAD 2.app/Contents/Resources/Mod/Path/PathScripts/PathOp.py", line 338, in setDefaultValues
    obj.OpToolDiameter = obj.ToolController.Tool.Diameter

'FeaturePython' object has no attribute 'Diameter'
Also the tool library is not very clear to me, if I change to the LibLathe Tools I get following list:
liblathe.png
liblathe.png (35.77 KiB) Viewed 3126 times
If I create an S Shape insert bit and try to add it I get:
02:54:36 PathToolBit.ERROR: Did not find a PropertyBag in Iso_shape_S - not a ToolBit shape?

I also added the "sample" project, does anyone know where I'm heading into the wrong direction?
Attachments
FCLatheTest.FCStd
(26.06 KiB) Downloaded 75 times
kjpx
Posts: 1
Joined: Fri May 21, 2021 11:56 am

Re: LibLathe - Lathe Path Generation

Post by kjpx »

Hi dubstar,

thank you for your great liblathe extension 8-)

I made some testing with the current freecad 0.19 and got it running after modifying the provided toolshapes Iso_shape_C/D/S/T.fcstd to meet the current property-bag-requirements. Now I would like to start to with some more work with your turning-jobs.

Would you please help me with the model and toolshape files from your presented example ?
MechaSteve
Posts: 2
Joined: Sat May 15, 2021 6:11 pm

Re: LibLathe - Lathe Path Generation

Post by MechaSteve »

dubstar-04 wrote: Thu May 20, 2021 7:19 am Do you have any examples of what makes you think there is confusion with the edge length definition?

The tool parameters are partially documented here:

https://liblathe.readthedocs.io/en/late ... oling.html

With the edge length value coming from the ISO definition.

The ANSI definition uses the IC. Maybe that's the confusion?
In tool.py the function "get_edge_length(shape, edge_length)" appears to return inscribed circle diameter, not edge length.
( This is what table 5 shows in the referenced Mitsubishi document)

Also in the tool shape files, the edge length dimension seems to be the inscribed circle, not the edge length.
The edge length should be the length of the complete edge (fully sharp with no tip radius).

It should also be noted that for many common ISO sizes the edge length is only nominal and not exact.
For example: the ISO insert size VCGT110302 has an actual edge length of 11.07mm

The actual fundamental definition of inserts is generally inscribed circle, tip angle, and tip radius.
Thickness should never matter for path generation. (you could have a check for inside turning, but it really requires tool geometry as well.)

The tools center point will typically be set as the diametral contact point of the tool.
For the axial position it will depend on if the tool is Left, Right, or (effectively neutral).
For Left and right it is the axial contact point.
Neutral tools are difficult to set exact axial position, but are typically set at the diametral contact point.

I think the trick is to calculate the path in terms of tip radius center, and then off set to the actual center point.
A tool definition needs to provide:
- Maximum right cutting angle (traveling towards chuck)
- Maximum left cutting angle (traveling away from chuck)
- Tip radius

Outside of deep grooving, the tool can be treated as semi-infinite.
Post Reply