Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

boundingBox,

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
MichaelT_123
159 Views, 4 Replies

boundingBox,

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
Labels (3)
4 REPLIES 4
Message 2 of 5
MichaelT_123
in reply to: MichaelT_123

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
Message 3 of 5
MichaelT_123
in reply to: MichaelT_123

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
Message 4 of 5
BrianEkins
in reply to: MichaelT_123

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
Message 5 of 5
MichaelT_123
in reply to: BrianEkins

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report