adds archicad data object and interface
also removes unused gis classes
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Speckle.Objects.Geometry;
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a base class object in Archicad
|
||||
/// </summary>
|
||||
[SpeckleType("Objects.Data.ArchicadObject")]
|
||||
public class ArchicadObject : DataObject, IArchicadObject
|
||||
{
|
||||
public required string type { get; set; }
|
||||
|
||||
public required string level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The full classification tree path of an Archicad object
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The list order is from root to leaf of the classification tree
|
||||
/// </remarks>
|
||||
public required List<string> classification { get; set; }
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.CRS")]
|
||||
public class CRS : Base
|
||||
{
|
||||
public string? name { get; set; }
|
||||
public string? authority_id { get; set; }
|
||||
public string? wkt { get; set; }
|
||||
public string? units_native { get; set; }
|
||||
public float? offset_x { get; set; }
|
||||
public float? offset_y { get; set; }
|
||||
public float? rotation { get; set; }
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using Speckle.Objects.Geometry;
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.GisMultipatchFeature")]
|
||||
public class GisMultipatchFeature : Base, IGisFeature, IDisplayValue<List<Mesh>>
|
||||
{
|
||||
public required Base attributes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Multipatch geometry should be of type <see cref="GisMultipatchGeometry"/> or <see cref="PolygonGeometry3d"/>
|
||||
/// </summary>
|
||||
[DetachProperty]
|
||||
public required List<Base> geometry { get; set; }
|
||||
|
||||
[DetachProperty]
|
||||
public required List<Mesh> displayValue { get; set; }
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.GisMultipatchGeometry")]
|
||||
public class GisMultipatchGeometry : Base
|
||||
{
|
||||
public string units { get; set; }
|
||||
public List<int> faces { get; set; }
|
||||
public List<double> vertices { get; set; }
|
||||
public List<int>? colors { get; set; }
|
||||
|
||||
public GisMultipatchGeometry()
|
||||
{
|
||||
faces = new List<int>();
|
||||
vertices = new List<double>();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.GisNonGeometricFeature")]
|
||||
public class GisNonGeometricFeature : Base, IGisFeature
|
||||
{
|
||||
public required Base attributes { get; set; }
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using Speckle.Newtonsoft.Json;
|
||||
using Speckle.Objects.Geometry;
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.GisPointFeature")]
|
||||
public class GisPointFeature : Base, IGisFeature, IDisplayValue<List<Point>>
|
||||
{
|
||||
public required Base attributes { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public required List<Point> geometry
|
||||
{
|
||||
get => displayValue;
|
||||
set => displayValue = value;
|
||||
}
|
||||
|
||||
[DetachProperty]
|
||||
public List<Point> displayValue { get; set; }
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using Speckle.Objects.Geometry;
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.GisPolygonFeature")]
|
||||
public class GisPolygonFeature : Base, IGisFeature, IDisplayValue<List<Mesh>>
|
||||
{
|
||||
public required Base attributes { get; set; }
|
||||
|
||||
[DetachProperty]
|
||||
public required List<PolygonGeometry> geometry { get; set; }
|
||||
|
||||
[DetachProperty]
|
||||
public required List<Mesh> displayValue { get; set; }
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using Speckle.Newtonsoft.Json;
|
||||
using Speckle.Objects.Geometry;
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.GisPolylineFeature")]
|
||||
public class GisPolylineFeature : Base, IGisFeature, IDisplayValue<List<Polyline>>
|
||||
{
|
||||
public required Base attributes { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public required List<Polyline> geometry
|
||||
{
|
||||
get => displayValue;
|
||||
set => displayValue = value;
|
||||
}
|
||||
|
||||
[DetachProperty]
|
||||
public List<Polyline> displayValue { get; set; }
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using Speckle.Objects.Geometry;
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.PolygonGeometry")]
|
||||
public class PolygonGeometry : Base
|
||||
{
|
||||
public string units { get; set; }
|
||||
public Polyline boundary { get; set; }
|
||||
public List<Polyline> voids { get; set; }
|
||||
|
||||
public PolygonGeometry()
|
||||
{
|
||||
voids = new List<Polyline>();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.PolygonGeometry3d")]
|
||||
public class PolygonGeometry3d : PolygonGeometry { }
|
||||
@@ -1,52 +0,0 @@
|
||||
using Speckle.Objects.Geometry;
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.RasterElement")]
|
||||
public class RasterElement : Base
|
||||
{
|
||||
public int band_count { get; set; }
|
||||
public List<string> band_names { get; set; }
|
||||
public float x_origin { get; set; }
|
||||
public float y_origin { get; set; }
|
||||
public int x_size { get; set; }
|
||||
public int y_size { get; set; }
|
||||
public float x_resolution { get; set; }
|
||||
public float y_resolution { get; set; }
|
||||
public List<float?> noDataValue { get; set; }
|
||||
|
||||
[DetachProperty]
|
||||
public List<Mesh> displayValue { get; set; }
|
||||
|
||||
public RasterElement()
|
||||
{
|
||||
displayValue = new List<Mesh>();
|
||||
band_names = new List<string>();
|
||||
noDataValue = new List<float?>();
|
||||
}
|
||||
|
||||
public RasterElement(
|
||||
int bandCount,
|
||||
List<string> bandNames,
|
||||
float xOrigin,
|
||||
float yOrigin,
|
||||
int xSize,
|
||||
int ySize,
|
||||
float xResolution,
|
||||
float yResolution,
|
||||
List<float?> noDataValue
|
||||
)
|
||||
{
|
||||
displayValue = new List<Mesh>();
|
||||
band_count = bandCount;
|
||||
band_names = bandNames;
|
||||
x_origin = xOrigin;
|
||||
y_origin = yOrigin;
|
||||
x_size = xSize;
|
||||
y_size = ySize;
|
||||
x_resolution = xResolution;
|
||||
y_resolution = yResolution;
|
||||
this.noDataValue = noDataValue;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using Speckle.Sdk.Models;
|
||||
using Speckle.Sdk.Models.Collections;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.RasterLayer")]
|
||||
public class RasterLayer : Collection
|
||||
{
|
||||
public CRS? crs { get; set; }
|
||||
public string? units { get; set; }
|
||||
public CRS? rasterCrs { get; set; }
|
||||
public string? geomType { get; set; }
|
||||
public Dictionary<string, object>? renderer { get; set; }
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Speckle.Sdk.Models;
|
||||
using Speckle.Sdk.Models.Collections;
|
||||
|
||||
namespace Speckle.Objects.GIS;
|
||||
|
||||
[SpeckleType("Objects.GIS.VectorLayer")]
|
||||
public class VectorLayer : Collection
|
||||
{
|
||||
public CRS? crs { get; set; }
|
||||
public string? units { get; set; }
|
||||
public Base attributes { get; set; }
|
||||
public string? geomType { get; set; }
|
||||
public string? nativeGeomType { get; set; }
|
||||
public Dictionary<string, object>? renderer { get; set; }
|
||||
|
||||
public VectorLayer()
|
||||
{
|
||||
attributes = new Base();
|
||||
}
|
||||
}
|
||||
@@ -108,14 +108,6 @@ public interface IDisplayValue<out T> : ISpeckleObject
|
||||
|
||||
#endregion
|
||||
|
||||
#region GIS
|
||||
public interface IGisFeature : ISpeckleObject
|
||||
{
|
||||
Base attributes { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data objects
|
||||
|
||||
/// <summary>
|
||||
@@ -175,6 +167,15 @@ public interface IGisObject : IDataObject
|
||||
string type { get; }
|
||||
}
|
||||
|
||||
public interface IArchicadObject : IDataObject
|
||||
{
|
||||
string type { get; }
|
||||
|
||||
string level { get; }
|
||||
|
||||
List<string> classification { get; }
|
||||
}
|
||||
|
||||
public interface INavisworksObject : IDataObject { }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user