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

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8659
    • View Profile
Re: A script that could be useful for some
« Reply #15 on: February 18, 2015, 23:38:54 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.
----------------------------------
OH HO!  I MUST laugh!  MUST!  Martin, you and I think much alike!

This was my very FIRST recommendation, as seeming to me to be infallible! ( But it was not much liked!

<G>
On February 5, 2015:
"It is most often "coincidence" that leads us to the happy solutions .

In my last script " oblique hole " is a piece of code that can be used to examine the matter.

In this document , many small lines are formed perpendicular to the line to be machined, and each of a length equal to the radius of the tool.

If none of these perpendicular lines intersect, then the line is precision machined . If one of the perpendicular lines has intersections with other perpendicular lines , it is known that the cutting tool can not reach the inside of the curve .

It is strange how such things happen when they are needed."

<G>
Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1612
    • View Profile
Re: A script that could be useful for some
« Reply #16 on: February 19, 2015, 00:11:17 am »
The direction of open polylines needs to be factored into the problem since "outside" arcs of any size can be cut with a tool.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6932
    • View Profile
    • Cambam V1.0 French Doc
Re: A script that could be useful for some
« Reply #17 on: February 19, 2015, 00:15:49 am »
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

Not exactly ; we can have a arc radius smaller than the tool if the tool is on the external side of the arc ; with this script, we know only the radius of the smallest arc in the polyline, we don't know on what side the tool goes.

++
David

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8659
    • View Profile
Re: A script that could be useful for some
« Reply #18 on: February 19, 2015, 00:51:16 am »
Sure, but that part should be simple!  You did the basic work.

Besides, I think Yves's basic problem was when cutting inside a closed line. <G>


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

Online blowlamp

  • CNC Jedi
  • *****
  • Posts: 1189
    • View Profile
Re: A script that could be useful for some
« Reply #19 on: February 19, 2015, 01:04:06 am »
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




Not exactly ; we can have a arc radius smaller than the tool if the tool is on the external side of the arc ; with this script, we know only the radius of the smallest arc in the polyline, we don't know on what side the tool goes.

++
David



I don't think it would work as intended with 'arcs' made up of polylines or splines.
Islands might be another problem area too.


Martin

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8659
    • View Profile
Re: A script that could be useful for some
« Reply #20 on: February 19, 2015, 01:12:56 am »
Martin,
I always intended to ask you, and never did:

Do you use a blow lamp in your work?  I had two, a benzine type and an alcohol version, but now only the alcohol 'torch'.

I really rarely clean it and burn it, but it's still nice to see it work.  It can be useful for soldering, although propane is so much more convenient.

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

Online blowlamp

  • CNC Jedi
  • *****
  • Posts: 1189
    • View Profile
Re: A script that could be useful for some
« Reply #21 on: February 19, 2015, 11:50:15 am »
Martin,
I always intended to ask you, and never did:

Do you use a blow lamp in your work?  I had two, a benzine type and an alcohol version, but now only the alcohol 'torch'.

I really rarely clean it and burn it, but it's still nice to see it work.  It can be useful for soldering, although propane is so much more convenient.

LLoyd

LLoyd.
I don't use a blowlamp very often - mainly for plumbing and other soldering jobs really.

As a kid, my dad had an old paraffin 'lamp which I occasionally used to 'fire up' for fun, which I seem to remember consisted of setting fire to a paraffin soaked rag wrapped around its body & burner assembly to 'get it warmed up' before inevitable ignition took place.  ;D

How did we manage before the days of health and safety?

My nickname here just happened to be what popped into my head at registration time I think, certainly nothing more interesting than that.

Good coincidence on the perpendicular lines post though.
Incidentally, if you're ever struggling to fit a radius blend onto a 3d CAD model, it can sometimes be a useful technique to run some perpendicular lines around the awkward profile to gauge what radius of blend (if any) will fit.



Martin.
« Last Edit: February 19, 2015, 11:56:29 am by blowlamp »

Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1612
    • View Profile
Re: A script that could be useful for some
« Reply #22 on: February 19, 2015, 14:17:12 pm »
Blowlamp/blowtorch was useful in the kitchen for creme brulee in the old days.  Chefs probably use propane these days.

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5083
  • Made in England
    • View Profile
Re: A script that could be useful for some
« Reply #23 on: February 19, 2015, 14:21:26 pm »
If you have a shape drawn and you use a profile mop with a tool diameter of zero, then with diagnostic level set to 4 CamBam will give you the length of the shape perimeter when you calculate toolpaths ( call it Y)
If you then select a tool of say diameter 1 and calculate toolpaths again the number will be different (call it X). So if you imagine a ball of diameter 1, where it's centre has traveled a path of length X then by calculation if it fits around the shape, the distance travelled by it's periphery will be the same as Y. If there is a difference then the tool will not fit.
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6932
    • View Profile
    • Cambam V1.0 French Doc
Re: A script that could be useful for some
« Reply #24 on: February 19, 2015, 22:43:53 pm »
Hello,

Quote
Besides, I think Yves's basic problem was when cutting inside a closed line. <G>

When time permit, I'll add a side detection that say what is the smaller arc IN and the smaller arc OUT off a closed polyline. I think that I know how to do that ... at least for closed polylines, for opened .. I don't know yet, that need some experiments ...

++
David

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8659
    • View Profile
Re: A script that could be useful for some
« Reply #25 on: February 19, 2015, 22:58:08 pm »
Eddy,
I'm having trouble pulling that into my head.  Please show me an example.  How do you measure "the distance traveled by its periphery" of the 1" cutter?

I know the math for any plane geometric figures; I can't quite grasp the method.

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

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5083
  • Made in England
    • View Profile
Re: A script that could be useful for some
« Reply #26 on: February 20, 2015, 12:04:08 pm »
Eddy,
I'm having trouble pulling that into my head.  Please show me an example.  How do you measure "the distance traveled by its periphery" of the 1" cutter?

I know the math for any plane geometric figures; I can't quite grasp the method.

LLoyd

Not a cuuter, a ball that is rolling along the polylines without slippping and where it's centre is on the toolpath.

Then for another plan I was thinking, apply a scale transformation to the polylines so that they superimpose the toolpath then do a boolean difference. It's similar to Bob's idea.

Maybe the V-engrave plugin has some applicable ideas ?
« Last Edit: February 20, 2015, 12:11:37 pm by EddyCurrent »
Filmed in Supermarionation

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8659
    • View Profile
Re: A script that could be useful for some
« Reply #27 on: February 20, 2015, 13:20:56 pm »
yeah.... I understand the relationship.  I could not figure how - in practical CB terms - you calculate the actual distance the periphery of the tool goes during a cut. (ball, circle, doesn't matter for a plane figure).

The toolpath is always represented by the center of the tool, and there's no supervision passed back by CB about the periphery... that I can find.

But then it occurred to me that (perhaps) to cut any CLOSE polyline, the periphery of the tool must eventually describe a path that causes it to roll 360 degrees. (is that correct?) Hmmm... not intuitive... I think I can see paths where it would roll further than, but never less than one circumference...

IF the former is the case, then the described toolpath should always be shorter by one tool circumference than the zero-diameter path.

If that's not right, I'm still floundering for an answer

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

Offline klystron

  • Ewok
  • *
  • Posts: 36
    • View Profile
Re: A script that could be useful for some
« Reply #28 on: February 20, 2015, 15:15:50 pm »
Ok Lloyd,
oui suivant les logiciels de dessin, il n'y a pas d'arc mais des secteurs ou polylignes et dans ce cas cela pose des problemes pour retrouver les rayons mini.
---
Ok Lloyd,
yes next drawing software, there is no arc or polyline sectors but in this case this causes problems to find the mini-rays.

Yves.

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8659
    • View Profile
Re: A script that could be useful for some
« Reply #29 on: February 20, 2015, 15:19:12 pm »
Si je devrais avoir l'occasion de travailler sur ce , je voudrais profiter pour voir un programme qui pourrait déclarer la taille de fraise pour toute ligne , de couper avec une tolérance fournies par l'utilisateur .

Lloyd
-------------
If I should have the opportunity to work on this , I would enjoy to see a program that could declare cutter size for any line , cut with a tolerance provided by the user.

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