예제 #1
0
        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);
            }
        }
예제 #2
0
        private static Curve CurveFromStbSecL(Vector3d[] localAxis, Point3d point, Utils.SectionType type, StbSecRollL rollL)
        {
            switch (type)
            {
            case Utils.SectionType.Column:
            case Utils.SectionType.Brace:
                return(new PolylineCurve(
                           SectionCornerPoints.ColumnL(point, rollL.A, rollL.B, rollL.t1, rollL.t2, rollL.type, localAxis[1], localAxis[2])));

            case Utils.SectionType.Beam:
                return(new PolylineCurve(
                           SectionCornerPoints.BeamL(point, rollL.A, rollL.B, rollL.t1, rollL.t2, rollL.type, localAxis[1], localAxis[2])));

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
예제 #3
0
        private static Curve CurveFromStbSecH(Vector3d[] localAxis, Point3d point, Utils.SectionType type, double A, double B, double t1, double t2)
        {
            switch (type)
            {
            case Utils.SectionType.Column:
            case Utils.SectionType.Brace:
                return(new PolylineCurve(
                           SectionCornerPoints.ColumnH(point, A, B, t1, t2, localAxis[1], localAxis[2])));

            case Utils.SectionType.Beam:
                return(new PolylineCurve(
                           SectionCornerPoints.BeamH(point, A, B, t1, t2, localAxis[1], localAxis[2])));

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
예제 #4
0
파일: Girder.cs 프로젝트: hrntsm/HoaryFox
        private static List <Curve> SecSrcBeamCurves(IReadOnlyList <object> figures, IReadOnlyList <Point3d> sectionPoints)
        {
            var curveList = new List <Curve>();

            Vector3d[] localAxis = Utils.CreateLocalAxis(sectionPoints);

            switch (figures.Count)
            {
            case 1:
                var straight = figures[0] as StbSecBeam_SRC_Straight;
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[0], straight.depth, straight.width, localAxis[1], localAxis[2])));
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[3], straight.depth, straight.width, localAxis[1], localAxis[2])));
                break;

            case 2:
                var taper = new[] { figures[0] as StbSecBeam_SRC_Taper, figures[1] as StbSecBeam_SRC_Taper };
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[0], taper[0].depth, taper[0].width, localAxis[1], localAxis[2])));
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[1], taper[0].depth, taper[0].width, localAxis[1], localAxis[2])));
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[2], taper[1].depth, taper[1].width, localAxis[1], localAxis[2])));
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[3], taper[1].depth, taper[1].width, localAxis[1], localAxis[2])));
                break;

            case 3:
                var haunch = new[] { figures[0] as StbSecBeam_SRC_Haunch, figures[1] as StbSecBeam_SRC_Haunch, figures[2] as StbSecBeam_SRC_Haunch };
                StbSecBeam_SRC_Haunch start  = haunch.First(fig => fig.pos == StbSecBeam_RC_HaunchPos.START);
                StbSecBeam_SRC_Haunch center = haunch.First(fig => fig.pos == StbSecBeam_RC_HaunchPos.CENTER);
                StbSecBeam_SRC_Haunch end    = haunch.First(fig => fig.pos == StbSecBeam_RC_HaunchPos.END);
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[0], start.depth, start.width, localAxis[1], localAxis[2])));
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[1], center.depth, center.width, localAxis[1], localAxis[2])));
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[2], center.depth, center.width, localAxis[1], localAxis[2])));
                curveList.Add(new PolylineCurve(SectionCornerPoints.BeamRect(sectionPoints[3], end.depth, end.width, localAxis[1], localAxis[2])));
                break;

            default:
                throw new Exception();
            }

            return(curveList);
        }
예제 #5
0
파일: Column.cs 프로젝트: hrntsm/HoaryFox
        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);
        }