Author Topic: Profile Carve Plugin  (Read 16655 times)

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Profile Carve Plugin
« on: February 18, 2017, 06:09:31 am »
Dear CamBam Friends

Here is my first version of a new plugin for CamBam. It is intended to provide capabilities to design and carve surface profiles and textures based on a CamBam drawing containing a set of CAD entities.   The resulting surface is created by computing a surface depth/height depending on the distance from the selected CAD entities.  Various surface profile options are made available.

As usual I would welcome feedback, suggestions and of course bugs.  I am attaching a ZIP file containing the DLL and User Guide and a PDF file showing some examples; for testing and evaluation purposes at this stage.

Geoff

Latest Version is now attached.
« Last Edit: March 03, 2017, 07:32:16 am by GeoffreyGRoy »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Carve Plugin
« Reply #1 on: February 18, 2017, 07:15:08 am »
Hello

That sound very nice (just looking the pdf) .. it's bed time for me, but certainly I will play with it as soon as possible  ;D

++
David

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8969
    • View Profile
Re: Profile Carve Plugin
« Reply #2 on: February 18, 2017, 14:23:53 pm »
My goodness!  That sounds like a really good (and difficult-to-write) plugin!

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

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1463
    • View Profile
Re: Profile Carve Plugin
« Reply #3 on: February 18, 2017, 15:58:29 pm »
You guys really do some impressive stuff!
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Carve Plugin
« Reply #4 on: February 25, 2017, 03:37:18 am »
Hello

I played hours with this new plugin, and it is very nice !

some pb with translation ; never translate the menu item, cambam do it ; if you translate it, it will appears 2 times in the translation list.

currently, only the combo and the 'about' text are translatable. For the about text, it is not necessary to translate it !, that increase the size of the translation file for nothing (and certainly slow the things)

Because it's not easy to find the right settings at the first try, it would be fine if:

- the stl object is automatically loaded in CB after the calculation is done, without to have to clic load/save each time (maybe the STL can be saved only if requested ?)

- a "preview" button or a "undo" button in the plugin window that allow to go back if the result do not match what we want, without to have to close the plugin, delete the surface, reselect, and run the plugin again.

- It will also better if the plugin windows was not modal, because we can't zoom/rotate the display to check the result without to close the plugin form.

++
David

PS: added to the website

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Re: Profile Carve Plugin
« Reply #5 on: February 25, 2017, 10:14:33 am »
Dear David

Many thanks for the feed back,  I am working on your suggestions.

Can you tell me how to get access to the user's current working directory.  I can get the current file name, if it defined, but not if it is "default".

thanks

Geoff

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Carve Plugin
« Reply #6 on: February 25, 2017, 23:11:13 pm »

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Re: Profile Carve Plugin
« Reply #7 on: February 26, 2017, 09:30:43 am »
Dear All

Here is version 1.0.1 of my ProfileCarve plugin, with number of improvements as suggested by David.  I think I have responded to all of David's suggestions, but please let me know if I have missed something, or if other changes might be useful.

The logic for saving/loading the STL file has been changed, and the undo included.  Together with a modeless dialog it does make the operations much smoother.

Geoff

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Carve Plugin
« Reply #8 on: February 28, 2017, 01:34:40 am »
Hello

Thanks for this release ;)

Nice, it is more easy to experiment now !

Just one or two things:

- when we click on the CB display area (to zoom or rotate the view), the plugin windows is masked, and if we minimize the CB main windows the plugin windows is not minimized.

I do not know the C# syntax, but to solve that in VB, in the function that is called by the menu click I link the plugin form to the CB main form.

Ex in my nummove plugin

Code: [Select]
    Public Shared Sub plugin_clicked(ByVal sender As Object, ByVal e As EventArgs)
        Dim f As Form = New ClassLibrary_nummove.MainWin
        CamBam.ThisApplication.TopWindow.AddOwnedForm(f)
        f.Show()
    End Sub


another pb that I encounter and I just solve appears if:

- you open a plugin like my nummove plugin
- you go to another application that open a windows that cover the CB and plugin windows (ex: your web browser)
- you return to CB (without to close the browser windows) and you close the plugin windows.

in this case, it is not the CB windows that is automatically bring to front but the last windows that was in front. (the browser in this case)

to solve that I just add:

CamBam.ThisApplication.TopWindow.BringToFront()

in the FormClosed events of the plugin form.

I also set the 'ShowInTaskBar' property to false, because we no longer need it if the plugin windows stay on top.

- other texts except the combo in the form are still not translatable. (maybe the 't' tag is missing in the form property ?)

the other suggests are for the doc ; maybe say that the tag must be uppercase, and maybe add the examples to the doc itself ?

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Profile Carve Plugin
« Reply #9 on: February 28, 2017, 08:32:41 am »
It's unfortunate that Entity Tags are used here because the Group plugin totally depends upon using Entity Tags
Filmed in Supermarionation

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Re: Profile Carve Plugin
« Reply #10 on: March 01, 2017, 10:08:41 am »
Dear EddyCurrrent

I had not tried your Group plugin, but I now see the issue.  Would it be possible for you to modify your plugin so that it only uses part of the Tag value for group names, for example, if a Tag = "Group 1" was used, I could use the string inside the [..] and ignore the "Group 1".  This would require you to change your plugin to ignore the suffix "", and to leave this part of the Tag in place when you grouped, re-grouped or un-grouped the entity.

Just a thought.

BTW I cannot get Vers 5 to work - no menu items.

Geoff

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Profile Carve Plugin
« Reply #11 on: March 01, 2017, 12:00:36 pm »
Geoff,

As I unerstand it, the user has to populate the Tag field before this plugin is started, that being the case it's bound to fail at some point because the Group name will be deleted. In additon jk modified his Align Toolbar plugin;
http://www.cambam.co.uk/forum/index.php?topic=6069.msg50180#msg50180
to work with Groups.

I was wondering if you could change the Profile Carve Plugin to include two fields similar to a CamBam Primitive ID's field for a MOP.
So there would be a field and list for "B" and one for "F", the user would populate those fileds with the ID's of desired entities, then if an entity had be "BF" it would have it's ID in both lists.
That way you would not require use of the Tag field.

« Last Edit: March 01, 2017, 12:04:36 pm by EddyCurrent »
Filmed in Supermarionation

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 270
    • View Profile
Re: Profile Carve Plugin
« Reply #12 on: March 01, 2017, 13:12:24 pm »
Dear EddyCurrent

I am not sure I understand what you are suggesting, but to work I need to access a property of the CAD entity before the MOP is created.  I am not aware that I can create new field (text or numeric) for each entity type, ideally this would be rather. useful.  If this is the case I would be quite willing to try. Any ideas?

Geoff

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Profile Carve Plugin
« Reply #13 on: March 01, 2017, 14:38:41 pm »
Geoff,

Unfortunately you picked me up incorrectly, maybe the attached picture will explain it.

The user has entered Entity ID's 1,3,5 into the Border field
The user has also entered Entity ID 1 into the Flat field

So the plugin now knows that entities 3 and 5 are Border type and that entity 1 is a Border-Flat type



 
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Carve Plugin
« Reply #14 on: March 01, 2017, 23:47:33 pm »
Hello,

IMHO, the fact that the objects that use a tag in the profile carve plugin are grouped is not really a pb for the use of the plugin.

But Eddy, one thing that I think can be very useful in your plugin, is the same as in AutoCAD.

In AutoCAD, in the group toolbar, we also have a toggle button that allow to enable/disable group detection. So, you can disable the group detection (so CB works as if the plugin is not here), move or transform a shape that is in a group, then enable the group again without to have to ungroup/group if you want to modify something in an object that is in a group. I use it all the time in AutoCAD.

it's the most right button on the toolbar on this video

http://www.screencast.com/t/vl9uATNOM

I assume it can be done by enable/disable the event that detect if an object has been selected selected ?

I see that there is a
if (_disablegroups == true) return;
in the SelectionChanged() function, so maybe the button can just turn this variable true/false ?

I still have not tried to play with C # more closely  :-[, each time, that I try, that takes hours to obtain something that works even with small changes, and some formulations are totally hermetic for me ! ... but it's still easier than the python !!!  ;D

a question: the "_" before disabledgroups variable is a "special features" in C# ? what it means ?

in VB it is used to "break" a line that is too long in the editor.

++
David
« Last Edit: March 02, 2017, 00:11:25 am by dh42 »