Author Topic: [plugin] Select unused shapes  (Read 9645 times)

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6200
    • View Profile
    • Cambam V1.0 French Doc
[plugin] Select unused shapes
« on: January 19, 2014, 17:52:15 pm »
Hello,

I create this little  plugin to help cleaning my drawing when the job is finished.

It is in the Edit menu: Select Unused (shift+ctrl+U)

When used, this plugin selects all shapes in the visible layers that are not associated to a part or a mop.

Note that even the disabled parts and mop are scanned to find the shapes they use.

the plugin scan for:

-pointlist used for nesting by a part
-shapes used in mop to define toolpath
-shapes used as limits with 3d surface mop

File updated: 22 sept 2015 (1.004 for version 0.9.8P)

http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/select_unused_shapes.html

++
David
« Last Edit: October 02, 2015, 13:17:19 pm by dh42 »

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8360
    • View Profile
Re: [plugin] Select unused shapes
« Reply #1 on: January 19, 2014, 17:57:07 pm »
Oh... that's a nifty idea, David!  I'm ALL the time cleaning up my stuff;  also, I find 'accidental' shapes that have zero dimensions, due to the occasional extra mouse click.

I shall try that out!

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

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6200
    • View Profile
    • Cambam V1.0 French Doc
Re: [plugin] Select unused shapes
« Reply #2 on: January 19, 2014, 18:10:15 pm »
Hello,

This version not handle the Vengrave and Thread mops plugin.

I add another version in att. that handle both, but be careful, it crash if this 2 plugins are not installed ;)

++
David
« Last Edit: January 19, 2014, 21:29:10 pm by dh42 »

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8360
    • View Profile
Re: [plugin] Select unused shapes
« Reply #3 on: January 19, 2014, 18:22:46 pm »
I add another version in att.
--------------
Abbreviations have a property of not translating well between languages.  I do not understand what is "in att.".

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

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6200
    • View Profile
    • Cambam V1.0 French Doc
Re: [plugin] Select unused shapes
« Reply #4 on: January 19, 2014, 18:39:12 pm »
 in att. = in attachment (pièce jointe in french)

What is the correct term for a file added to a message ?

(Google translation is like programming, a upper case or a dot missing and the meaning of the phrase can change a lot)

++
David

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8360
    • View Profile
Re: [plugin] Select unused shapes
« Reply #5 on: January 19, 2014, 18:43:41 pm »
"In attachement", or "attached" would be clear in almost any language.  It was the abbreviation that wasn't.

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

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8360
    • View Profile
Re: [plugin] Select unused shapes
« Reply #6 on: January 19, 2014, 18:54:51 pm »
Either or both will crash immediately.  "Cannot load CamBamLathe...dah...dah...."

I do not have the version of CamBam lathe your plugin demands.  Nor should I need to have it at all.  If the lathe plugin is not present, then it should note that and report it, but not crash.


Lloyd
« Last Edit: January 19, 2014, 18:57:32 pm by lloydsp »
"Pyro for Fun and Profit for More Than Fifty Years"

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6200
    • View Profile
    • Cambam V1.0 French Doc
Re: [plugin] Select unused shapes
« Reply #7 on: January 19, 2014, 19:11:25 pm »
Quote
If the lathe plugin is not present, then it should note that and report it, but not crash.

currently, I don't know how to do, it's the reason for the 2 versions of the plugin ;) , and I assumed that the lathe plugin is in the 'regular' installation of Cambam.

I redo a version without lathe and other plugins for you

++
David
« Last Edit: January 19, 2014, 21:29:36 pm by dh42 »

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8360
    • View Profile
Re: [plugin] Select unused shapes
« Reply #8 on: January 19, 2014, 19:55:08 pm »
David, if it will work without the lathe plugin (I don't yet understand why you must load it???), then simply do NOT attempt to load it if it is not present.  Check first, load after.

What role does loading the lathe plugin (which is _already_ loaded by CB if it's present) have to do with scanning MOps and primitives lists?


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

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6200
    • View Profile
    • Cambam V1.0 French Doc
Re: [plugin] Select unused shapes
« Reply #9 on: January 19, 2014, 20:19:04 pm »
Quote
What role does loading the lathe plugin (which is _already_ loaded by CB if it's present) have to do with scanning MOps and primitives lists?

Because the type/class definitions to access to this kind of MOP are ... in the .dll, if it is not present that crash.

the source file is attached, you'll understand the problem.

Currently, I can't find how to know what plugin is loaded in cambam, or how to find the path of the folder where are the plugins (to test if the .dll files are in the plugin folder)

++
David
« Last Edit: January 19, 2014, 21:35:15 pm by dh42 »

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6200
    • View Profile
    • Cambam V1.0 French Doc
Re: [plugin] Select unused shapes
« Reply #10 on: January 19, 2014, 21:34:52 pm »
Re

Ok, I found a way ... now it works in all config, with or without other mops plugins. (but they are needed if you want to recompile the source code, off course)

New sources and .dll are updated in the first post.


++
David

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8360
    • View Profile
Re: [plugin] Select unused shapes
« Reply #11 on: January 19, 2014, 23:48:16 pm »
Yes, that seems to work nicely now, David.  Thanks.  That's a useful plugin.

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

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6200
    • View Profile
    • Cambam V1.0 French Doc
Re: [plugin] Select unused shapes
« Reply #12 on: January 20, 2014, 13:15:52 pm »
Hello,

Ok, nice .... ready for the next plugin ;)

This plugin is simple, but I learn and understand again new things.... :)

++
David

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3025
    • View Profile
Re: [plugin] Select unused shapes
« Reply #13 on: January 20, 2014, 13:50:05 pm »
Ok, nice .... ready for the next plugin ;)

---------------------

Nice and practical plugin. Thank you David.

Now.. 4th Axis plugin ;) :D ;D
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6200
    • View Profile
    • Cambam V1.0 French Doc
Re: [plugin] Select unused shapes
« Reply #14 on: January 20, 2014, 14:04:15 pm »
Hello,

Quote
Now.. 4th Axis plugin

No, too simple ... 6 axis plugin  :o :o ;D ;D

The next job will be an extension of the nummove plugin to numrotate, and the transformation of the script 'select by kind of objects' to a plugin.

++
David