diff --git a/ConnectorCSI/ConnectorETABS/ConnectorETABS.csproj b/ConnectorCSI/ConnectorETABS/ConnectorETABS.csproj
index 2e5ab85adc..8c7a43b05e 100644
--- a/ConnectorCSI/ConnectorETABS/ConnectorETABS.csproj
+++ b/ConnectorCSI/ConnectorETABS/ConnectorETABS.csproj
@@ -32,4 +32,4 @@
-
\ No newline at end of file
+
diff --git a/ConnectorGrasshopper/ConnectorGrasshopperShared/SchemaBuilder/SchemaBuilderGen.cs b/ConnectorGrasshopper/ConnectorGrasshopperShared/SchemaBuilder/SchemaBuilderGen.cs
index a7ada035e7..11aa00f1d2 100644
--- a/ConnectorGrasshopper/ConnectorGrasshopperShared/SchemaBuilder/SchemaBuilderGen.cs
+++ b/ConnectorGrasshopper/ConnectorGrasshopperShared/SchemaBuilder/SchemaBuilderGen.cs
@@ -1,8 +1,8 @@
-using System;
+using System;
using System.Linq;
-using ConnectorGrasshopperUtils;
-using Grasshopper;
using Grasshopper.Kernel;
+using Grasshopper;
+using ConnectorGrasshopperUtils;
namespace ConnectorGrasshopper;
@@ -59,9 +59,9 @@ public override void AddedToDocument(GH_Document document)
}
// This is generated code:
-public class AdvanceSteelBeamSchemaComponent : CreateSchemaObjectBase
+public class AngleSchemaComponent : CreateSchemaObjectBase
{
- static AdvanceSteelBeamSchemaComponent()
+ static AngleSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -80,18 +80,18 @@ static AdvanceSteelBeamSchemaComponent()
};
}
- public AdvanceSteelBeamSchemaComponent()
+ public AngleSchemaComponent()
: base(
- "AdvanceSteelBeam",
- "AdvanceSteelBeam",
- "Creates a Advance Steel beam by curve.",
- "Speckle 2 Advance Steel",
- "Structure"
+ "Angle",
+ "Angle",
+ "Creates a Speckle structural angle section profile",
+ "Speckle 2 Structural",
+ "Section Profile"
) { }
- internal static string internalCategory { get; } = "Speckle 2 Advance Steel";
+ internal static string internalCategory { get; } = "Speckle 2 Structural";
- internal static Guid internalGuid => new("bc7e258d-7e41-97cf-86d4-59bf3312ea52");
+ internal static Guid internalGuid => new("91df837b-3162-a0de-724d-ea182e77e68c");
public override GH_Exposure Exposure => internalExposure;
@@ -103,17 +103,17 @@ public AdvanceSteelBeamSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelBeam.ctor(Objects.ICurve,Objects.Structural.Properties.Profiles.SectionProfile,Objects.Structural.Materials.StructuralMaterial)",
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelBeam"
+ "Objects.Structural.Properties.Profiles.Angle.ctor(System.String,System.Double,System.Double,System.Double,System.Double)",
+ "Objects.Structural.Properties.Profiles.Angle"
);
base.AddedToDocument(document);
}
}
// This is generated code:
-public class AdvanceSteelCircularBoltSchemaComponent : CreateSchemaObjectBase
+public class ArchicadBeamSchemaComponent : CreateSchemaObjectBase
{
- static AdvanceSteelCircularBoltSchemaComponent()
+ static ArchicadBeamSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -132,18 +132,12 @@ static AdvanceSteelCircularBoltSchemaComponent()
};
}
- public AdvanceSteelCircularBoltSchemaComponent()
- : base(
- "AdvanceSteelCircularBolt",
- "AdvanceSteelCircularBolt",
- "Creates a Advance Steel circular bolt.",
- "Speckle 2 Advance Steel",
- "Structure"
- ) { }
+ public ArchicadBeamSchemaComponent()
+ : base("ArchicadBeam", "ArchicadBeam", "Creates an Archicad beam by curve.", "Speckle 2 Archicad", "Structure") { }
- internal static string internalCategory { get; } = "Speckle 2 Advance Steel";
+ internal static string internalCategory { get; } = "Speckle 2 Archicad";
- internal static Guid internalGuid => new("2882d168-7e7c-5090-be24-e70091521c1f");
+ internal static Guid internalGuid => new("73860182-c94b-d570-f568-1ab73eec8bfd");
public override GH_Exposure Exposure => internalExposure;
@@ -155,17 +149,17 @@ public AdvanceSteelCircularBoltSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelCircularBolt.ctor",
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelCircularBolt"
+ "Objects.BuiltElements.Archicad.ArchicadBeam.ctor",
+ "Objects.BuiltElements.Archicad.ArchicadBeam"
);
base.AddedToDocument(document);
}
}
// This is generated code:
-public class AdvanceSteelPlateSchemaComponent : CreateSchemaObjectBase
+public class ArchicadColumnSchemaComponent : CreateSchemaObjectBase
{
- static AdvanceSteelPlateSchemaComponent()
+ static ArchicadColumnSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -184,18 +178,18 @@ static AdvanceSteelPlateSchemaComponent()
};
}
- public AdvanceSteelPlateSchemaComponent()
+ public ArchicadColumnSchemaComponent()
: base(
- "AdvanceSteelPlate",
- "AdvanceSteelPlate",
- "Creates a Advance Steel plate.",
- "Speckle 2 Advance Steel",
+ "ArchicadColumn",
+ "ArchicadColumn",
+ "Creates an Archicad Column by curve.",
+ "Speckle 2 Archicad",
"Structure"
) { }
- internal static string internalCategory { get; } = "Speckle 2 Advance Steel";
+ internal static string internalCategory { get; } = "Speckle 2 Archicad";
- internal static Guid internalGuid => new("6cf1d0a8-d647-1ccc-f5b5-51e2f185eaee");
+ internal static Guid internalGuid => new("c69190c1-3311-5407-4a00-e58ea275fa89");
public override GH_Exposure Exposure => internalExposure;
@@ -207,17 +201,17 @@ public AdvanceSteelPlateSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelPlate.ctor(Objects.Structural.Properties.Profiles.SectionProfile,Objects.Geometry.Polyline,System.String,Objects.Structural.Materials.StructuralMaterial)",
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelPlate"
+ "Objects.BuiltElements.Archicad.ArchicadColumn.ctor",
+ "Objects.BuiltElements.Archicad.ArchicadColumn"
);
base.AddedToDocument(document);
}
}
// This is generated code:
-public class AdvanceSteelRectangularBoltSchemaComponent : CreateSchemaObjectBase
+public class ArchicadOpeningSchemaComponent : CreateSchemaObjectBase
{
- static AdvanceSteelRectangularBoltSchemaComponent()
+ static ArchicadOpeningSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -236,18 +230,12 @@ static AdvanceSteelRectangularBoltSchemaComponent()
};
}
- public AdvanceSteelRectangularBoltSchemaComponent()
- : base(
- "AdvanceSteelRectangularBolt",
- "AdvanceSteelRectangularBolt",
- "Creates a Advance Steel rectangular bolt.",
- "Speckle 2 Advance Steel",
- "Structure"
- ) { }
+ public ArchicadOpeningSchemaComponent()
+ : base("ArchicadOpening", "ArchicadOpening", "Creates an Archicad opening.", "Speckle 2 Archicad", "Structure") { }
- internal static string internalCategory { get; } = "Speckle 2 Advance Steel";
+ internal static string internalCategory { get; } = "Speckle 2 Archicad";
- internal static Guid internalGuid => new("f6791563-253b-9232-f611-bf6249626a34");
+ internal static Guid internalGuid => new("70567e1e-5156-d888-febb-fb5bf9f16515");
public override GH_Exposure Exposure => internalExposure;
@@ -259,17 +247,17 @@ public AdvanceSteelRectangularBoltSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelRectangularBolt.ctor",
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelRectangularBolt"
+ "Objects.BuiltElements.Archicad.ArchicadOpening.ctor",
+ "Objects.BuiltElements.Archicad.ArchicadOpening"
);
base.AddedToDocument(document);
}
}
// This is generated code:
-public class AdvanceSteelSpecialPartSchemaComponent : CreateSchemaObjectBase
+public class ArchicadWallSchemaComponent : CreateSchemaObjectBase
{
- static AdvanceSteelSpecialPartSchemaComponent()
+ static ArchicadWallSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -288,18 +276,12 @@ static AdvanceSteelSpecialPartSchemaComponent()
};
}
- public AdvanceSteelSpecialPartSchemaComponent()
- : base(
- "AdvanceSteelSpecialPart",
- "AdvanceSteelSpecialPart",
- "Creates a Advance Steel special part.",
- "Speckle 2 Advance Steel",
- "Structure"
- ) { }
+ public ArchicadWallSchemaComponent()
+ : base("ArchicadWall", "ArchicadWall", "Creates an Archicad wall.", "Speckle 2 Archicad", "Structure") { }
- internal static string internalCategory { get; } = "Speckle 2 Advance Steel";
+ internal static string internalCategory { get; } = "Speckle 2 Archicad";
- internal static Guid internalGuid => new("c93ed779-6784-00a3-d834-951108a361af");
+ internal static Guid internalGuid => new("241e7c68-a688-47f3-c541-d2585517fd71");
public override GH_Exposure Exposure => internalExposure;
@@ -311,17 +293,17 @@ public AdvanceSteelSpecialPartSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelSpecialPart.ctor",
- "Objects.BuiltElements.AdvanceSteel.AdvanceSteelSpecialPart"
+ "Objects.BuiltElements.Archicad.ArchicadWall.ctor",
+ "Objects.BuiltElements.Archicad.ArchicadWall"
);
base.AddedToDocument(document);
}
}
// This is generated code:
-public class AngleSchemaComponent : CreateSchemaObjectBase
+public class AreaSchemaComponent : CreateSchemaObjectBase
{
- static AngleSchemaComponent()
+ static AreaSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -340,18 +322,12 @@ static AngleSchemaComponent()
};
}
- public AngleSchemaComponent()
- : base(
- "Angle",
- "Angle",
- "Creates a Speckle structural angle section profile",
- "Speckle 2 Structural",
- "Section Profile"
- ) { }
+ public AreaSchemaComponent()
+ : base("Area", "Area", "Creates a Speckle area", "Speckle 2 BIM", "Other") { }
- internal static string internalCategory { get; } = "Speckle 2 Structural";
+ internal static string internalCategory { get; } = "Speckle 2 BIM";
- internal static Guid internalGuid => new("91df837b-3162-a0de-724d-ea182e77e68c");
+ internal static Guid internalGuid => new("b98bd134-1ebd-b805-821c-465f1a25fb4e");
public override GH_Exposure Exposure => internalExposure;
@@ -363,17 +339,17 @@ public AngleSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.Structural.Properties.Profiles.Angle.ctor(System.String,System.Double,System.Double,System.Double,System.Double)",
- "Objects.Structural.Properties.Profiles.Angle"
+ "Objects.BuiltElements.Area.ctor(System.String,System.String,Objects.BuiltElements.Level,Objects.Geometry.Point)",
+ "Objects.BuiltElements.Area"
);
base.AddedToDocument(document);
}
}
// This is generated code:
-public class ArchicadBeamSchemaComponent : CreateSchemaObjectBase
+public class AsteelBeamSchemaComponent : CreateSchemaObjectBase
{
- static ArchicadBeamSchemaComponent()
+ static AsteelBeamSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -392,12 +368,13 @@ static ArchicadBeamSchemaComponent()
};
}
- public ArchicadBeamSchemaComponent()
- : base("ArchicadBeam", "ArchicadBeam", "Creates an Archicad beam by curve.", "Speckle 2 Archicad", "Structure") { }
+ public AsteelBeamSchemaComponent()
+ : base("AsteelBeam", "AsteelBeam", "Creates a Advance Steel beam by curve.", "Speckle 2 Advance Steel", "Structure")
+ { }
- internal static string internalCategory { get; } = "Speckle 2 Archicad";
+ internal static string internalCategory { get; } = "Speckle 2 Advance Steel";
- internal static Guid internalGuid => new("73860182-c94b-d570-f568-1ab73eec8bfd");
+ internal static Guid internalGuid => new("74818c4c-2d7a-c317-2333-4c051a091c84");
public override GH_Exposure Exposure => internalExposure;
@@ -409,17 +386,17 @@ public ArchicadBeamSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.Archicad.ArchicadBeam.ctor(Objects.Geometry.Point,Objects.Geometry.Point)",
- "Objects.BuiltElements.Archicad.ArchicadBeam"
+ "Objects.BuiltElements.AdvanceSteel.AsteelBeam.ctor(Objects.ICurve,Objects.Structural.Properties.Profiles.SectionProfile,Objects.Structural.Materials.StructuralMaterial)",
+ "Objects.BuiltElements.AdvanceSteel.AsteelBeam"
);
base.AddedToDocument(document);
}
}
// This is generated code:
-public class ArchicadColumnSchemaComponent : CreateSchemaObjectBase
+public class AsteelPlateSchemaComponent : CreateSchemaObjectBase
{
- static ArchicadColumnSchemaComponent()
+ static AsteelPlateSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -438,18 +415,12 @@ static ArchicadColumnSchemaComponent()
};
}
- public ArchicadColumnSchemaComponent()
- : base(
- "ArchicadColumn",
- "ArchicadColumn",
- "Creates an Archicad Column by curve.",
- "Speckle 2 Archicad",
- "Structure"
- ) { }
+ public AsteelPlateSchemaComponent()
+ : base("AsteelPlate", "AsteelPlate", "Creates a Advance Steel plate.", "Speckle 2 Advance Steel", "Structure") { }
- internal static string internalCategory { get; } = "Speckle 2 Archicad";
+ internal static string internalCategory { get; } = "Speckle 2 Advance Steel";
- internal static Guid internalGuid => new("c69190c1-3311-5407-4a00-e58ea275fa89");
+ internal static Guid internalGuid => new("0ee1f665-ad53-c1d8-c25b-a6108141358a");
public override GH_Exposure Exposure => internalExposure;
@@ -461,17 +432,17 @@ public ArchicadColumnSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.Archicad.ArchicadColumn.ctor(Objects.Geometry.Point,System.Double)",
- "Objects.BuiltElements.Archicad.ArchicadColumn"
+ "Objects.BuiltElements.AdvanceSteel.AsteelPlate.ctor(Objects.Geometry.Polyline,System.String,Objects.Structural.Materials.StructuralMaterial)",
+ "Objects.BuiltElements.AdvanceSteel.AsteelPlate"
);
base.AddedToDocument(document);
}
}
// This is generated code:
-public class AreaSchemaComponent : CreateSchemaObjectBase
+public class AsteelSlabSchemaComponent : CreateSchemaObjectBase
{
- static AreaSchemaComponent()
+ static AsteelSlabSchemaComponent()
{
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
@@ -490,12 +461,12 @@ static AreaSchemaComponent()
};
}
- public AreaSchemaComponent()
- : base("Area", "Area", "Creates a Speckle area", "Speckle 2 BIM", "Other") { }
+ public AsteelSlabSchemaComponent()
+ : base("AsteelSlab", "AsteelSlab", "Creates a Advance Steel slab.", "Speckle 2 Advance Steel", "Structure") { }
- internal static string internalCategory { get; } = "Speckle 2 BIM";
+ internal static string internalCategory { get; } = "Speckle 2 Advance Steel";
- internal static Guid internalGuid => new("b98bd134-1ebd-b805-821c-465f1a25fb4e");
+ internal static Guid internalGuid => new("c3ce3b39-83ba-6541-d9d7-b3db39157cd0");
public override GH_Exposure Exposure => internalExposure;
@@ -507,8 +478,8 @@ public AreaSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.Area.ctor(System.String,System.String,Objects.BuiltElements.Level,Objects.Geometry.Point)",
- "Objects.BuiltElements.Area"
+ "Objects.BuiltElements.AdvanceSteel.AsteelSlab.ctor(Objects.Geometry.Polyline,System.String,Objects.Structural.Materials.StructuralMaterial)",
+ "Objects.BuiltElements.AdvanceSteel.AsteelSlab"
);
base.AddedToDocument(document);
}
@@ -1004,6 +975,52 @@ public override void AddedToDocument(GH_Document document)
}
}
+// This is generated code:
+public class ClassificationSchemaComponent : CreateSchemaObjectBase
+{
+ static ClassificationSchemaComponent()
+ {
+ SpeckleGHSettings.SettingsChanged += (_, args) =>
+ {
+ if (!args.Key.StartsWith("Speckle2:tabs."))
+ {
+ return;
+ }
+
+ var proxy = Instances.ComponentServer.ObjectProxies.FirstOrDefault(p => p.Guid == internalGuid);
+ if (proxy == null)
+ {
+ return;
+ }
+
+ proxy.Exposure = internalExposure;
+ };
+ }
+
+ public ClassificationSchemaComponent()
+ : base("Classification", "Classification", "A classification to set on an element", "Speckle 2 BIM", "All") { }
+
+ internal static string internalCategory { get; } = "Speckle 2 BIM";
+
+ internal static Guid internalGuid => new("0150e2ad-6fab-64ef-3b06-6bec8da14a2b");
+
+ public override GH_Exposure Exposure => internalExposure;
+
+ public override Guid ComponentGuid => internalGuid;
+
+ internal static GH_Exposure internalExposure =>
+ SpeckleGHSettings.GetTabVisibility(internalCategory) ? GH_Exposure.tertiary : GH_Exposure.hidden;
+
+ public override void AddedToDocument(GH_Document document)
+ {
+ SelectedConstructor = CSOUtils.FindConstructor(
+ "Objects.BuiltElements.Archicad.Classification.ctor(System.String,System.String,System.String)",
+ "Objects.BuiltElements.Archicad.Classification"
+ );
+ base.AddedToDocument(document);
+ }
+}
+
// This is generated code:
public class ColumnSchemaComponent : CreateSchemaObjectBase
{
@@ -1035,6 +1052,57 @@ public ColumnSchemaComponent()
public override GH_Exposure Exposure => internalExposure;
+ public override Guid ComponentGuid => internalGuid;
+ public override bool Obsolete => true;
+ internal static GH_Exposure internalExposure => GH_Exposure.hidden;
+
+ public override void AddedToDocument(GH_Document document)
+ {
+ SelectedConstructor = CSOUtils.FindConstructor(
+ "Objects.BuiltElements.Column.ctor(Objects.ICurve)",
+ "Objects.BuiltElements.Column"
+ );
+ base.AddedToDocument(document);
+ }
+}
+
+// This is generated code:
+public class ComponentPropertiesSchemaComponent : CreateSchemaObjectBase
+{
+ static ComponentPropertiesSchemaComponent()
+ {
+ SpeckleGHSettings.SettingsChanged += (_, args) =>
+ {
+ if (!args.Key.StartsWith("Speckle2:tabs."))
+ {
+ return;
+ }
+
+ var proxy = Instances.ComponentServer.ObjectProxies.FirstOrDefault(p => p.Guid == internalGuid);
+ if (proxy == null)
+ {
+ return;
+ }
+
+ proxy.Exposure = internalExposure;
+ };
+ }
+
+ public ComponentPropertiesSchemaComponent()
+ : base(
+ "ComponentProperties",
+ "ComponentProperties",
+ "An Archicad element component properties",
+ "Speckle 2 Archicad",
+ "Elements"
+ ) { }
+
+ internal static string internalCategory { get; } = "Speckle 2 Archicad";
+
+ internal static Guid internalGuid => new("2b011158-561b-3286-017c-91b9d35ee2c1");
+
+ public override GH_Exposure Exposure => internalExposure;
+
public override Guid ComponentGuid => internalGuid;
internal static GH_Exposure internalExposure =>
@@ -1043,8 +1111,8 @@ public ColumnSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.BuiltElements.Column.ctor(Objects.ICurve)",
- "Objects.BuiltElements.Column"
+ "Objects.BuiltElements.Archicad.ComponentProperties.ctor(System.String,System.Collections.Generic.List`1[Objects.BuiltElements.Archicad.PropertyGroup],System.String)",
+ "Objects.BuiltElements.Archicad.ComponentProperties"
);
base.AddedToDocument(document);
}
@@ -1232,9 +1300,8 @@ public CSIElement1DSchemaComponent()
public override GH_Exposure Exposure => internalExposure;
public override Guid ComponentGuid => internalGuid;
-
- internal static GH_Exposure internalExposure =>
- SpeckleGHSettings.GetTabVisibility(internalCategory) ? GH_Exposure.tertiary : GH_Exposure.hidden;
+ public override bool Obsolete => true;
+ internal static GH_Exposure internalExposure => GH_Exposure.hidden;
public override void AddedToDocument(GH_Document document)
{
@@ -1291,7 +1358,59 @@ public CSIElement1D1SchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.Structural.CSI.Geometry.CSIElement1D.ctor(Objects.Geometry.Line,Objects.Structural.Properties.Property1D,Objects.Structural.Geometry.ElementType1D,System.String,Objects.Structural.Geometry.Restraint,Objects.Structural.Geometry.Restraint,Objects.Geometry.Vector,Objects.Geometry.Vector,Objects.Structural.Geometry.Node,System.Double,Objects.Structural.CSI.Properties.CSILinearSpring,System.Double[],Objects.Structural.CSI.Properties.DesignProcedure)",
+ "Objects.Structural.CSI.Geometry.CSIElement1D.ctor(Objects.Geometry.Line,Objects.Structural.Properties.Property1D,Objects.Structural.Geometry.ElementType1D,System.String,Objects.Structural.Geometry.Restraint,Objects.Structural.Geometry.Restraint,Objects.Geometry.Vector,Objects.Geometry.Vector,Objects.Structural.Geometry.Node,System.Double,Objects.Structural.CSI.Properties.CSILinearSpring,System.Collections.Generic.List`1[System.Double],Objects.Structural.CSI.Properties.DesignProcedure)",
+ "Objects.Structural.CSI.Geometry.CSIElement1D"
+ );
+ base.AddedToDocument(document);
+ }
+}
+
+// This is generated code:
+public class CSIElement1D2SchemaComponent : CreateSchemaObjectBase
+{
+ static CSIElement1D2SchemaComponent()
+ {
+ SpeckleGHSettings.SettingsChanged += (_, args) =>
+ {
+ if (!args.Key.StartsWith("Speckle2:tabs."))
+ {
+ return;
+ }
+
+ var proxy = Instances.ComponentServer.ObjectProxies.FirstOrDefault(p => p.Guid == internalGuid);
+ if (proxy == null)
+ {
+ return;
+ }
+
+ proxy.Exposure = internalExposure;
+ };
+ }
+
+ public CSIElement1D2SchemaComponent()
+ : base(
+ "Element1D (from local axis)",
+ "Element1D (from local axis)",
+ "Creates a Speckle CSI 1D element (from local axis)",
+ "Speckle 2 CSI",
+ "Geometry"
+ ) { }
+
+ internal static string internalCategory { get; } = "Speckle 2 CSI";
+
+ internal static Guid internalGuid => new("438e6adb-2015-952d-4470-7a7c493bafb8");
+
+ public override GH_Exposure Exposure => internalExposure;
+
+ public override Guid ComponentGuid => internalGuid;
+
+ internal static GH_Exposure internalExposure =>
+ SpeckleGHSettings.GetTabVisibility(internalCategory) ? GH_Exposure.tertiary : GH_Exposure.hidden;
+
+ public override void AddedToDocument(GH_Document document)
+ {
+ SelectedConstructor = CSOUtils.FindConstructor(
+ "Objects.Structural.CSI.Geometry.CSIElement1D.ctor(Objects.Geometry.Line,Objects.Structural.Properties.Property1D,Objects.Structural.Geometry.ElementType1D,System.String,Objects.Structural.Geometry.Restraint,Objects.Structural.Geometry.Restraint,Objects.Geometry.Vector,Objects.Geometry.Vector,Objects.Geometry.Plane,Objects.Structural.CSI.Properties.CSILinearSpring,System.Collections.Generic.List`1[System.Double],Objects.Structural.CSI.Properties.DesignProcedure)",
"Objects.Structural.CSI.Geometry.CSIElement1D"
);
base.AddedToDocument(document);
@@ -1335,6 +1454,57 @@ public CSIElement2DSchemaComponent()
public override GH_Exposure Exposure => internalExposure;
+ public override Guid ComponentGuid => internalGuid;
+ public override bool Obsolete => true;
+ internal static GH_Exposure internalExposure => GH_Exposure.hidden;
+
+ public override void AddedToDocument(GH_Document document)
+ {
+ SelectedConstructor = CSOUtils.FindConstructor(
+ "Objects.Structural.CSI.Geometry.CSIElement2D.ctor(System.Collections.Generic.List`1[Objects.Structural.Geometry.Node],Objects.Structural.Properties.Property2D,System.Double,System.Double,System.Double[],Objects.Structural.CSI.Properties.CSIAreaSpring,Objects.Structural.CSI.Properties.CSIDiaphragm)",
+ "Objects.Structural.CSI.Geometry.CSIElement2D"
+ );
+ base.AddedToDocument(document);
+ }
+}
+
+// This is generated code:
+public class CSIElement2D1SchemaComponent : CreateSchemaObjectBase
+{
+ static CSIElement2D1SchemaComponent()
+ {
+ SpeckleGHSettings.SettingsChanged += (_, args) =>
+ {
+ if (!args.Key.StartsWith("Speckle2:tabs."))
+ {
+ return;
+ }
+
+ var proxy = Instances.ComponentServer.ObjectProxies.FirstOrDefault(p => p.Guid == internalGuid);
+ if (proxy == null)
+ {
+ return;
+ }
+
+ proxy.Exposure = internalExposure;
+ };
+ }
+
+ public CSIElement2D1SchemaComponent()
+ : base(
+ "Element2D",
+ "Element2D",
+ "Creates a Speckle CSI 2D element (based on a list of edge ie. external, geometry defining nodes)",
+ "Speckle 2 CSI",
+ "Geometry"
+ ) { }
+
+ internal static string internalCategory { get; } = "Speckle 2 CSI";
+
+ internal static Guid internalGuid => new("abcdbcdf-302e-73c7-743a-05c88c56ef92");
+
+ public override GH_Exposure Exposure => internalExposure;
+
public override Guid ComponentGuid => internalGuid;
internal static GH_Exposure internalExposure =>
@@ -1343,7 +1513,7 @@ public CSIElement2DSchemaComponent()
public override void AddedToDocument(GH_Document document)
{
SelectedConstructor = CSOUtils.FindConstructor(
- "Objects.Structural.CSI.Geometry.CSIElement2D.ctor(System.Collections.Generic.List`1[Objects.Structural.Geometry.Node],Objects.Structural.Properties.Property2D,System.Double,System.Double,System.Double[],Objects.Structural.CSI.Properties.CSIAreaSpring,Objects.Structural.CSI.Properties.CSIDiaphragm)",
+ "Objects.Structural.CSI.Geometry.CSIElement2D.ctor(System.Collections.Generic.List`1[Objects.Structural.Geometry.Node],Objects.Structural.Properties.Property2D,System.Double,System.Double,System.Collections.Generic.List`1[System.Double],Objects.Structural.CSI.Properties.CSIAreaSpring,Objects.Structural.CSI.Properties.CSIDiaphragm)",
"Objects.Structural.CSI.Geometry.CSIElement2D"
);
base.AddedToDocument(document);
@@ -6407,6 +6577,52 @@ public override void AddedToDocument(GH_Document document)
}
}
+// This is generated code:
+public class PropertyGroupSchemaComponent : CreateSchemaObjectBase
+{
+ static PropertyGroupSchemaComponent()
+ {
+ SpeckleGHSettings.SettingsChanged += (_, args) =>
+ {
+ if (!args.Key.StartsWith("Speckle2:tabs."))
+ {
+ return;
+ }
+
+ var proxy = Instances.ComponentServer.ObjectProxies.FirstOrDefault(p => p.Guid == internalGuid);
+ if (proxy == null)
+ {
+ return;
+ }
+
+ proxy.Exposure = internalExposure;
+ };
+ }
+
+ public PropertyGroupSchemaComponent()
+ : base("PropertyGroup", "PropertyGroup", "An Archicad element property group", "Speckle 2 Archicad", "Elements") { }
+
+ internal static string internalCategory { get; } = "Speckle 2 Archicad";
+
+ internal static Guid internalGuid => new("ae3b54eb-83fe-73e9-bea7-ff508581e266");
+
+ public override GH_Exposure Exposure => internalExposure;
+
+ public override Guid ComponentGuid => internalGuid;
+
+ internal static GH_Exposure internalExposure =>
+ SpeckleGHSettings.GetTabVisibility(internalCategory) ? GH_Exposure.tertiary : GH_Exposure.hidden;
+
+ public override void AddedToDocument(GH_Document document)
+ {
+ SelectedConstructor = CSOUtils.FindConstructor(
+ "Objects.BuiltElements.Archicad.PropertyGroup.ctor(System.String,System.Collections.Generic.List`1[Objects.BuiltElements.Archicad.Property],System.String)",
+ "Objects.BuiltElements.Archicad.PropertyGroup"
+ );
+ base.AddedToDocument(document);
+ }
+}
+
// This is generated code:
public class PropertyMassSchemaComponent : CreateSchemaObjectBase
{
@@ -8064,7 +8280,7 @@ static RevitDuctSchemaComponent()
}
public RevitDuctSchemaComponent()
- : base("RevitDuct", "RevitDuct", "Creates a Revit duct", "Speckle 2 Revit", "MEP") { }
+ : base("RevitDuct (DEPRECATED)", "RevitDuct (DEPRECATED)", "Creates a Revit duct", "Speckle 2 Revit", "MEP") { }
internal static string internalCategory { get; } = "Speckle 2 Revit";
@@ -8819,6 +9035,52 @@ public override void AddedToDocument(GH_Document document)
}
}
+// This is generated code:
+public class RevitToposolidSchemaComponent : CreateSchemaObjectBase
+{
+ static RevitToposolidSchemaComponent()
+ {
+ SpeckleGHSettings.SettingsChanged += (_, args) =>
+ {
+ if (!args.Key.StartsWith("Speckle2:tabs."))
+ {
+ return;
+ }
+
+ var proxy = Instances.ComponentServer.ObjectProxies.FirstOrDefault(p => p.Guid == internalGuid);
+ if (proxy == null)
+ {
+ return;
+ }
+
+ proxy.Exposure = internalExposure;
+ };
+ }
+
+ public RevitToposolidSchemaComponent()
+ : base("RevitToposolid", "RevitToposolid", "Creates a Revit Toposolid", "Speckle 2 Revit", "Architecture") { }
+
+ internal static string internalCategory { get; } = "Speckle 2 Revit";
+
+ internal static Guid internalGuid => new("557b4a20-4ebd-3aa5-08f9-58a4c4c0d080");
+
+ public override GH_Exposure Exposure => internalExposure;
+
+ public override Guid ComponentGuid => internalGuid;
+
+ internal static GH_Exposure internalExposure =>
+ SpeckleGHSettings.GetTabVisibility(internalCategory) ? GH_Exposure.tertiary : GH_Exposure.hidden;
+
+ public override void AddedToDocument(GH_Document document)
+ {
+ SelectedConstructor = CSOUtils.FindConstructor(
+ "Objects.BuiltElements.Revit.RevitToposolid.ctor(Objects.BuiltElements.Level,System.Collections.Generic.List`1[Objects.Geometry.Polycurve],System.Collections.Generic.List`1[Objects.Geometry.Point],System.Collections.Generic.List`1[Speckle.Core.Models.Base],System.Collections.Generic.List`1[Objects.BuiltElements.Revit.Parameter])",
+ "Objects.BuiltElements.Revit.RevitToposolid"
+ );
+ base.AddedToDocument(document);
+ }
+}
+
// This is generated code:
public class RevitWallSchemaComponent : CreateSchemaObjectBase
{
diff --git a/ConnectorGrasshopper/ConnectorGrasshopperShared/SchemaBuilder/SchemaBuilderGen.tt b/ConnectorGrasshopper/ConnectorGrasshopperShared/SchemaBuilder/SchemaBuilderGen.tt
index 55816b3678..9229b533bc 100644
--- a/ConnectorGrasshopper/ConnectorGrasshopperShared/SchemaBuilder/SchemaBuilderGen.tt
+++ b/ConnectorGrasshopper/ConnectorGrasshopperShared/SchemaBuilder/SchemaBuilderGen.tt
@@ -1,10 +1,10 @@
-<#@ template debug="false" hostspecific="false" language="C#" #>
+<#@ template language="C#" #>
<#@ output extension=".cs" #>
<#@ assembly name="System.Core" #>
-<#@ assembly name="System.Security.Cryptography" #>
-<#@ assembly name="..\ConnectorGrasshopperUtils\bin\ConnectorGrasshopperUtils.dll" #>
+<#@ assembly name="$(SolutionDir)\ConnectorGrasshopper\ConnectorGrasshopperUtils\bin\$(Configuration)\net462\ConnectorGrasshopperUtils.dll" #>
+<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
-<#@ import namespace="System" #>
+<#@ import namespace="ConnectorGrasshopperUtils" #>
<#
var allTypes = CSOUtils.ListAvailableTypes();
@@ -23,6 +23,7 @@
using System;
using System.Linq;
using Grasshopper.Kernel;
+using Grasshopper;
using ConnectorGrasshopperUtils;
namespace ConnectorGrasshopper {
@@ -57,22 +58,39 @@ namespace ConnectorGrasshopper {
}
#>
// This is generated code:
-public class <#= compName #>: CreateSchemaObjectBase {
- static <#= compName #>() {
+public class <#= compName #> : CreateSchemaObjectBase
+{
+ static <#= compName #>()
+ {
SpeckleGHSettings.SettingsChanged += (_, args) =>
{
- if (!args.Key.StartsWith("Speckle2:tabs.")) return;
- var proxy = Grasshopper.Instances.ComponentServer.ObjectProxies.FirstOrDefault(p => p.Guid == internalGuid);
- if (proxy == null) return;
+ if (!args.Key.StartsWith("Speckle2:tabs."))
+ {
+ return;
+ }
+
+ var proxy = Instances.ComponentServer.ObjectProxies.FirstOrDefault(p => p.Guid == internalGuid);
+ if (proxy == null)
+ {
+ return;
+ }
+
proxy.Exposure = internalExposure;
};
}
- public <#= compName #>(): base("<#= name #>", "<#= name #>", "<#= description #>", "<#= cat #>", "<#= subcat #>") { }
-
- internal static string internalCategory { get; } = "<#= cat #>";
- internal static Guid internalGuid => new Guid("<#= ToGuid("secretPhraseToKeepItRandom..." + compName) #>");
+ public <#= compName #>()
+ : base(
+ "<#= name #>",
+ "<#= name #>",
+ "<#= description #>",
+ "<#= cat #>",
+ "<#= subcat #>"
+ ) { }
+
+ internal static string internalCategory { get; } = "<#= cat #>";
+ internal static Guid internalGuid => new("<#= ToGuid("secretPhraseToKeepItRandom..." + compName) #>");
public override GH_Exposure Exposure => internalExposure;
@@ -85,15 +103,19 @@ public class <#= compName #>: CreateSchemaObjectBase {
<#
} else {
#>
- internal static GH_Exposure internalExposure => SpeckleGHSettings.GetTabVisibility(internalCategory)
- ? GH_Exposure.tertiary
- : GH_Exposure.hidden;
+
+ internal static GH_Exposure internalExposure =>
+ SpeckleGHSettings.GetTabVisibility(internalCategory) ? GH_Exposure.tertiary : GH_Exposure.hidden;
<#
}
#>
- public override void AddedToDocument(GH_Document document){
- SelectedConstructor = CSOUtils.FindConstructor("<#= CSOUtils.MethodFullName(constructor) #>","<#= constructor.DeclaringType.FullName #>");
+ public override void AddedToDocument(GH_Document document)
+ {
+ SelectedConstructor = CSOUtils.FindConstructor(
+ "<#= CSOUtils.MethodFullName(constructor) #>",
+ "<#= constructor.DeclaringType.FullName #>"
+ );
base.AddedToDocument(document);
}
}
diff --git a/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertArea.cs b/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertArea.cs
index c53f8b3721..85bf8ea782 100644
--- a/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertArea.cs
+++ b/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertArea.cs
@@ -359,23 +359,23 @@ public void SetAreaProperties(string name, Element2D area)
if (area is CSIElement2D csiArea)
{
double[] values = null;
- if (csiArea.modifiers != null)
+ if (csiArea.StiffnessModifiers != null)
{
- values = csiArea.modifiers;
+ values = csiArea.StiffnessModifiers.ToArray();
}
- Model.AreaObj.SetModifiers(csiArea.name, ref values);
- Model.AreaObj.SetLocalAxes(csiArea.name, csiArea.orientationAngle);
- Model.AreaObj.SetPier(csiArea.name, csiArea.PierAssignment);
- Model.AreaObj.SetSpandrel(csiArea.name, csiArea.SpandrelAssignment);
+ Model.AreaObj.SetModifiers(name, ref values);
+ Model.AreaObj.SetLocalAxes(name, csiArea.orientationAngle);
+ Model.AreaObj.SetPier(name, csiArea.PierAssignment);
+ Model.AreaObj.SetSpandrel(name, csiArea.SpandrelAssignment);
if (csiArea.CSIAreaSpring != null)
{
- Model.AreaObj.SetSpringAssignment(csiArea.name, csiArea.CSIAreaSpring.name);
+ Model.AreaObj.SetSpringAssignment(name, csiArea.CSIAreaSpring.name);
}
if (csiArea.DiaphragmAssignment != null)
{
- Model.AreaObj.SetDiaphragm(csiArea.name, csiArea.DiaphragmAssignment);
+ Model.AreaObj.SetDiaphragm(name, csiArea.DiaphragmAssignment);
}
}
}
@@ -440,7 +440,7 @@ public Element2D AreaToSpeckle(string name)
double[] values = null;
Model.AreaObj.GetModifiers(name, ref values);
- speckleStructArea.modifiers = values;
+ speckleStructArea.StiffnessModifiers = values.ToList();
string springArea = null;
Model.AreaObj.GetSpringAssignment(name, ref springArea);
diff --git a/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertFrame.cs b/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertFrame.cs
index 1d46e480aa..ac1d02a656 100644
--- a/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertFrame.cs
+++ b/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertFrame.cs
@@ -283,7 +283,7 @@ public CSIElement1D FrameToSpeckle(string name)
int s = Model.FrameObj.GetModifiers(name, ref modifiers);
if (s == 0)
{
- speckleStructFrame.Modifiers = modifiers;
+ speckleStructFrame.StiffnessModifiers = modifiers.ToList();
}
speckleStructFrame.AnalysisResults =
@@ -351,20 +351,21 @@ public void SetFrameElementProperties(Element1D element1D, string newFrame, ILis
var CSIelement1D = (CSIElement1D)element1D;
if (CSIelement1D.SpandrelAssignment != null)
{
- Model.FrameObj.SetSpandrel(CSIelement1D.name, CSIelement1D.SpandrelAssignment);
+ Model.FrameObj.SetSpandrel(newFrame, CSIelement1D.SpandrelAssignment);
}
if (CSIelement1D.PierAssignment != null)
{
- Model.FrameObj.SetPier(CSIelement1D.name, CSIelement1D.PierAssignment);
+ Model.FrameObj.SetPier(newFrame, CSIelement1D.PierAssignment);
}
if (CSIelement1D.CSILinearSpring != null)
{
- Model.FrameObj.SetSpringAssignment(CSIelement1D.name, CSIelement1D.CSILinearSpring.name);
+ Model.FrameObj.SetSpringAssignment(newFrame, CSIelement1D.CSILinearSpring.name);
}
- if (CSIelement1D.Modifiers != null)
+
+ if (CSIelement1D.StiffnessModifiers != null)
{
- var modifiers = CSIelement1D.Modifiers;
- Model.FrameObj.SetModifiers(CSIelement1D.name, ref modifiers);
+ var modifiers = CSIelement1D.StiffnessModifiers.ToArray();
+ Model.FrameObj.SetModifiers(newFrame, ref modifiers);
}
if (CSIelement1D.property.material.name != null)
{
diff --git a/Objects/Objects/Structural/CSI/Geometry/CSIElement1D.cs b/Objects/Objects/Structural/CSI/Geometry/CSIElement1D.cs
index c3d4e3ad7d..db4debe3e4 100644
--- a/Objects/Objects/Structural/CSI/Geometry/CSIElement1D.cs
+++ b/Objects/Objects/Structural/CSI/Geometry/CSIElement1D.cs
@@ -1,3 +1,6 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
using Objects.Geometry;
using Objects.Structural.CSI.Properties;
using Objects.Structural.Geometry;
@@ -5,13 +8,14 @@
using Objects.Structural.Results;
using Speckle.Core.Kits;
using Speckle.Core.Models;
+using Speckle.Newtonsoft.Json;
namespace Objects.Structural.CSI.Geometry;
public class CSIElement1D : Element1D
{
public CSIElement1D(Line baseLine, Property1D property, ElementType1D type)
- : this(baseLine, property, type, null, null, null, null, null, null, null) { }
+ : base(baseLine, property, type, null, null, null, null, null, null, null) { }
///
/// SchemaBuilder constructor for structural 1D element (based on local axis)
@@ -25,7 +29,10 @@ public CSIElement1D(Line baseLine, Property1D property, ElementType1D type)
///
///
///
- [SchemaInfo("Element1D (from local axis)", "Creates a Speckle CSI 1D element (from local axis)", "CSI", "Geometry")]
+ [
+ SchemaInfo("Element1D (from local axis)", "Creates a Speckle CSI 1D element (from local axis)", "CSI", "Geometry"),
+ SchemaDeprecated
+ ]
public CSIElement1D(
Line baseLine,
Property1D property,
@@ -39,7 +46,7 @@ public CSIElement1D(
[SchemaParamInfo("If null, defaults to no offsets")] Vector? end2Offset = null,
Plane? localAxis = null,
CSILinearSpring? CSILinearSpring = null,
- [SchemaParamInfo("an Array of 8 values referring to the modifiers as seen in CSI in order")]
+ [SchemaParamInfo("An array of 8 values referring to the modifiers as seen in CSI in order")]
double[]? Modifier = null,
DesignProcedure DesignProcedure = DesignProcedure.NoDesign
)
@@ -47,7 +54,7 @@ public CSIElement1D(
{
this.CSILinearSpring = CSILinearSpring;
this.DesignProcedure = DesignProcedure;
- Modifiers = Modifier;
+ StiffnessModifiers = Modifier.ToList();
}
///
@@ -83,8 +90,8 @@ public CSIElement1D(
Node? orientationNode = null,
double orientationAngle = 0,
CSILinearSpring? CSILinearSpring = null,
- [SchemaParamInfo("an Array of 8 values referring to the modifiers as seen in CSI in order")]
- double[]? Modifier = null,
+ [SchemaParamInfo("A list of 8 values referring to the modifiers as seen in CSI in order")]
+ List? Modifier = null,
DesignProcedure DesignProcedure = DesignProcedure.NoDesign
)
: base(
@@ -102,7 +109,32 @@ public CSIElement1D(
{
this.CSILinearSpring = CSILinearSpring;
this.DesignProcedure = DesignProcedure;
- Modifiers = Modifier;
+ StiffnessModifiers = Modifier;
+ }
+
+ [SchemaInfo("Element1D (from local axis)", "Creates a Speckle CSI 1D element (from local axis)", "CSI", "Geometry")]
+ public CSIElement1D(
+ Line baseLine,
+ Property1D property,
+ ElementType1D type,
+ string? name = null,
+ [SchemaParamInfo("If null, restraint condition defaults to unreleased (fully fixed translations and rotations)")]
+ Restraint? end1Releases = null,
+ [SchemaParamInfo("If null, restraint condition defaults to unreleased (fully fixed translations and rotations)")]
+ Restraint? end2Releases = null,
+ [SchemaParamInfo("If null, defaults to no offsets")] Vector? end1Offset = null,
+ [SchemaParamInfo("If null, defaults to no offsets")] Vector? end2Offset = null,
+ Plane? localAxis = null,
+ CSILinearSpring? CSILinearSpring = null,
+ [SchemaParamInfo("A list of 8 values referring to the modifiers as seen in CSI in order")]
+ List? Modifier = null,
+ DesignProcedure DesignProcedure = DesignProcedure.NoDesign
+ )
+ : base(baseLine, property, type, name, end1Releases, end2Releases, end1Offset, end2Offset, localAxis)
+ {
+ this.CSILinearSpring = CSILinearSpring;
+ this.DesignProcedure = DesignProcedure;
+ StiffnessModifiers = Modifier;
}
public CSIElement1D() { }
@@ -112,7 +144,14 @@ public CSIElement1D() { }
public string PierAssignment { get; set; }
public string SpandrelAssignment { get; set; }
- public double[]? Modifiers { get; set; }
+
+ [JsonIgnore, Obsolete("This is changed to a list of doubles for Grasshopper compatibility")]
+ public double[]? Modifiers
+ {
+ get => StiffnessModifiers?.ToArray();
+ set => StiffnessModifiers = value?.ToList();
+ }
+ public List? StiffnessModifiers { get; set; }
public DesignProcedure DesignProcedure { get; set; }
[DetachProperty]
diff --git a/Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs b/Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs
index cdf6a58659..be8cbafb58 100644
--- a/Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs
+++ b/Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs
@@ -1,15 +1,46 @@
+using System;
using System.Collections.Generic;
+using System.Linq;
using Objects.Structural.CSI.Properties;
using Objects.Structural.Geometry;
using Objects.Structural.Properties;
using Objects.Structural.Results;
using Speckle.Core.Kits;
using Speckle.Core.Models;
+using Speckle.Newtonsoft.Json;
namespace Objects.Structural.CSI.Geometry;
public class CSIElement2D : Element2D
{
+ [
+ SchemaInfo(
+ "Element2D",
+ "Creates a Speckle CSI 2D element (based on a list of edge ie. external, geometry defining nodes)",
+ "CSI",
+ "Geometry"
+ ),
+ SchemaDeprecated
+ ]
+ public CSIElement2D(
+ List nodes,
+ Property2D property,
+ double offset = 0,
+ double orientationAngle = 0,
+ double[]? modifiers = null,
+ CSIAreaSpring? CSIAreaSpring = null,
+ CSIDiaphragm? CSIDiaphragm = null
+ )
+ {
+ topology = nodes;
+ this.property = property;
+ this.offset = offset;
+ this.orientationAngle = orientationAngle;
+ DiaphragmAssignment = CSIDiaphragm?.name;
+ this.CSIAreaSpring = CSIAreaSpring;
+ this.StiffnessModifiers = modifiers.ToList();
+ }
+
[SchemaInfo(
"Element2D",
"Creates a Speckle CSI 2D element (based on a list of edge ie. external, geometry defining nodes)",
@@ -21,7 +52,7 @@ public CSIElement2D(
Property2D property,
double offset = 0,
double orientationAngle = 0,
- double[]? modifiers = null,
+ List? modifiers = null,
CSIAreaSpring? CSIAreaSpring = null,
CSIDiaphragm? CSIDiaphragm = null
)
@@ -32,7 +63,7 @@ public CSIElement2D(
this.orientationAngle = orientationAngle;
DiaphragmAssignment = CSIDiaphragm?.name;
this.CSIAreaSpring = CSIAreaSpring;
- this.modifiers = modifiers;
+ this.StiffnessModifiers = modifiers;
}
public CSIElement2D() { }
@@ -42,8 +73,16 @@ public CSIElement2D() { }
public string? DiaphragmAssignment { get; set; }
public string? PierAssignment { get; set; }
+
public string? SpandrelAssignment { get; set; }
- public double[]? modifiers { get; set; }
+
+ [JsonIgnore, Obsolete("This is changed to a list of doubles for Grasshopper compatibility")]
+ public double[]? modifiers
+ {
+ get => StiffnessModifiers?.ToArray();
+ set => StiffnessModifiers = value?.ToList();
+ }
+ public List? StiffnessModifiers { get; set; }
public bool Opening { get; set; }
[DetachProperty]