Skip to content

Commit

Permalink
Detach Levels (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-Morgan authored Sep 3, 2024
1 parent 77a40a3 commit b918002
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Area.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public Area(string name, string number, Level level, [SchemaMainParam] Point cen

public string name { get; set; }
public string number { get; set; }

[DetachProperty]
public Level level { get; set; }
public Point center { get; set; }
public List<ICurve> voids { get; set; } = new();
Expand Down
1 change: 1 addition & 0 deletions src/Speckle.Objects/BuiltElements/Revit/BuildingPad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class BuildingPad : Base, IDisplayValue<List<Mesh>>

public string type { get; set; }

[DetachProperty]
public Level level { get; set; }

public Base parameters { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/Curve/ModelCurves.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public RoomBoundaryLine([SchemaMainParam] ICurve baseCurve, List<Parameter>? par
public ICurve baseCurve { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }

[DetachProperty]
public Level level { get; set; }
public string units { get; set; }
}
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/FamilyInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public FamilyInstance(
public string family { get; set; }
public string type { get; set; }
public string category { get; set; }

[DetachProperty]
public Level level { get; set; }
public double rotation { get; set; }
public bool facingFlipped { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitBrace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public RevitBrace(
public string type { get; set; }
public Base? parameters { get; set; }
public string? elementId { get; set; }

[DetachProperty]
public Level? level { get; set; }

#region Schema Info Constructor
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitCableTray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public class RevitCableTray : CableTray, IHasMEPConnectors
{
public string family { get; set; }
public string type { get; set; }

[DetachProperty]
public Level level { get; set; }
public Base parameters { get; set; }
public string elementId { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitCeiling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public RevitCeiling(

public string family { get; set; }
public string type { get; set; }

[DetachProperty]
public Level level { get; set; }
public double slope { get; set; }
public Line? slopeDirection { get; set; }
Expand Down
1 change: 1 addition & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public RevitColumn(
this.parameters = parameters?.ToBase();
}

[DetachProperty]
public Level? topLevel { get; set; }
public double baseOffset { get; set; }
public double topOffset { get; set; }
Expand Down
1 change: 1 addition & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitConduit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class RevitConduit : Conduit, IHasMEPConnectors

public string type { get; set; }

[DetachProperty]
public Level level { get; set; }

public Base parameters { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitDuct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public RevitDuct(
public string type { get; set; }
public string systemName { get; set; }
public string systemType { get; set; }

[DetachProperty]
public Level level { get; set; }
public Base? parameters { get; set; }
public string? elementId { get; set; }
Expand Down
3 changes: 3 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitOpening.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public RevitShaft(
this.parameters = parameters?.ToBase();
}

[DetachProperty]
public Level bottomLevel { get; set; }

[DetachProperty]
public Level topLevel { get; set; }
public double height { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitPipe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public RevitPipe(
public string systemType { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }

[DetachProperty]
public Level level { get; set; }
public List<RevitMEPConnector> Connectors { get; set; } = new();
}
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitRailing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public RevitRailing(string type, [SchemaMainParam] Polycurve baseCurve, Level le

//public string family { get; set; }
public string type { get; set; }

[DetachProperty]
public Level level { get; set; }
public Polycurve path { get; set; }
public bool flipped { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitStair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ public class RevitStair : Base, IDisplayValue<List<Mesh>>
{
public string family { get; set; }
public string type { get; set; }

[DetachProperty]
public Level level { get; set; }

[DetachProperty]
public Level topLevel { get; set; }
public double riserHeight { get; set; }
public int risersNumber { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitToposolid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public RevitToposolid(

public string family { get; set; }
public string type { get; set; }

[DetachProperty]
public Level level { get; set; }
public Base? parameters { get; set; }
}
3 changes: 3 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitWall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public RevitWall(
public double topOffset { get; set; }
public bool flipped { get; set; }
public bool structural { get; set; }

[DetachProperty]
public Level? topLevel { get; set; }
public Base? parameters { get; set; }
public string? elementId { get; set; }
Expand Down Expand Up @@ -211,6 +213,7 @@ public RevitProfileWall(
public string type { get; set; }
public Polycurve profile { get; set; }

[DetachProperty]
public new Level? level
{
get => base.level;
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitWire.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public RevitWire(
public string wiringType { get; set; }
public List<double> constructionPoints { get; set; } // used in constructor for revit native wires
public string system { get; set; }

[DetachProperty]
public Level level { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
Expand Down
1 change: 1 addition & 0 deletions src/Speckle.Objects/BuiltElements/Revit/RevitZone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class RevitZone : Zone
{
public RevitZone() { }

[DetachProperty]
public Level level { get; set; }
public string phaseName { get; set; }
public Base parameters { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions src/Speckle.Objects/BuiltElements/Space.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ double baseOffset
public string name { get; set; }
public string number { get; set; }
public Point basePoint { get; set; }

[DetachProperty]
public Level level { get; set; }
public double baseOffset { get; set; }

[DetachProperty]
public Level topLevel { get; set; } // corresponds to UpperLimit property in Revit api
public double topOffset { get; set; } // corresponds to LimitOffset property in Revit api
public List<ICurve> voids { get; set; } = new();
Expand Down
2 changes: 2 additions & 0 deletions src/Speckle.Objects/BuiltElements/Wall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public Wall(

public string? units { get; set; }
public ICurve baseLine { get; set; }

[DetachProperty]
public virtual Level? level { get; internal set; }

[DetachProperty]
Expand Down
1 change: 1 addition & 0 deletions src/Speckle.Objects/Other/Revit/RevitInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Speckle.Objects.Other.Revit;
[SpeckleType("Objects.Other.Revit.RevitInstance")]
public class RevitInstance : Instance<RevitSymbolElementType>
{
[DetachProperty]
public Level level { get; set; }
public bool facingFlipped { get; set; }
public bool handFlipped { get; set; }
Expand Down

0 comments on commit b918002

Please sign in to comment.