Author Topic: Drag-Knife Plugin  (Read 104866 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: Drag-Knife Plugin
« Reply #15 on: May 29, 2015, 15:46:36 pm »
Sorry, yes of course I saw the parameters, just a head spin moment  ::)

Sorry about the updates but I've added an updated Plugin to the first post.

1. Added an Enable/Disable Log Messages check box, big speed improvement if Logs not required. ;D
« Last Edit: May 29, 2015, 18:18:50 pm by EddyCurrent »
Filmed in Supermarionation

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: Drag-Knife Plugin
« Reply #16 on: May 29, 2015, 15:58:50 pm »
Just ran the "Gawly CNC Times Roman.cb" file again with proper parameters, thank goodness, that looks right now, I was using a Knife Tip Offset that was far too big  :D
« Last Edit: May 29, 2015, 16:29:47 pm by EddyCurrent »
Filmed in Supermarionation

Offline airnocker

  • CNC Jedi
  • *****
  • Posts: 651
    • View Profile
Re: Drag-Knife Plugin
« Reply #17 on: May 29, 2015, 17:04:38 pm »
Just ran the "Gawly CNC Times Roman.cb" file again with proper parameters, thank goodness, that looks right now, I was using a Knife Tip Offset that was far too big  :D

Yea!

airnocker

Everything depends on everything else

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7421
    • View Profile
    • Cambam V1.0 French Doc
Re: Drag-Knife Plugin
« Reply #18 on: May 29, 2015, 17:21:21 pm »
Quote
I can see where the divide by zero occurs, two places I think, so I can catch them before it happens and put up a message.

Currently I can't use the python script to test, but with the plugin, for the file with a duplicate point, the polyline is created, all points are here but it is not displayed to the screen  :o .. only because a bulge is NaN in the collection .. now we know how to hide a polyline without to have to hide it's layer  ;D

++
David

Offline GraphicMan

  • Droid
  • **
  • Posts: 94
    • View Profile
Re: Drag-Knife Plugin
« Reply #19 on: May 29, 2015, 20:37:12 pm »
Quote
I can see where the divide by zero occurs, two places I think, so I can catch them before it happens and put up a message.

Currently I can't use the python script to test, but with the plugin, for the file with a duplicate point, the polyline is created, all points are here but it is not displayed to the screen  :o .. only because a bulge is NaN in the collection .. now we know how to hide a polyline without to have to hide it's layer  ;D

++
David

See I told you I experience weird behavior using the first plugin compared to the script (have not tried the latest update yet) but honestly speaking with the same imported file (after manually removing the duplicate polylines) the plugin works and some letters dont show its created path unless I select everything on the screen, some have empty polylines! If nothing is selected you can only see some of the letters (polylines) that have been done successfully, The more weird is that there is identical letters, but one is successful the other is not! (could be from the conversion(duplicate point on one of them?)), more over I have noticed that changing the start point can make the drag knife path creation not successful for a letter that was successful before setting a start point (could also be a conversion problem (duplicate point)). Please check the uploaded file!!  I believe All these behavior HAS to be addressed

I have also discovered is 2 things earlier while using the old script (long time ago)
1. The original code state that the polyline has to be closed, well I have found that it is not necessarily!
2. Weird zigzagged path with curved polylines (check the photo), not sure how this can be normal

Thanks


Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: Drag-Knife Plugin
« Reply #20 on: May 29, 2015, 20:45:46 pm »
You need to use the new version.
It told me there were problems in the polylines.
I used the 'clean' function and a knife tip offset of 0.1mm and it worked great.
Filmed in Supermarionation

Offline GraphicMan

  • Droid
  • **
  • Posts: 94
    • View Profile
Re: Drag-Knife Plugin
« Reply #21 on: May 29, 2015, 20:49:43 pm »
You need to use the new version.
It told me there were problems in the polylines.
I used the 'clean' function and a knife tip offset of 0.1mm and it worked great.

True, even with the old plugin it works after a clean
apparently many problems from the unseen conversion problems

but what about the zigzags?

Offline GraphicMan

  • Droid
  • **
  • Posts: 94
    • View Profile
Re: Drag-Knife Plugin
« Reply #22 on: May 29, 2015, 21:55:52 pm »
The disabled log feature made the path creation instant, thanks Eddy, GREAT addition

I thought the cutting direction was clockwise but it seem to me anticlockwise, is that right?
The program assume the initial cutting is in X+ right?

I am a little bit lost here, please find the attached image




Offline airnocker

  • CNC Jedi
  • *****
  • Posts: 651
    • View Profile
Re: Drag-Knife Plugin
« Reply #23 on: May 29, 2015, 23:28:32 pm »
Hey Eddy, I've updated my Gawly CNC file by adding some different size boxes along with the text, converted to polylines and Cleaned, then applied the drag knife plug-in.

The first status line states "WARNING! Open poly detected (offset 5E-50)"

Not sure where to look or where this offset is - couldn't find anything on the forum that explains an offset value like this.

airnocker

Everything depends on everything else

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8988
    • View Profile
Re: Drag-Knife Plugin
« Reply #24 on: May 30, 2015, 00:43:28 am »
That's probably scientific notation for a very VERY tiny offset 5 x 10 to the -50th power.

That's a vanishingly-small offset, but still not zero.

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

Offline airnocker

  • CNC Jedi
  • *****
  • Posts: 651
    • View Profile
Re: Drag-Knife Plugin
« Reply #25 on: May 30, 2015, 01:47:36 am »
Thanks, Lloyd.  I thought it must scientific notation and a small number but how does one find it?  There are no clues except that is associates to a poly line.

What are options to "close" the opening?

airnocker

Everything depends on everything else

Offline airnocker

  • CNC Jedi
  • *****
  • Posts: 651
    • View Profile
Re: Drag-Knife Plugin
« Reply #26 on: May 30, 2015, 01:53:08 am »
Thanks, Lloyd.  I thought it must scientific notation and a small number but how does one find it?  There are no clues except that is associates to a poly line.

What are options to "close" the opening?



Nevermind.  I found it...polyline > clean handles it.  I did the "clean" on the polylines prior to running the plug-in rather than on the new polylines.  duh?

airnocker

Everything depends on everything else

Offline airnocker

  • CNC Jedi
  • *****
  • Posts: 651
    • View Profile
Re: Drag-Knife Plugin
« Reply #27 on: May 30, 2015, 02:27:14 am »
FYI:  Copying the box and text polyline objects to a new .cb file, then "Clean"ing the polylines created by the drag-knife plugin before creating the engraving MOP resolved the "impossible to see, infinitesimally small open polyline" problem.  Now I get a cleanly generated tool path. Must have been some old artifacts in the original file I created in 2012.

Tomorrow I'll exchange my Porter Cable router for my drag-knife and do a test cut of the Gawly CNC file.

airnocker

Everything depends on everything else

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: Drag-Knife Plugin
« Reply #28 on: May 30, 2015, 06:35:27 am »
I drew a Trapezoid shape and made 4 copies.

2 of those have Closed Polylines in the Clockwise direction, the other 2 have Closed Polylines in the Counter Clockwise direction.
2 of those have the starting point of the Closed Polyline at the bottom left, the other 2 have the starting point of the Closed Polyline at the top left.

I selected them all and ran the plugin, as you can see it gives different results, what difference these make to the final product is something I don't know, having never used a drag knife before.

If you need something to show the polyline start point and direction, use this plugin ; http://www.cambam.co.uk/forum/index.php?topic=4897.msg37236#msg37236
( you will need CamBam version P I think )

And you can change the direction and start point; http://www.cambam.info/doc/plus/cad/EditPolyline.htm
« Last Edit: May 30, 2015, 06:37:26 am by EddyCurrent »
Filmed in Supermarionation

Offline GraphicMan

  • Droid
  • **
  • Posts: 94
    • View Profile
Re: Drag-Knife Plugin
« Reply #29 on: May 30, 2015, 06:46:23 am »
I drew a Trapezoid shape and made 4 copies.

2 of those have Closed Polylines in the Clockwise direction, the other 2 have Closed Polylines in the Counter Clockwise direction.
2 of those have the starting point of the Closed Polyline at the bottom left, the other 2 have the starting point of the Closed Polyline at the top left.

I selected them all and ran the plugin, as you can see it gives different results, what difference these make to the final product is something I don't know, having never used a drag knife before.

If you need something to show the polyline start point and direction, use this plugin ; http://www.cambam.co.uk/forum/index.php?topic=4897.msg37236#msg37236
( you will need CamBam version P I think )

And you can change the direction and start point; http://www.cambam.info/doc/plus/cad/EditPolyline.htm

Thanks a lot Eddy, that really cleared out everything
I am sorry but as it seem my weak experience with CM made me face really weird stuff lol
To be honest the CBubble you made is really something should be integrated with CB, It is a really hard time without it!!
Thanks Again:)
I think it give different results because the code assume the initial cutting direction is in X+, So this is perfectly making sense for me
« Last Edit: May 30, 2015, 07:23:31 am by GraphicMan »