Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbols #147

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Speckle.Objects/Interfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ public interface ITransformable : ISpeckleObject
bool TransformTo(Transform transform, out ITransformable transformed);
}

/// <summary>
/// </summary>
public interface ISymbolLayer
{
string symbolUnits { get; set; }
LineType lineType { get; set; }
double lineWidth { get; set; }
int lineColor { get; set; }
int displayPriority { get; set; }
}

#endregion

#region GIS
Expand Down
25 changes: 25 additions & 0 deletions src/Speckle.Objects/Other/SymbolEnums.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace Speckle.Objects.Other;

public enum LineType
{
Solid,
Dashed,
Dotted,
}

public enum MarkerType
{
Simple,
}

public enum MarkerShape
{
Circle,
Square,
Cross,
}

public enum FillType
{
Simple,
}
46 changes: 46 additions & 0 deletions src/Speckle.Objects/Other/SymbolLayer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Speckle.Sdk.Models;

namespace Speckle.Objects.Other;

[SpeckleType("Objects.Other.Symbol")]
public class Symbol : Base
{
public List<ISymbolLayer> symbolLayers { get; set; }
}

[SpeckleType("Objects.Other.MarkerSymbolLayer")]
public class MarkerSymbolLayer : Base, ISymbolLayer
{
public string symbolUnits { get; set; }
public LineType lineType { get; set; }
public double lineWidth { get; set; }
public int lineColor { get; set; }
public int displayPriority { get; set; }

public double angle { get; set; }
public int fillColor { get; set; }
public MarkerType type { get; set; }
}

[SpeckleType("Objects.Other.LineSymbolLayer")]
public class LineSymbolLayer : Base, ISymbolLayer
{
public string symbolUnits { get; set; }
public LineType lineType { get; set; }
public double lineWidth { get; set; }
public int lineColor { get; set; }
public int displayPriority { get; set; }
}

[SpeckleType("Objects.Other.FillSymbolLayer")]
public class FillSymbolLayer : Base, ISymbolLayer
{
public string symbolUnits { get; set; }
public LineType lineType { get; set; }
public double lineWidth { get; set; }
public int lineColor { get; set; }
public int displayPriority { get; set; }

public int fillColor { get; set; }
public FillType type { get; set; }
}
Loading