Open DavidRutten opened 11 years ago
Are you making successive calls on the same mesh? The first time this function is called on a mesh, a searching data structure is created and hung off of the mesh for reuse in future intersection calls. A memory increase the first time the MeshLine function is called for a mesh it is expected to increase the memory consumption. If the memory is continuing to increase on by calling MeshLine on the same mesh over and over, then that is not expected and is a buig. Could you please verify what is going on since you probably already have some sort of test case set up? Thanks
I'll write a small C# script that duplicates the issue. But the fact remains that MeshRay with the exact same meshes does not boost memory whereas MeshLine does.
hi Steve, It would be nice to know which functions in RhCommon do build up a searching data structure on the first call. Can I find this info in the scoure code?. I have been doing a lot of spatial searching recently on pointclouds and lineclouds. usually brut force with O(n²). I am thinking of using the RTree class instead. However if for example Mesh.ClosestPoint or PointCloud.ClosestPoint also built up similar internal searching data structure I might just use those.
thanks Goswin
Good point Goswin. We should try to provide comments in places where we build up search structures since they will be slow the first time they are called and very fast on calls after the first one.
I was looking for MeshLine intersection issue and came up with this discussion. Three known people are discussing same issue. My question is answered . Thanks! Looks like it is a bug if it is running very slow or crashing. Goswin is a friend/collegue of mine from London. And we all know David and Steve :)
Is it fixed? I met the same issue. I have a definition to calculate visibility analysis. Rhino.Geometry.Intersect.Intersection.MeshLine kills all memory. At the beginning, I believe it's the issue of multi-thread. After digging into every line of code, it turns out Intersection.MeshLine eats all memory.
Successive calls to Intersection.MeshLine increase memory consumption which never goes away. The same does not happen for MeshRay intersections, memory consumption remains flat.