Author Topic: Profile Carve Plugin  (Read 16808 times)

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 271
    • View Profile
Re: Profile Carve Plugin
« Reply #15 on: March 02, 2017, 01:21:37 am »
Dear Eddy

OK, I now see what you suggest.  The underlying problem is that the CAD entity IDs can change if the user edits the CAD drawing between running the plugin.  Some entities might be deleted and new ones created, perhaps reusing the same IDs.  Also, locating IDs can be an issue if there are lots of entities in the drawing.  Editing the Tag field directly is (generally) a simple task (except where we have a conflicting interest, of course).

I am am working on another conflict avoiding strategy but it will depend on plugin writers to collaborate.

thanks

Geoff

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2655
    • View Profile
Re: Profile Carve Plugin
« Reply #16 on: March 02, 2017, 08:52:59 am »
I think those problems would be solved in the most elegant way if a 'group' class is added natively to CB. A group is actually a 'frozen' selection.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7420
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Carve Plugin
« Reply #17 on: March 03, 2017, 03:11:18 am »
Hello,

I think those problems would be solved in the most elegant way if a 'group' class is added natively to CB. A group is actually a 'frozen' selection.

Yes, of course, but we must do with what we have !

@Eddy: maybe a simple way to solve the conflict is to do as in my Group script, I search only for tag that begin with certain chars, ex: maybe you can only search creates and modify tags that begin with GRP_xxx where xxx is a number and ignore any others ?

Also, the tag field can handle multiple lines, so we can use one tag per line.(or use coma as for the IDs)

When I worked on the Group script, I also works at the same time on the dim arrow plugin, and I planed to use also tags to store a special group (DIM_xxx) that will handle the text/arrows/extend lines as a group from the dimarrow plugin ; it's the reason because I thought to use specifics tags.  Maybe a way to explore more.

The more problematic things is that the user can change the tags manually and disturb all ..  :o

++
David

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 271
    • View Profile
Re: Profile Carve Plugin
« Reply #18 on: March 03, 2017, 07:31:28 am »
Dear All

Here is vers 1.0.2 of my ProfileCarve plugin.  I think I have fixed the issues raised by David ( 8)).

There seems to be no fully satisfactory way of avoiding conflicts when using the Tag field, but I have included in this version a possible proposal that would allow different plugins to share the Tag field providing some agreement is reached to use a standard syntax and a plugin specific  identifier. In this version of the plugin the "simple" syntax is still available for Tags (e.g. B, F & BF). These are now supported in upper or lowercase. 

I have also provided a suggestion for a structured Tag field that might look like this: "#GR=Group 1 #PC=F #AA=aaa". Where the field after the # is unique to the plugin (the key), and the field after the = is the given value.

To support this I have provided the code for a TagList class (in C#) to provide access to, update, create, add, etc Tag items to the Tag field.  If Tag fields are manipulated only by the plugin then Tags items for plugins other than the current one should be preserved.  Of course, the Tag field is also user editable and this introduces and possibility of errors being introduced accidentally.  The code is included ion the zip file to vers 1.0.2

Comments and feedback most welcome

Geoff

Offline onekk

  • CNC Jedi
  • *****
  • Posts: 525
    • View Profile
Re: Profile Carve Plugin
« Reply #19 on: March 03, 2017, 10:53:46 am »
Well done, this approach is elegant and applicable also with the 0.9.8 version.

Could I reuse your code in my plugins?

One idea that come in mind is to develop a plugin to edit the Tag fields and make it available to all who want to use this method, a sort of "community" standard for CamBam.

Regards

Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 271
    • View Profile
Re: Profile Carve Plugin
« Reply #20 on: March 03, 2017, 11:15:17 am »
The code is free to use and adapt, please let me know if there are bugs or possible improvements,

Geoff

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Re: Profile Carve Plugin
« Reply #21 on: March 03, 2017, 12:05:48 pm »
Think I'll adopt this convention in aligner plugin for work with groups.
Now it just checks
Code: [Select]
if (e.Tag.StartsWith("Group"))
,
and will support tagged variant too.

Now it depends on  EddyCurrent to accept it too and provide a Group plugin prefix :-)

Offline joebmh

  • Ewok
  • *
  • Posts: 8
    • View Profile
Re: Profile Carve Plugin
« Reply #22 on: July 02, 2017, 15:09:33 pm »
Does someone have an instructional video for using the Profile Carve Plugin?
Thanks
Joe

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 271
    • View Profile
Re: Profile Carve Plugin
« Reply #23 on: July 02, 2017, 23:10:32 pm »
Dear Joe
I have not prepared a video - I assume you have the User Guide.  I am quite happy to help with any questions.

Geoff