In what kind of condition, Rhino.Geometry.Vector3d.VectorAngle return -1.23432101234321E+308?

rhinocommon

#1

I have knowledge on Python but zero on .NET.
When I tried to run the energy simulation by Honeybee, I got the error.
And investigating the reason, I found that Rhino.Geometry.Vector3d.VectorAngle is returning -1.23432101234321E+308 because the condition match to if (!a.Unitize() || !b.Unitize()) .
Can anyone tell me what this condition means?
I also attach the link to source code of VectorAngle.


(Tom) #2

Hello,

hard to tell without the actual code.
My guess:
-1.23432101234321E+308 usually means “Unset”. Since Point3ds and Vector3ds are structs, they don’t have a None/Null Type. You forget to init a vector somewhere, and Honeybee did not catch this potential error.

if (!a.Unitize() || !b.Unitize())
unitize a and b and if the unitizing of vector a or b fails then do something


#3

Thank you for your information.
I still cannot find what is problem.
I attached the rhino and GH file.
Could you help me to point out what is problem?
Thank you.
180207VectorAngle.gh (541.0 KB)
180207VectorAngle.3dm (3.1 MB)


(Dale Fugier) #4

Hi @Katsuya_Obara,

Can you provide a more concise example that just demonstrates the problem you are having?

Thanks,

– Dale