add casts to rhino (#19)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections;
|
||||
using System.Collections;
|
||||
using Rhino;
|
||||
using Rhino.Collections;
|
||||
using Rhino.DocObjects;
|
||||
@@ -26,6 +26,19 @@ public partial class RhinoDocProxy
|
||||
[Proxy(typeof(Curve), new[] { "Duplicate" })]
|
||||
public partial interface IRhinoCurveProxy : IRhinoCurve;
|
||||
|
||||
public partial class CurveProxy
|
||||
{
|
||||
public IRhinoPolyCurve? ToPolyCurve() => A.Call<IRhinoPolyCurve>(() => _Instance as PolyCurve);
|
||||
|
||||
public IRhinoArcCurve? ToArcCurve() => A.Call<IRhinoArcCurve>(() => _Instance as ArcCurve);
|
||||
|
||||
public IRhinoPolylineCurve? ToPolylineCurve() => A.Call<IRhinoPolylineCurve>(() => _Instance as PolylineCurve);
|
||||
|
||||
public IRhinoLineCurve? ToLineCurve() => A.Call<IRhinoLineCurve>(() => _Instance as LineCurve);
|
||||
|
||||
public IRhinoNurbsCurve? ToNurbsCurveReflection() => A.Call<IRhinoNurbsCurve>(() => _Instance as NurbsCurve);
|
||||
}
|
||||
|
||||
[Proxy(typeof(GeometryBase), new[] { "Transform" })]
|
||||
public partial interface IRhinoGeometryBaseProxy : IRhinoGeometryBase;
|
||||
|
||||
@@ -249,7 +262,7 @@ public partial class BrepEdgeListProxy
|
||||
[Proxy(typeof(BrepEdge))]
|
||||
public partial interface IRhinoBrepEdgeProxy : IRhinoBrepEdge;
|
||||
|
||||
[Proxy(typeof(CurveProxy))]
|
||||
[Proxy(typeof(Rhino.Geometry.CurveProxy))]
|
||||
public partial interface IRhinoCurveProxy2Proxy : IRhinoCurveProxy2;
|
||||
|
||||
[Proxy(typeof(BrepTrimList), new[] { "AddSingularTrim", "GetEnumerator" })]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Speckle.Rhino7.Interfaces;
|
||||
|
||||
@@ -33,6 +33,11 @@ public interface IRhinoCurve : IRhinoGeometryBase
|
||||
int Degree { get; }
|
||||
bool IsPeriodic { get; }
|
||||
IRhinoCurve Trim(IRhinoInterval interval);
|
||||
IRhinoPolyCurve? ToPolyCurve();
|
||||
IRhinoArcCurve? ToArcCurve();
|
||||
IRhinoPolylineCurve? ToPolylineCurve();
|
||||
IRhinoLineCurve? ToLineCurve();
|
||||
IRhinoNurbsCurve? ToNurbsCurveReflection();
|
||||
}
|
||||
|
||||
public interface IRhinoGeometryBase : IRhinoCommonObject
|
||||
|
||||
@@ -123,6 +123,6 @@ Global
|
||||
{EB2B9350-BE2B-4197-ACA8-3963EAE3B6C9} = {BC12C4CA-7065-4B76-9787-E8DA4745AD4E}
|
||||
{5F678DE0-AAE7-4FA9-9A7F-C3C0B0E3E3D7} = {BC12C4CA-7065-4B76-9787-E8DA4745AD4E}
|
||||
{E1C43415-3200-45F4-8BF9-B4DD7D7F2ED6} = {3B0D8F6E-C701-446E-BAE3-B6FDF1812901}
|
||||
{E1C43415-3200-45F4-8BF9-A4DD7D7F2ED6} = {72DEFF6C-31DE-4050-8692-AEE8224E9925}
|
||||
{E1C43415-3200-45F4-8BF9-A4DD7D7F2ED6} = {8F540B7F-7548-46E9-BDEC-4DAB99367908}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Reference in New Issue
Block a user