Skip to content

Commit

Permalink
feat(dui3): adds comments/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
didimitrie committed Jun 17, 2024
1 parent 6ae0a3f commit bfd5d21
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Core/Core/Models/Instances/IInstanceComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Speckle.Core.Models.Instances;
public interface IInstanceComponent
{
/// <summary>
/// The maximum nesting depth at which this component (Instance or Instance Definition) was found.
/// The maximum "depth" at which this <see cref="InstanceProxy"/> or <see cref="InstanceDefinitionProxy"/> was found. It's important to get right: as instances can be composed of other instances, we need to start from the deepest instance elements first when reconstructing them, starting with definitions first.
/// </summary>
public int MaxDepth { get; set; }
}
7 changes: 7 additions & 0 deletions Core/Core/Models/Instances/InstanceDefinitionProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ namespace Speckle.Core.Models.Instances;
/// </summary>
public class InstanceDefinitionProxy : Base, IInstanceComponent
{
/// <summary>
/// The original ids of the objects that are part of this definition, as present in the source host app. On receive, they will be mapped to corresponding newly created definition ids.
/// </summary>
public List<string> Objects { get; set; } // source app application ids for the objects

/// <summary>
/// The maximum "depth" at which this instance was found. It's important to get right: as instances can be composed of other instances, we need to start from the deepest instance elements first when reconstructing them.
/// </summary>
public int MaxDepth { get; set; }
}
18 changes: 18 additions & 0 deletions Core/Core/Models/Instances/InstanceProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,28 @@

namespace Speckle.Core.Models.Instances;

/// <summary>
/// A proxy class for an instance (e.g, a rhino block, or an autocad block reference).
/// </summary>
public class InstanceProxy : Base, IInstanceComponent
{
/// <summary>
/// The definition id as present in the original host app. On receive, it will be mapped to the newly created definition id.
/// </summary>
public string DefinitionId { get; set; }

/// <summary>
/// The transform of the instance reference.
/// </summary>
public Matrix4x4 Transform { get; set; }

/// <summary>
/// The units of the host application file.
/// </summary>
public string Units { get; set; } = Kits.Units.Meters;

/// <summary>
/// The maximum "depth" at which this instance was found. It's important to get right: as instances can be composed of other instances, we need to start from the deepest instance elements first when reconstructing them.
/// </summary>
public int MaxDepth { get; set; }
}

0 comments on commit bfd5d21

Please sign in to comment.