IsPointInside not working after mesh (de)serialization with Newtonsoft's JsonConvertor

After serializing and deserializing a valid mesh, it seems everything is recovered except for DisjointMeshCount value and HasUSerData/UserData.

Data difference seems In case of the mesh that is not working :

  • DisjointMeshCount = -1
  • HasUSerData = false

What is going wrong? I can imagine that DisjointMeshCount should at least be 1 for IsPointInside to work. If so, is there a way to “evaluate” the data so that DisjointMeshCount gets a proper value again?
Regard, Wei

The problem seems to be something else. In this case I’m using the Rhino3dmIO library for which it seems the Mesh.IsPointInside is implemented “differently”. Will try to make a new post.

Hi @wpl,

Mesh.IsPointInside always returns false in Rhino3dmIO, as the code behind this method uses functionality only found in core Rhino.

– Dale