@@ -74,6 +74,29 @@ public partial interface IRevitLocationCurveProxy : IRevitLocationCurve;
|
||||
[Proxy(typeof(Location), ImplementationOptions.UseExtendedInterfaces | ImplementationOptions.ProxyForBaseInterface)]
|
||||
public partial interface IRevitLocationProxy : IRevitLocation;
|
||||
|
||||
public partial class LocationProxy
|
||||
{
|
||||
public IRevitLocationCurve? ToLocationCurve()
|
||||
{
|
||||
if (_Instance is LocationCurve m)
|
||||
{
|
||||
return new LocationCurveProxy(m);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public IRevitLocationPoint? ToLocationPoint()
|
||||
{
|
||||
if (_Instance is LocationPoint m)
|
||||
{
|
||||
return new LocationPointProxy(m);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[Proxy(
|
||||
typeof(LocationPoint),
|
||||
ImplementationOptions.UseExtendedInterfaces | ImplementationOptions.ProxyForBaseInterface
|
||||
|
||||
@@ -218,6 +218,49 @@ public partial interface IRevitGroupProxy : IRevitGroup;
|
||||
)]
|
||||
public partial interface IRevitGeometryObjectProxy : IRevitGeometryObject;
|
||||
|
||||
public partial class GeometryObjectProxy
|
||||
{
|
||||
public IRevitSolid? ToSolid()
|
||||
{
|
||||
if (_Instance is Solid m)
|
||||
{
|
||||
return new SolidProxy(m);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public IRevitMesh? ToMesh()
|
||||
{
|
||||
if (_Instance is Mesh m)
|
||||
{
|
||||
return new MeshProxy(m);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public IRevitGeometryInstance? ToGeometryInstance()
|
||||
{
|
||||
if (_Instance is GeometryInstance m)
|
||||
{
|
||||
return new GeometryInstanceProxy(m);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public IRevitGeometryElement? ToGeometryElement()
|
||||
{
|
||||
if (_Instance is GeometryElement m)
|
||||
{
|
||||
return new GeometryElementProxy(m);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[Proxy(
|
||||
typeof(Options),
|
||||
ImplementationOptions.UseExtendedInterfaces | ImplementationOptions.ProxyForBaseInterface,
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
namespace Speckle.Revit.Interfaces;
|
||||
|
||||
public interface IRevitLocation : IRevitObject;
|
||||
public interface IRevitLocation : IRevitObject
|
||||
{
|
||||
IRevitLocationCurve? ToLocationCurve();
|
||||
IRevitLocationPoint? ToLocationPoint();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,10 @@ public interface IRevitPolyLine : IRevitGeometryObject
|
||||
public interface IRevitGeometryObject : IRevitObject
|
||||
{
|
||||
IRevitElementId GraphicsStyleId { get; }
|
||||
IRevitSolid? ToSolid();
|
||||
IRevitMesh? ToMesh();
|
||||
IRevitGeometryInstance? ToGeometryInstance();
|
||||
IRevitGeometryElement? ToGeometryElement();
|
||||
}
|
||||
|
||||
public interface IRevitPoint : IRevitObject
|
||||
|
||||
Reference in New Issue
Block a user