Author Topic: "Snappy", more snap points for CamBam plugin  (Read 82733 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: "Snappy", more snap points for CamBam plugin
« Reply #135 on: May 01, 2024, 09:11:02 am »
David,

There is a Null reference.
It looks like the order in which plugins and file geometry are loaded makes a difference.
If you load the file using the file menu then we know all the plugins are loaded and ready to use, but if you use load from project icon then things might be different.
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7422
    • View Profile
    • Cambam V1.0 French Doc
Re: "Snappy", more snap points for CamBam plugin
« Reply #136 on: May 01, 2024, 23:39:01 pm »
Yes, maybe it is because in the V1 the snap to object snap also to the mesh object nodes, and there is a lot of points !. maybe the list of points to snap to is not "finished" when the plugin is loaded ...

I wonder if the problem can be when you read the state of the "snap to object" to reflect it in the plugin form to update the checkbox ; I have not read your code (I no longer have C# installed), is this checkbox updated in the "init plugin" or only when the form is opened ?

... and the strange thing is that today, it works like a charm  ::) ???

++
David
« Last Edit: May 01, 2024, 23:46:11 pm by dh42 »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: "Snappy", more snap points for CamBam plugin
« Reply #137 on: May 02, 2024, 05:02:06 am »
David,

The plugin waits until CamBam top window has loaded then it checks for the snap toolbar and grid toolbar, hooks into the mouse, gets stored settings from Windows Registry. form loads and sets check boxes using stored settings.
After that it uses the mouse position and detects any entities it passes over, however it does update itself first to get the latest version of any file CamBam has loaded.

// need these here to get instance of newly loaded file
view = CamBamUI.MainUI.ActiveView;
myfile = view.CADFile;

I don't know the mechanism used when a file is loaded from it's icon rather than using File->Open from withing the software.
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7422
    • View Profile
    • Cambam V1.0 French Doc
Re: "Snappy", more snap points for CamBam plugin
« Reply #138 on: May 03, 2024, 18:54:04 pm »
Hello,

Ok, so it’s a mystery !  ;D

Yesterday I launched the file 6 times without problem.. and on the 7th time, the error message appeared... no big deal, given that in the end it still works if you click on "continue" ...

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: "Snappy", more snap points for CamBam plugin
« Reply #139 on: February 24, 2025, 14:57:55 pm »
New version attached to the first post in this thread, V 8.9
Instead of hiding the cursor at a snap point it will change the cursor to a Cross.

I shall leave v 8.8 in place so you can choose either.
Filmed in Supermarionation

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4492
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: "Snappy", more snap points for CamBam plugin
« Reply #140 on: February 24, 2025, 17:23:02 pm »
Thanks Eddy.  I just mentioned something like that as an option in the cnczone group the other day when I pointed out the disappearing cursor bug was the potential issue they were having.  With the cross we will still be able to use other functions until the value gets reset.
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: "Snappy", more snap points for CamBam plugin
« Reply #141 on: February 24, 2025, 18:04:15 pm »
Bob,

I saw your post on cnczone the other day and liked your idea.
Filmed in Supermarionation

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4492
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: "Snappy", more snap points for CamBam plugin
« Reply #142 on: February 24, 2025, 20:43:43 pm »
Just tried the new version.  I like it.  Thank you. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com