Author Topic: [polyradius] A script that could be useful for some  (Read 45163 times)

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
[polyradius] A script that could be useful for some
« on: February 18, 2015, 13:54:16 pm »
I have not written, nor even considered yet to write this, but I thought I'd throw out the question for comments.

Yves has asked if there is a means (without a simulator) to determine if a particular cutter is small enough in radius to cut every curve in a particular selection "to the line".

I contended against the idea because not every polyline will even have curves, much less arcs of a given radius that are long enough to be useful to determine the tool radius stuff.

However, the simple fact remains that CamBam is able to calculate a toolpath, and show that toolpath, so there has to be a means within CamBam to check how close the toolpath gets to the polyline, itself.

The concept would be, "A script which points out places where the tool cannot follow the line, exactly."

Any ideas?

LLoyd
« Last Edit: July 11, 2016, 13:58:22 pm by dh42 »
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: A script that could be useful for some
« Reply #1 on: February 18, 2015, 14:39:18 pm »
So are you considering just Profiles or Pockets etc. too ?
Filmed in Supermarionation

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: A script that could be useful for some
« Reply #2 on: February 18, 2015, 14:50:58 pm »
Eddy,
I'd see it as useful on anything where a tool works to the inside of a corner or curved line, whether inside-profile, outside-profile, or pocketing.

The purpose, as wished by Yves, seems to be to determine what tool radius would precisely follow the line.

Of course, NO apex between straight lines will allow a round tool to follow precisely, but one could use a 'tolerance' figure to determine what is close enough.

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

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: A script that could be useful for some
« Reply #3 on: February 18, 2015, 15:38:43 pm »
I mentioned pockets because while a tool could maybe follow the inside profile as a polyline, it may not fit within the pocket.
Filmed in Supermarionation

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: A script that could be useful for some
« Reply #4 on: February 18, 2015, 15:58:48 pm »
Good point, Eddy.

I suppose there's no reason why such a routine couldn't 'solve' for that problem, as well.

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

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: A script that could be useful for some
« Reply #5 on: February 18, 2015, 16:29:14 pm »
There are Arcs and these have a radius, there are circles and these have diameters, these can be found as entities and checked against tool diameter. For polylines, I think it's the angle where they join that needs to be considered. How this works for those already 'joined' I don't know.
Filmed in Supermarionation

Offline nivagc

  • Ewok
  • *
  • Posts: 14
    • View Profile
Re: A script that could be useful for some
« Reply #6 on: February 18, 2015, 16:47:13 pm »
Hello Guys,

Not sure where this is going or if I've got the wrong end of the stick!

But surely when you have generated your tool paths which can be see around your profile (inside/outside) or pocket you would simply hit view/show cut widths?

You can see clearly where your tool "hits" and "misses"

At this point you can change the size of your tool diameter to see what fits where?

That's what I do!

Regards

Gavin

On writing scripts/plugins lloydsp, how about combing something like the arc text plugin and the curved surface generator.
I’m currently working on an engine side casing that I need to shape a small radius from the outside profile towards the centre for about an inch.
The only way I can see doing it at the moment is to pull my CB file and “3D it” in CAD (Cubify Design) Then bring it back to CB and then use 3D MOP
Can this be done? I think it would be very useful.

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: A script that could be useful for some
« Reply #7 on: February 18, 2015, 16:53:17 pm »
Well... I agree with that in concept.  It's one of the points raised in our initial discussions on the French CamBam forum: http://www.usinages.com/cambam/

However, I can also see that it could be "hit or miss" to rely on strictly visual checks with very complex shapes.  A lot could be 'missed'.

I think the thing wanted is a quick "go or no-go" check that would report not only IF the current size cutter would work, but perhaps the size cutter needed.

But I agree with the sense your question -- I'm not sure the amount of utility would be worth the effort to create such a routine.

That's why I've opened it up to discussion here.

In the past (and Yves, this is no criticism -- we're all here to help one-another), when someone has needed a script that few other people would find useful, that person has been the one who wrote it!

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

Offline nivagc

  • Ewok
  • *
  • Posts: 14
    • View Profile
Re: A script that could be useful for some
« Reply #8 on: February 18, 2015, 17:07:14 pm »
No problems I was just trying to get the right end of the stick.

I now see where your coming from with regards to complex shapes.

And yes a "report" of whether a cutter would be able to complete the job would be a good idea.


As for writing scripts/plugins I wouldn't have an idea where to start!

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: A script that could be useful for some
« Reply #9 on: February 18, 2015, 17:23:55 pm »
Well, as the Mad Hatter once commented -- "Start at the beginning.  And when you get to the end, STOP!"
<G>

Every journey, and every script, starts with one small step.

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

Offline macbob

  • Storm Trooper
  • ***
  • Posts: 189
    • View Profile
    • Bob Mackay
Re: A script that could be useful for some
« Reply #10 on: February 18, 2015, 21:39:28 pm »
If you made a second MOP, identical to the first but using a smaller cutter radius, then when you 'show toolpaths' for both MOPS and bounce on the Enable/Disable for the second MOP, the screen should not change!

Making the 'show toolpaths' use a different colour for each MOP would be even better, but I don't think you can.

Bob

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: A script that could be useful for some
« Reply #11 on: February 18, 2015, 21:47:29 pm »
OOOooo!  Bob!  That's a brilliant idea!

I already have the code to capture a bitmap of the screen.  With that, and a bit of bit-wise comparisons, one might be able to _at_least_ tell whether the current cutter did what was expected.

I'm still not sure how one could calculate a cutter diameter from that, but it's a start!

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

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: A script that could be useful for some
« Reply #12 on: February 18, 2015, 23:10:38 pm »
Hello,

Maybe not exactly so sophisticated, but here is a script that scan the selected polylines/polyrectangles and return the smallest arc found in each polyline.(by ID)

http://www.usinages.com/cambam/controle-avant-sortie-code-t74420-30.html#p833212

++
David

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: A script that could be useful for some
« Reply #13 on: February 18, 2015, 23:16:58 pm »
David ! Le problème que vous résolu!
Si le rayon minimum est connue, l'outil est connu !

------------
You solved it-- SIMPLY!  (applause!)
If you know the minimum radius, you know the tool.

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

Offline blowlamp

  • CNC Jedi
  • *****
  • Posts: 1192
    • View Profile
Re: A script that could be useful for some
« Reply #14 on: February 18, 2015, 23:27:15 pm »
Could a script be written that creates an array of perpendicular lines around the profile curve and notes their intersection points? The smallest diameter cutter would be that which has its intersection point closest to the profile curve.

Example file attached


Martin.