How can I create a IRhinoBrepObject?
IRhinoBrepObject is part of the original, Rhino .NET SDK (Rhino_DotNet.dll). To create an IRhinoBrepObject, you will need to reference this assembly in your plug-in. The assembly can be found in Rhino’s System folder.
Why do you need to create a IRhinoBrepObject object?
I have solved this problem.
see the code below. I have create a Make2d GHA.
Dim Geo As New List(Of Brep), Pln As Plane = Plane.WorldXY, disT As Double = RhinoDoc.ActiveDoc.ModelAbsoluteTolerance
Dim angT As Double = RhinoDoc.ActiveDoc.ModelAngleToleranceRadians
If Not DA.GetDataList(0, Geo) Then Return
DA.GetData(1, Pln)
DA.GetData(2, disT)
DA.GetData(3, angT)
Dim irhobjs As New List(Of RMA.Rhino.IRhinoBrepObject)
For Each ge As Brep In Geo
Dim obre As OnBrep = Runtime.Interop.ToOnBrep(ge)
Dim mf As New RMA.Rhino.MRhinoBrepObject
mf.SetBrep(obre)
irhobjs.Add(mf)
Next
Dim pcobj As RMA.Rhino.MRhinoCurveObject() = Nothing, hcobj As RMA.Rhino.MRhinoCurveObject() = Nothing
Dim Ionpts As New RMA.OpenNURBS.On3dPoint(Pln.Origin.X, Pln.Origin.Y, Pln.Origin.Z)
Dim Ionvx As New RMA.OpenNURBS.On3dVector(Pln.XAxis.X, Pln.XAxis.Y, Pln.XAxis.Z)
Dim Ionvy As New RMA.OpenNURBS.On3dVector(Pln.YAxis.X, Pln.YAxis.Y, Pln.YAxis.Z)
Dim Ionpln As New RMA.OpenNURBS.OnPlane(Ionpts, Ionvx, Ionvy)
RMA.Rhino.RhUtil.RhinoBrepGet2dProjection(irhobjs.ToArray, Ionpln, pcobj, hcobj, disT, angT)
Dim pghcrv As New List(Of Curve), hghcrv As New List(Of Curve)
For Each pobj As RMA.Rhino.MRhinoCurveObject In pcobj
pghcrv.Add(Runtime.Interop.FromOnCurve(pobj.Curve))
Next
For Each pobj As RMA.Rhino.MRhinoCurveObject In hcobj
hghcrv.Add(Runtime.Interop.FromOnCurve(pobj.Curve))
Next
DA.SetDataList(0, pghcrv)
DA.SetDataList(1, hghcrv)