Hi all, I recently started with Speckle and have built a Speckle kit for Civil3D (currently using v1). When I send native objects (like SpeckleLine) to Speckle, I’m able to see them in the 3D viewer. But when I create a new SpeckleObject inherited from a SpecklePolycurve, this object is not showed in the viewer. How can I tell the viewer to display the object?
This code defines the inherited object:
[Serializable]
public class Alignment: SpecklePolycurve
{
public Alignment()
{
}
public Alignment(string alignmentName,
List<SpeckleObject> alignmentSegments,
SpeckleNumber startStation,
double startParam,
double endParam,
bool closed,
string applicationId = null,
Dictionary<string, object> properties = null)
{
foreach (object segment in alignmentSegments)
{
if (segment.GetType() != typeof(SpeckleLine) &&
segment.GetType() != typeof(SpeckleArc) &&
segment.GetType() != typeof(AlignmentSegmentSpiral))
{
throw new ArgumentException("Only segments of type SpeckleLine, SpeckleArc or AlignmentSegmentSpiral are allowed.");
}
}
this.StartStation = startStation;
this.AlignmentName = alignmentName;
this.Segments = alignmentSegments;
this.Closed = closed;
this.ApplicationId = applicationId;
this.Properties = properties;
this.Domain = new SpeckleInterval(startParam, endParam);
}
public override string Type
{
get
{
return nameof(Alignment);
}
}
public string AlignmentName { get; set; }
public SpeckleNumber StartStation { get; set; }