-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(dui3): adds instance def and instance proxy classes to core * feat(dui3): rhino blocks send wip * feat(dui3): wip (works!) rhino blocks send & receive * some cleanup * wip fixes * wip cleanup * wip scaffolds acad * wip acad send instances and co * wip acad - getting close to wrapping up send * wip - units * feat(dui3): blocks poc wip: adds rhino layer manager, moves instance baking to instance manager, etc. * feat(dui3): blocks poc WIP - acad receive * wip acad instance receives * acad blocks - receive ok * feat(dui3): acad receive blocks ✅ more testing still needed! * feat(dui3): blocks poc minor refactors * feat(dui3): acad blocks proper cleanup * feat(dui3): blocks poc ready(ish) rhino & acad * chore(dui3): reverts accidental change * feat(dui3): adds comments/docs * chore(dui3): comments * fix(dui3): throws ex upwards * fix(dui3): blocks correctly handled in acad * update core reference and fix to not use interfaces * remove extra files --------- Co-authored-by: Adam Hathcock <[email protected]>
- Loading branch information
1 parent
e11bace
commit 0568a29
Showing
41 changed files
with
1,488 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Speckle.Core.Models.Instances; | ||
|
||
/// <summary> | ||
/// Abstracts over <see cref="InstanceProxy"/> and <see cref="InstanceDefinitionProxy"/> for sorting and grouping in receive operations. | ||
/// </summary> | ||
public interface IInstanceComponent | ||
{ | ||
/// <summary> | ||
/// The maximum "depth" at which this <see cref="InstanceProxy"/> or <see cref="InstanceDefinitionProxy"/> was found. On receive, 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; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Speckle.Core.Models.Instances; | ||
|
||
/// <summary> | ||
/// A proxy class for an instance definition. | ||
/// </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 | ||
|
||
public int MaxDepth { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.DoubleNumerics; | ||
|
||
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; | ||
|
||
public int MaxDepth { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.