best way to get a complex curve (i.e., gear tooth involute) to g-code as precisely as possible?

Hello,

I run a script to create a bunch of points that define a fancy curve. I am bringing them into solidworks, drawing a spline to them, then exporting a drawing to dwg or dxf and using mastercam to generate the gcode. Preferably, I dont want to keep doing the step of hand-drawing a spline to fit each point, because I want to use a lot of points to define the curve precisely.

I was thinking that if I could get the script to export to a text file format that allows a spline to be defined, I could bring THAT file format directly into mastercam and generate the gcode from it.

Is there such a text file format that defines splines? I was thinking of using DWG but it isnt a text file, so I would have trouble getting the points into it.

Is there a better way to do this?

Thanks,

-Mike

Reply to
mike
Loading thread data ...

LISP?

Reply to
J. Nielsen

Yes.

Skip solidworks, get the points in mastercam (try an ascii file for importing points). Then create a spline automaticly by picking 1st, 2nd and last point. Avoid nurbs splines, make parametric ones. Choose a good enough tolerance in your contour toolpath and make sure filtering nc code is on. If posible turn on high speed machining in the control. You can even filter unwanted points in the spline if you want in mastercam.

DanP

Reply to
DanP

dxf is a text file with a very simple format. I would skip solidworks altogether. And the "lot of points" thing...rethink that one. More points doesn't always make a better curve.

Reply to
vinny

On Tue, 12 Aug 2008 02:11:41 -0700 (PDT), mike wrote:

=========== I would look into the many VBA and other add-ins for Solidworks. In most cases these will work with a comma delimited ascii file (.csv), which Excel and many other spread sheet programs can generate.

I have used the following lisp program to import airfoil curves into Autocad and Intellicad. Use tin and not ascpoint to invoke after loading.

I don't know if this will work with Solidworks, but it is someplace to start. Also some of the surveying programs may be adaptable as these plot contour/boundry lines from coordinate points.

============= ; hacked by G. McDuffee 3 Dec 02 and renamed TIN for Table Input ; ASCPOINT.LSP is a utility for use with AutoCAD Release 10 or

11, ; which reads coordinate data from ASCII files in CDF or SDF format, ; and generates AutoCAD geometry using the incoming coordinate data. ; ; The ASCPOINT command will read coordinate data from an ASCII file, ; and generate either a continuous string of LINES, a POLYLINE, a ; 3DPOLYline, multiple copies of a selected group of objects, or ; AutoCAD POINT entities. ; ; Format: ; ; Command: ASCPOINT ; File to read: MYFILE.TXT teeth 50) (setq teeth (getint "\nMust be no more than 50 teeth: "))) (while (< teeth 14) (setq teeth (getint "\nMust be at least 14 teeth: "))) (while (> teeth 50) (setq teeth (getint "\nMust be no more than 50 teeth: "))) ) (defun calgear () (setq d (* 2 (distance c pc))) (setq pc (polar c 0 (/ d 2))) (setq ang3 2.79248) (setq ang5 (/ 360.000000 teeth)) (setq wang -0.785385) (setq wang2 0.785385) (setq dp (/ teeth d)) (setq ht (/ 0.32 dp)) (setq adm (/ 1.0 dp)) (setq y (* (/ 2.257 dp) 1.0642)) ) (defun drawgear () (command "PLINE" (setq p (polar pc 0 adm)) "a" "ce" c "l" ht "l" (setq p (polar (getvar "lastpoint") ang3 y)) "a" "ce" c "l" ht "" ) (SETQ TOP (GETVAR "LASTPOINT")) (command "MIRROR" "L" "" (setq p (polar pc 0 adm)) c "n" ) (command "ARRAY" "w" (POLAR TOP 4.712389 (* Y 1.5)) (polar TOP 0 Y) "" "c" c ang5 "-360" "Y" ) ) (defun C:GEAR () (grinfo) (setq stdots (getvar "blipmode")) (setq stech (getvar "cmdecho")) (setvar "blipmode" 0) (setvar "cmdecho" 0) (calgear) (drawgear) (setvar "blipmode" stdots) (setvar "cmdecho" stech) ) xt-flag "se ==================== input after loading to run

Good luck, and let the group know how you make out and what you find as this is a common challenge.

Unka' George [George McDuffee]

------------------------------------------- He that will not apply new remedies, must expect new evils: for Time is the greatest innovator: and if Time, of course, alter things to the worse, and wisdom and counsel shall not alter them to the better, what shall be the end?

Francis Bacon (1561-1626), English philosopher, essayist, statesman. Essays, "Of Innovations" (1597-1625).

Reply to
F. George McDuffee

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.