boundingBox,

boundingBox,

MichaelT_123
Advisor Advisor
565 Views
4 Replies
Message 1 of 5

boundingBox,

MichaelT_123
Advisor
Advisor

Hi TF360,

 

I am receiving validation error:

#

'Traceback (most recent call last):\n File "C:\\Users\\MichaelT\\.vscode\\extensions\\ms-python.python-2023.20.0\\pythonFiles\\lib\\python\\debugpy\\_vendored\\pydevd\\_pydevd_bundle\\pydevd_resolver.py", line 189, in _get_py_dictionary\n attr = getattr(var, name)\n ^^^^^^^^^^^^^^^^^^\n File "C:\\Users/MichaelT/AppData/Local/Autodesk/webdeploy/production/????????????/Api/Python/packages\\adsk\\fusion.py", line 18463, in _get_boundingBox\n return _fusion.CustomGraphicsEntity__get_boundingBox(self)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRuntimeError: 2 : InternalValidationError : pNode\n'

#

 

The supplementary calculation of boundingBox from:

  • cgEnt.coordinates.coordinates
gives a proper result.

 

Any thoughts?

 

After additional investigation ... the additional info.

 

Code works on one data but for some reason does not on the another.

Creation of customGraphics line seems to be a problem.

 

                    coords                 = adsk.fusion.CustomGraphicsCoordinates.create( vecCoords )
                    isLineStrip          = True
                    cgEnt                  = cgGroup.addLines( coords, [], isLineStrip, vecStrip )        # isLineStrip = True
 
The types and lengths of arrays are the same,
 

                   type(vecStrip[0]) = <class 'int'>

                  type(vecCoords[0]) = <class 'float'>

 

 The only difference that I can spot is that in failed data set vecCoords array contains very small absolute numbers

 

                 5.064522930128136e-32
               -9.192413888621255e-32

 

The rest is the same.

 

 

 

Regards

Michael

MichaelT
0 Likes
Accepted solutions (1)
566 Views
4 Replies
Replies (4)
Message 2 of 5

MichaelT_123
Advisor
Advisor
Accepted solution

Hi TF360,


I squeezed/simplified the problem to three points only, invoking them via two independent paths.
They produced identical results in the log file! But one bBox always failed!

Then, I closed the F360 application, rebooted the computer, and started grilling the problem again.

Surprise, surprise .... all started working as required. I am still perplexed about the cause of the problem, but I am relieved that things went back to normal, if there is such a thing!

 

So Sleep Well TF360!

 

Regards

MichaelT

 

 

MichaelT
0 Likes
Message 3 of 5

MichaelT_123
Advisor
Advisor

H TF360,

 

Unfortunately, the problem has returned!

It is intermittent. The failed process can be successfully executed after restarting F360.

The cause is probably embedded  deep in the F360 kernel ... like a rogue variable,  memory leaking, etc.

 Could it be possible to look 'under magnifying glasses' on CustomGraphicsEntity__get_boundingBox(self) code?

 

Regards

MichaelT

 

MichaelT
0 Likes
Message 4 of 5

BrianEkins
Mentor
Mentor

What kind of custom graphics entities are you creating? The problem might be dependent on that.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 5 of 5

MichaelT_123
Advisor
Advisor

Hi Mr Ekins,

 

... as stated in my first post:

 

                    coords                 = adsk.fusion.CustomGraphicsCoordinates.create( vecCoords )
                    isLineStrip          = True
                    cgEnt                  = cgGroup.addLines( coords, [], isLineStrip, vecStrip )        # isLineStrip = True
 
Regards
MichaelT
MichaelT
0 Likes