From 3ab60be40be18f0bbe0e2762e62c10483d98007b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Tue, 24 Sep 2024 18:03:05 +0200 Subject: [PATCH] Use CSIOpening CSIOpening attribute is created when going from AreaToSpeckle, but not used when going from AreaToNative. --- .../PartialClasses/Geometry/ConvertArea.cs | 9 ++++++--- Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertArea.cs b/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertArea.cs index 85bf8ea782..fb4e4276d2 100644 --- a/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertArea.cs +++ b/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertArea.cs @@ -372,11 +372,14 @@ public void SetAreaProperties(string name, Element2D area) { Model.AreaObj.SetSpringAssignment(name, csiArea.CSIAreaSpring.name); } - if (csiArea.DiaphragmAssignment != null) { Model.AreaObj.SetDiaphragm(name, csiArea.DiaphragmAssignment); } + if (csiArea.CSIOpening != null) + { + Model.AreaObj.SetOpening(name, csiArea.CSIOpening.isOpening); + } } } @@ -399,9 +402,9 @@ public Element2D AreaToSpeckle(string name) bool isOpening = false; Model.AreaObj.GetOpening(name, ref isOpening); - if (isOpening == true) + if (isOpening) { - speckleStructArea.property = new CSIOpening(true); + speckleStructArea.CSIOpening = new CSIOpening(true); } else { diff --git a/Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs b/Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs index be8cbafb58..6fecbb281d 100644 --- a/Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs +++ b/Objects/Objects/Structural/CSI/Geometry/CSIElement2D.cs @@ -84,6 +84,7 @@ public double[]? modifiers } public List? StiffnessModifiers { get; set; } public bool Opening { get; set; } + public CSIOpening? CSIOpening { get; set; } [DetachProperty] public AnalyticalResults? AnalysisResults { get; set; }