/***************************************************/ private bool CreateProfile(string name, TaperedProfile profile) { profile.MapPositionDomain(); IFGeometricLine lusasGeometricLine = (IFGeometricLine)d_LusasData.getAttribute("Line Geometric", name); lusasGeometricLine.setMultipleVarying(true); lusasGeometricLine.setNumberOfSections(profile.Profiles.Count); lusasGeometricLine.setValue("interpMethod", "Enhanced"); lusasGeometricLine.setSpecifyInterp(true); lusasGeometricLine.setEqualSpacing(false); lusasGeometricLine.setSymmetry(false); lusasGeometricLine.setDistanceType("Parametric"); List <double> keys = new List <double>(profile.Profiles.Keys); IProfile iProfile; for (int i = 0; i < keys.Count; i++) { profile.Profiles.TryGetValue(keys[i], out iProfile); string profileName; if (i == 0) { profileName = $"{name}-0"; } else { profileName = $"{name}-{keys[i]:G3}"; } CreateProfile(profileName, iProfile as dynamic); lusasGeometricLine.setFromLibrary("User Sections", "Local", profileName, 0, 0, i); if (i == 0) { lusasGeometricLine.setInterpolation("Constant", (double)keys[i], i); } else { lusasGeometricLine.setInterpolation("Function", (double)keys[i], i, profile.InterpolationOrder[i - 1]); } } lusasGeometricLine.setVerticalAlignment("CenterToCenter"); lusasGeometricLine.setHorizontalAlignment("CenterToCenter"); lusasGeometricLine.setAlignmentSection(1); return(true); }
/***************************************************/ private IFAttribute CreateSection(ConcreteSection sectionProperty) { IFGeometricLine lusasGeometricLine = null; if (sectionProperty.SectionProfile != null) { lusasGeometricLine = d_LusasData.createGeometricLine(sectionProperty.DescriptionOrName()); lusasGeometricLine.setValue("elementType", "3D Thick Beam"); if (CreateProfile(sectionProperty.DescriptionOrName(), sectionProperty.SectionProfile as dynamic)) { if (!(sectionProperty.SectionProfile is TaperedProfile)) { lusasGeometricLine.setFromLibrary("User Sections", "Local", sectionProperty.DescriptionOrName(), 0, 0); } } } return(lusasGeometricLine); }