User avatar
By b-kandor
#347284
Hi Jd, Hope all has been well since Anaheim, was a long time ago now...

I encountered this error today when enabling fire from within solidworks:


***********************************
Body Errors (1)
***********************************

-- BEGIN Body Error #1 --

Entity:xxxx-xxxxxx xxxxx xxxxxx-xxxxx xx xxxxxx-x/Mirror1[6]
Exception report.
Type: System.InvalidCastException
Message: Unable to cast object of type 'System.DBNull' to type 'System.Single[]'.
Source: Maxwell.SolidWorks
Has StackTrace: True
BEGIN STACKTRACE: 'System.InvalidCastException'
- at Maxwell.SolidWorks.mxExport.FaceInfo..ctor(Face2 face, BodyInfo bodyInfo)
- at Maxwell.SolidWorks.mxExport.mxExport.ExportFace(Object pFace, Object[]& pInfo)
- at Maxwell.SolidWorks.SwAddin.ProcessBody(Body2 pBody, Delegate pMethod, Object[]& pParams)
- at Maxwell.SolidWorks.mxExport.mxExport.ExportBody(BodyInfo& bodyInfo, Scene& pScene)
END STACKTRACE: 'System.InvalidCastException'
Has InnerException: False

-- END Body Error #1 --
By JDHill
#347285
Yes, I hope you have been well too. It looks like SolidWorks is returning a null array (DBNull? how many kinds of null do we need -- I'll put in a trap for this) for either triangles or normals on this face. Is this native SolidWorks geometry, or imported? Are you able to check if you can force a valid mesh to be created by changing the Image Quality for the part?
User avatar
By b-kandor
#347286
The geometry is all native. Image quality was at the red limit, but was not applied to all referenced documents - that fixed it straight away! Thanks!
By JDHill
#347287
Well, thank you for reporting, as I was not aware that this type of null could be returned from the calls I'm making to obtain tris/normals.
Sketchup 2025 Released

Thank you Fernando!!!!!!!!!!!!!!!!!!!!!!!!!!! hwol[…]

I've noticed that "export all" creates l[…]

hmmm can you elaborate a bit about the the use of […]

render engines and Maxwell

Funny, I think, that when I check CG sites they ar[…]