private static Curve CurveFromStbSecPipe(Vector3d[] localAxis, Point3d point, Utils.SectionType type, double diameter) { switch (type) { case Utils.SectionType.Column: case Utils.SectionType.Brace: return(SectionCornerPoints.ColumnPipe(point, diameter, localAxis[0])); case Utils.SectionType.Beam: return(SectionCornerPoints.BeamPipe(point, diameter, localAxis[0])); default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } }
private static List <Curve> SecRcColumnToCurves(object figure, IReadOnlyList <Point3d> sectionPoints) { var curveList = new List <Curve>(); Vector3d[] localAxis = Utils.CreateLocalAxis(sectionPoints); switch (figure) { case StbSecColumn_RC_Rect rect: curveList.Add(new PolylineCurve( SectionCornerPoints.ColumnRect(sectionPoints[0], rect.width_X, rect.width_Y, localAxis[1], localAxis[2]))); curveList.Add(new PolylineCurve( SectionCornerPoints.ColumnRect(sectionPoints[3], rect.width_X, rect.width_Y, localAxis[1], localAxis[2]))); break; case StbSecColumn_SRC_Rect rect: curveList.Add(new PolylineCurve( SectionCornerPoints.ColumnRect(sectionPoints[0], rect.width_X, rect.width_Y, localAxis[1], localAxis[2]))); curveList.Add(new PolylineCurve( SectionCornerPoints.ColumnRect(sectionPoints[3], rect.width_X, rect.width_Y, localAxis[1], localAxis[2]))); break; case StbSecColumn_RC_Circle circle: curveList.Add(SectionCornerPoints.ColumnPipe(sectionPoints[0], circle.D, localAxis[0])); curveList.Add(SectionCornerPoints.ColumnPipe(sectionPoints[3], circle.D, localAxis[0])); break; case StbSecColumn_SRC_Circle circle: curveList.Add(SectionCornerPoints.ColumnPipe(sectionPoints[0], circle.D, localAxis[0])); curveList.Add(SectionCornerPoints.ColumnPipe(sectionPoints[3], circle.D, localAxis[0])); break; default: throw new Exception(); } return(curveList); }