Script to generate tool path info for manual machining

Next
 From:  Larry Fahnoe (FAHNOE)
9885.1 
The other day I had to mill some arcs in a part I was making and this spawned the idea for an MoI script: if I added some circles to my model, could I then easily get and export the locations of the centers of those circles? If so, I would have the X,Y coordinates of the holes I needed to cut to interpolate the arcs I wanted to mill. This would also be applicable to a bolt-hole circle pattern if one didn't have a DRO with such a function. I believe that this will only work with MoI v4 and later due to use of properties introduced in v4.

Perhaps a future version of the script will generate leaders or annotations with the coordinates, but this is workable for now.

Basic function:

Export coordinates of center points for selected circles to a text file. Intended as an alternative to computing tool offsets for manual machining operations. Examples: interpolating curves, bolt circles.

Usage:

First add circles and/or arcs representing cuts by the tool to be used then run this script. Script begins with setting the CPlane to correspond to the origin point of the part on the machine. Locations will be listed in the order selected, so select the circles or arcs in the order they would be cut. Conditionally adds origin and center points.

Based on SavePointFile

As this is my first script effort for MoI, it prompts me to reflect upon what Michael has created. It is one thing to create a complex tool that is elegant in its simplicity, but really quite another to also provide a programming environment to extend its functionality. Well done sir!

Added a minor modification to the CenterPoints script to check the MoI version.

For a much simplified version of this script, see http://moi3d.com/forum/index.php?webtag=MOI&msg=9916.22

--Larry

EDITED: 6 Jul 2021 by FAHNOE

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9885.2 In reply to 9885.1 
That's awesome Larry, I'm glad that MoI is being useful for you!

Really the programming environment is kind of a side effect - it's helpful for MoI's own development to have a malleable environment to work with.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Larry Fahnoe (FAHNOE)
9885.3 In reply to 9885.2 
An example of the use of this script. First I created a dimensioned drawing of the part I wanted to make, but noted that dimensions alone are not very helpful when it comes to cutting the rounded sides of the opening using a manual milling machine:



So I added circles to represent the 3/8" end mill I would use to cut an interpolation of the rounded sides:



After running the script (& selecting the option to create points for illustration), points for the part origin on the mill and center points of the cuts are shown:



The resulting coordinates for the cuts to be made, exported to a text file:

0.825,0.660
0.959,0.581
1.105,0.522
1.257,0.487
1.412,0.475
1.568,0.487
1.720,0.522
1.866,0.581
2.000,0.660
2.000,2.340
1.866,2.419
1.720,2.478
1.568,2.513
1.413,2.525
1.257,2.513
1.105,2.478
0.959,2.419
0.825,2.340

The coordinates made it easy to cut the rounded sides which will then be cleaned up with a file:



--Larry

EDITED: 16 Jul 2020 by FAHNOE


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Larry Fahnoe (FAHNOE)
9885.4 In reply to 9885.2 
> Really the programming environment is kind of a side effect - it's helpful for MoI's own development to have a malleable environment to work with.

Richard Stallman might have said something like that in response to a compliment on Emacs, but look at how integral the programming environment is to Emacs, and hence what Emacs has become (& spawned)! No, you've created something remarkable & it is a pleasure to use.

--Larry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  ed (EDDYF)
9885.5 In reply to 9885.1 
Hi Larry -

Good to see a fellow machinist on the forum.

You can bypass the effort of placing the circles with this method:

Use the Offset tool to create a new curve that is offset (either inside or outside as required) 1/2 the diameter of the endmill.

Run Max's PointsOnCurve script available here:
http://moi.maxsm.net/files/

The script allows you to pick the distance between points and copy their coordinates to the clipboard. You even have the option to not place points on straight lines.

I assume the script could be edited to show an extra decimal place so you have one-thou resolution.

Ed Ferguson

EDITED: 16 Jul 2020 by EDDYF

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Larry Fahnoe (FAHNOE)
9885.6 In reply to 9885.5 
Hi Ed,

Thanks much for the suggestion and illustrating the alternative approach! Simpler is often better, but the exercise was certainly worthwhile to learn something about writing a script for MoI.

--Larry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All