Using Rhino3dm as a Polygonal Modeler

I am trying to use Rhino3dm as a simple polygonal modeler since it has good implementations of most primitive geometrical types that I require such as mesh, point, vector, polyline etc. Although, I’ve noticed that a lot of the useful methods such as ClosestPoint, GetNakedEdges, computing mesh area and so on are missing and are instead part of RhinoCompute. This basically renders Rhino3dm practically unusable on its own without using the Rhino compute server. It would be nice if you could make these method at least available in the polygonal case where NURBs are not necessary. Most of these algorithms for calculating these methods are freely available online or may be replicated using the methods already part of Rhino3dm.

Example compute mesh area in simple flat faces case:

  static public double GetMeshArea(Rhino.Geometry.Mesh mesh)
  {
    double area = 0;
    if (!mesh.Faces.ConvertQuadsToTriangles())
        throw new Exception("Failed to convert quads to triangles");
  
    foreach (var f in mesh.Faces)
    {
        if (!f.IsTriangle)
            throw new Exception("Face is not triangle!");
  
        var triangle = new Triangle3d(mesh.Vertices[f.A], mesh.Vertices[f.B], mesh.Vertices[f.C]);
        area += triangle.Area;
    }
  
    return area;
  }
1 Like

Rhino3dm (or Rhino3dmIO as it is/was called) is only for reading and writing (hence the I/O in the name) of 3dm files. You’re basically asking McNeel to give up their business model, and I think that is unlikely to happen.

2 Likes

Thank you but I don’t think you understand the post.

We’re always open to evaluate the border between what we open-source in rhino3dm, and what requires a license. We’ll evaluate your request to add

ClosestPoint, GetNakedEdges, computing mesh area

for some of these cases. If you have any other methods you feel should be in rhino3dm, please list them here so we can consider their inclusion.

2 Likes

Yeah I just think you should consider detaching the more simple cases of these algorithms from the more complex proprietary stuff. Like not everyone who wants to use Rhino3dm needs all the NURBs mathematical methods. But who am I to talk.