I have a C# project where I have referenced the latest Rhino3d NuGet package (version 7.15.0). I am trying to create a brep from 4 corner points Brep.CreateFromCornerPoints. For some reason when I try to use this line of code, it throws an error. Please see the image below

Out of curiosity I tried referencing the RhinoCommon.dll and I’m getting the same error. I tried another experiment using the C# component in GH and I’m able to successfully use that line of code. Please see the image below.

What am I missing? How can I use Brep.CreateFromCornerPoints method outside of Rhino?

Hi @charlie_portell,

Brep.CreateFromCornerPoints is found in RhinoCommon but not Rhino3dm, as the underlying function is found in core Rhino, not openNURBS.

In your code, try calling NurbsSurface.CreateFromCorners, instead of Brep.CreateFromCornerPoints. This is also in RhinoCommon and not Rhino3dm.

– Dale

Thanks @dale for your advice.

Is there a way to have a visual studio project that references both RhinoCommon as well as Rhino3dm? When I try to reference RhinoCommon and Rhino3dm in the same project I get multiple error messages identifying conflicting types. Which makes sense.

I guess I should clarify what I’m trying to do in my project. I have geometry from another modeling application and I would like to be able to convert that geometry into a 3dm file and save it to the desktop. Would I need both RhinoCommon and Rhino3dm?
Thank you.

Hi @charlie_portell,

RhinoCommon is only for Rhino plug-ins. Rhino3dm, which is basically “RhinoCommon Lite”, its for applications outside of Rhino.

Does this help?

– Dale

Hi @dale , thanks for the feedback.
The distinction between the RhinoCommon and Rhino3dm is clear. Id’ be curious to get your feedback. If I’m developing a standalone application, and I would need some features from RhinoCommon and save the data as a .3dm file, what would be the best approach for something like that?
Thank you.

Hi @charlie_portell,

Rhino3dm includes the File3dm class which allows you to read and write .3dm files.

Do you have a list?


– Dale

Thanks @dale
These would be helpful

  • CreateBrepFromCorners
  • CreateSurfaceFromCorners
  • Brep.JoinBreps
  • Brep.Join

There might be others down the road

@charlie_portell - I can help with the surface creation functions.

You can construct Breps already. But if you need robust Brep joining, then consider consider using Rhino.Inside or Rhino.Compute.

— Dale