Author Topic: Curved surface script  (Read 97204 times)

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Curved surface script
« on: June 12, 2014, 06:59:25 am »
I have developed a CamBam script (VBS) that will create a circular singular curved surface (in the vertical plane) - based on the sloping line script at http://www.cambam.info/ref/script.sloped-lines. So far it appears to work quite well.  It uses a similar set of parameters as the sloped line script:
  • A start point and an end point
  • A width, or 0 for a single cut
  • A depth of cut at the end point
  • There are options to create an Engrave MOP with some default parameters set, and a G-Code file if required.

The top of the curve is assumed to be a Z=0.  By using a ball mill and adjusting the step over distance rather smooth curved surfaces can be cut.

The script can be down loaded from the link below.

I would be interested in receiving suggestions for improvements or if any bugs are found.

thanks

Geoff

Note: The latest version (1.0.2)  of the CurvedSurface Plugin (described later) is also attached here.
New Version 2.0.3 now available for testing
New version 2.0.4 now available
« Last Edit: July 23, 2020, 08:31:05 am by GeoffreyGRoy »

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1826
    • View Profile
Re: Curved surface script
« Reply #1 on: June 12, 2014, 12:47:12 pm »
Well done Geoff,  Works as advertised.
Dave.

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1463
    • View Profile
Re: Curved surface script
« Reply #2 on: June 12, 2014, 21:33:40 pm »
Geoff,
Very nice. How about a  version to do this kind of part.  This is an 13.5" diameter flange that is being cut to fit against a 120" diameter tank.  I also cut one to go inside.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: Curved surface script
« Reply #3 on: June 12, 2014, 21:50:16 pm »
Gary,
Unless there's some sort of distortion in the photo, that looks like the inside one...???

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Re: Sperical surface script
« Reply #4 on: June 12, 2014, 23:59:53 pm »
I have also created a script to generate spherical surfaces with the top of the sphere at Z=0, and a specified depth at a given radius.  If this is also of interest then it can be downloaded from the link below:


It uses a similar set of parameters as the curved surface script.

Again comments and bugs are appreciated.  Note that V1.00 did have some minor bugs.

Geoff
« Last Edit: June 14, 2014, 08:30:16 am by GeoffreyGRoy »

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: Curved surface script
« Reply #5 on: June 13, 2014, 11:05:37 am »
Very nice. How about a  version to do this kind of part.  This is an 13.5" diameter flange that is being cut to fit against a 120" diameter tank.  I also cut one to go inside.
-----------------

Gary, one other word about that.

His script already does that kind of part -- in a sense.  It creates half of the surface on which to map your other features.  You can mirror the surface he creates, and it becomes a barrel-shaped surface like you want.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1463
    • View Profile
Re: Curved surface script
« Reply #6 on: June 13, 2014, 20:09:35 pm »
Gary,
Unless there's some sort of distortion in the photo, that looks like the inside one...???

Lloyd

Lloyd,
You are right. I took the photo to show an engineer at my previous employer that I could do these on my home built machine.  We used to send these out to get done in different size flanges and different radiuses all the time.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1463
    • View Profile
Re: Sperical surface script
« Reply #7 on: June 13, 2014, 20:16:42 pm »
I have also created a script to generate spherical surfaces with the top of the sphere at Z=0, and a specified depth at a given radius.  If this is also of interest then it can be downloaded from:

http://www.cadplan.com.au/blog/index.php?entry=Creating-Spherical-Surfaces-with-CamBam

It uses a similar set of parameters as the curved surface script.

Again comments and bugs are appreciated.

Geoff

Geoff,
Can it do a spherical pocket?  I have a job to do with 12 spherical pockets for a bearing ball to sit in to build a 3D Delta style printer.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1463
    • View Profile
Re: Curved surface script
« Reply #8 on: June 13, 2014, 20:22:18 pm »
Very nice. How about a  version to do this kind of part.  This is an 13.5" diameter flange that is being cut to fit against a 120" diameter tank.  I also cut one to go inside.
-----------------

Gary, one other word about that.

His script already does that kind of part -- in a sense.  It creates half of the surface on which to map your other features.  You can mirror the surface he creates, and it becomes a barrel-shaped surface like you want.

Lloyd
Sounds good Lloyd, I'll have to try that.

You know back in the 80s and 90s I did quite a bit of programming. I still do PLC programming and watching you guys here makes me want to give it a try again. As soon as I stop working 60 hours a week.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: Curved surface script
« Reply #9 on: June 13, 2014, 20:48:05 pm »

Gary,
You wouldn't have to modify the program.  Just create one of his "half barrel" shapes, then use CB to reflect it and join it to the other half.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4484
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Curved surface script
« Reply #10 on: June 13, 2014, 22:44:07 pm »
You know CB can already extrude a surface from a polyline right?  Then you can rotate it and position it as needed.  Am I missing something? 

Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: Curved surface script
« Reply #11 on: June 13, 2014, 23:04:07 pm »
No, Bob.  You're right.  This just makes it more 'natural', and in fewer steps (with subsequent necessary confirmations).

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Re: Curved surface scripts
« Reply #12 on: June 15, 2014, 07:25:19 am »
Following the comments and some further testing I can now release three scripts for constructing 3D circular surfaces, two updated ones and one new one.  In each case some bugs have been fixed, and in particular a facility has been added to specify a stepover for roughing and a stepover for finishing.  This can reduce cut times significantly while not compromising finish quality.  Also, it is now possible to produce a finish cut only allowing for a separate cut for roughing, either using the same script, or some other strategy.

More details can be found on my web site at http://www.cadplan.com.au

Comments and feed back most welcome.

Geoff

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: Curved surface script
« Reply #13 on: June 15, 2014, 11:11:05 am »
Geoff,

Thanks!  That's good stuff.  I have a customer project with a need for the spherical pocket script coming up next month.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Re: Curved surface script
« Reply #14 on: June 22, 2014, 00:23:56 am »
I have now added another script to my small collection -to create a curved pocket using the same approach as the others.  In this case the curve is like a horizontal cylinder pocket by specifying:
  • The depth at the centre line
  • The distance from the centre line to the edge (i.e. half the length)
  • The width of the cut of the cylinder shape  

Please advise if any bugs are found.

Geoff
« Last Edit: June 22, 2014, 01:39:52 am by GeoffreyGRoy »