diff --git a/Objects/Converters/ConverterCSI/ConverterCSIShared/Models/Element1DAnalyticalResultConverter.cs b/Objects/Converters/ConverterCSI/ConverterCSIShared/Models/Element1DAnalyticalResultConverter.cs index 5c120422cc..5a48332321 100644 --- a/Objects/Converters/ConverterCSI/ConverterCSIShared/Models/Element1DAnalyticalResultConverter.cs +++ b/Objects/Converters/ConverterCSI/ConverterCSIShared/Models/Element1DAnalyticalResultConverter.cs @@ -135,7 +135,7 @@ ref m3 numberOfResults, null, loadCase, - (int i) => (float)(objSta[i] / lengthOf1dElement), + (int i) => (float)(objSta[i] / lengthOf1dElement), // Dangerous. We are not validating if lengthOf1dElement != 0 p, v2, v3, diff --git a/Objects/Converters/ConverterCSI/ConverterCSIShared/Models/ResultsConverter.cs b/Objects/Converters/ConverterCSI/ConverterCSIShared/Models/ResultsConverter.cs index 08fe96942d..e0df7821dc 100644 --- a/Objects/Converters/ConverterCSI/ConverterCSIShared/Models/ResultsConverter.cs +++ b/Objects/Converters/ConverterCSI/ConverterCSIShared/Models/ResultsConverter.cs @@ -143,6 +143,7 @@ public static void SetLoadCombinationsForResults(cSapModel sapModel, Dictionary< loadCasesCommaSeparated = string.Empty; } + // This approach is NOT ideal. What if the load combination name has a comma in it? string[] loadCases = loadCasesCommaSeparated.Split(',').Select(s => s.TrimStart()).ToArray(); var numberOfLoadCombinations = 0; diff --git a/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertFrame.cs b/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertFrame.cs index ac1d02a656..84435b3a0d 100644 --- a/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertFrame.cs +++ b/Objects/Converters/ConverterCSI/ConverterCSIShared/PartialClasses/Geometry/ConvertFrame.cs @@ -338,9 +338,9 @@ public void SetFrameElementProperties(Element1D element1D, string newFrame, ILis Model.FrameObj.SetSection(newFrame, propertyName); } - if (element1D.orientationAngle != null) + if (element1D.orientationAngle != 0) { - Model.FrameObj.SetLocalAxes(newFrame, element1D.orientationAngle); + Model.FrameObj.SetLocalAxes(newFrame, element1D.orientationAngle * (180 / Math.PI)); // Convert from radians to degrees } end1Release = end1Release.Select(b => !b).ToArray(); end2Release = end2Release.Select(b => !b).ToArray(); diff --git a/Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertAnalyticalStick.cs b/Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertAnalyticalStick.cs index 2da7027efe..90f53ae427 100644 --- a/Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertAnalyticalStick.cs +++ b/Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertAnalyticalStick.cs @@ -289,6 +289,8 @@ private Element1D AnalyticalStickToSpeckle(AnalyticalModelStick revitStick) speckleElement1D.end1Offset = VectorToSpeckle(startOffset, revitStick.Document); speckleElement1D.end2Offset = VectorToSpeckle(endOffset, revitStick.Document); + speckleElement1D.orientationAngle = revitStick.get_Parameter(BuiltInParameter.ANALYTICAL_MODEL_ROTATION)?.AsDouble() ?? 0.0; // Default to 0.0 if null or parameter not found, in radians + SetEndReleases(revitStick, ref speckleElement1D); var prop = new Property1D(); @@ -360,6 +362,7 @@ private Element1D AnalyticalStickToSpeckle(AnalyticalMember revitStick) } speckleElement1D.baseLine = CurveToSpeckle(revitStick.GetCurve(), revitStick.Document) as Objects.Geometry.Line; + speckleElement1D.orientationAngle = revitStick?.CrossSectionRotation ?? 0; // In radians SetEndReleases(revitStick, ref speckleElement1D);