CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 15, 2019, 03:16:10 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: [V1-12] Buggy File (solved in V1 RC1)  (Read 1627 times)
Bob La Londe
CNC Jedi
*****
Offline Offline

Posts: 3818


^ 8.5 pounds on my own hand poured bait.


View Profile WWW
« on: July 17, 2018, 03:14:22 am »

I don't know how to quantify this bug.  I start to do anything with this fairly simple file and I get a fatal error.  

Using latest release of 1.0.  


I was setting this up as a templeate file for engraving standard sizes of brass plates and when I went back to do anything with it I get the error quit or continue screen.  Continue clears it and the instant I do anything it comes back.  Quit of course quits.  Never experienced anything like it before.  




* Brass Plates.cb (6.46 KB - downloaded 69 times.)
« Last Edit: November 01, 2019, 21:50:30 pm by dh42 » Logged

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
Bob La Londe
CNC Jedi
*****
Offline Offline

Posts: 3818


^ 8.5 pounds on my own hand poured bait.


View Profile WWW
« Reply #1 on: July 17, 2018, 03:19:20 am »

Draw a straight line or measure are pretty consistent.  Tried select all convert to polyline and it locked up.  Had to use Task Manager to shut it down. 
Logged

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
Bob La Londe
CNC Jedi
*****
Offline Offline

Posts: 3818


^ 8.5 pounds on my own hand poured bait.


View Profile WWW
« Reply #2 on: July 17, 2018, 03:25:15 am »

If it helps:  I was able to delete the text entries, and then the problem went away.

Logged

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
Bob La Londe
CNC Jedi
*****
Offline Offline

Posts: 3818


^ 8.5 pounds on my own hand poured bait.


View Profile WWW
« Reply #3 on: July 17, 2018, 03:28:45 am »

Then I used CTRL Z to restore the text.  When all but one text field was restored CamBAm got slow and erratic.  When the last one was restored the error came back. 
Logged

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
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5677



View Profile WWW
« Reply #4 on: July 17, 2018, 03:36:59 am »

Hello Bob

Problem with Text (14) ; the Text property is empty and cause an error when trying to convert to polyline (Object reference not set to an instance of an object.)

... I saw the same error with empty text a few time ago .. but I don't remember where ...

edit: here
http://www.cambam.co.uk/forum/index.php?topic=6790.msg59478#msg59478

++
David
« Last Edit: July 17, 2018, 03:43:09 am by dh42 » Logged
Dragonfly
CNC Jedi
*****
Offline Offline

Posts: 2224



View Profile
« Reply #5 on: July 17, 2018, 09:20:32 am »

Quote
... I saw the same error with empty text a few time ago .. but I don't remember where ...
It was in one of my files where you found the problem faster than me, as usual Smiley

It was connected to the 'Snappy' plugin when the mouse pointer hovered over the empty object and Eddy added a check to the plugin.
IIRC I then suggested that such check might be useful to add into CamBam itself when reading a file. And discard invalid objects.
Logged
10bulls
Administrator
CNC Jedi
*****
Offline Offline

Posts: 2133


Coding Jedi


View Profile WWW
« Reply #6 on: July 17, 2018, 12:24:42 pm »

I have changed the MText.ToRegions() method to return an empty array, rather than a null value.

This prevents the error and should also be kinder on scripting and plugins.
This will be in the next update.

Thank you for pointing this out.
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 4079



View Profile
« Reply #7 on: July 17, 2018, 13:05:26 pm »

In the Snappy plugin I used this method to detect an invalid entity;

 // detect invalid entities
     Point3F cnt = ent1.GetCentroid();
     if (cnt.X.ToString() == "NaN") continue;

It uses 'continue' due to the code being in a loop

Logged

Made in England
10bulls
Administrator
CNC Jedi
*****
Offline Offline

Posts: 2133


Coding Jedi


View Profile WWW
« Reply #8 on: July 17, 2018, 13:38:29 pm »

Points and vectors in CamBam provide a property 'IsUndefined'.
This returns true if any X,Y or Z properties are NaN.
You can use it like this...

Code:
Point3F cnt = ent1.GetCentroid();
     if (cnt.IsUndefined) continue;

There is also a .NET function double.IsNaN(...) which is useful to check numbers for NaNs without needing string compares.

If you want to set a point as undefined you can use the point and vector .Undefined static property, like this...

Code:
Point3F p = Point3F.Undefined;


Logged
Bob La Londe
CNC Jedi
*****
Offline Offline

Posts: 3818


^ 8.5 pounds on my own hand poured bait.


View Profile WWW
« Reply #9 on: July 17, 2018, 23:43:33 pm »

http://www.cncmolds.com/webstore/custom-engraved-brass-plates-make-your-own-plaques.html

Here is some CamBam work I can show.  LOL. 


* Clipped Corner Rectangular 2p5 x 1.jpg (162.41 KB, 1008x756 - viewed 142 times.)

* Clipped Corner Rectangular 2p5 x 1 - Dimensions.jpg (187.16 KB, 1033x619 - viewed 133 times.)

* Round End 3p5 p75 - Dimensions.jpg (213.69 KB, 1161x633 - viewed 131 times.)

* Round End 3p5 p75.jpg (170.37 KB, 1008x756 - viewed 143 times.)
Logged

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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.12 seconds with 20 queries.

Copyright © 2018 HexRay Ltd. | Sitemap