コード例 #1
0
ファイル: Program.cs プロジェクト: Exolun/OSCADSharp
        public static void makeCenterTwoByFourBracket()
        {
            double wallThickness = Inches.Eigth;

            double innerWidth = Inches.One * 4 + Inches.Sixteenth;
            double innerHeight = Inches.One * 2 + Inches.Sixteenth;
            double innerDepth = Inches.Half + Inches.Sixteenth;

            OSCADObject twoByfourHolder = new Box()
            {
                Size = new Vector3(innerWidth + wallThickness * 2, innerHeight + wallThickness * 2, innerDepth + wallThickness),
                Center = true,
                WallThickness = wallThickness
            };

            var whole = twoByfourHolder.Rotate(180, 0, 0).Rotate(0, 0, 90);
            var left = twoByfourHolder.Clone().Rotate(0, 0, 90).Rotate(0, 90, 0)
                .Translate(innerDepth - wallThickness*2, 0, whole.Bounds().ZMax + innerHeight / 2);
            var right = left.Mirror(1, 0, 0);
            whole = whole + left + right;
            //    .Rotate(90, 0, 90) +
            //    twoByfourHolder.Clone().Rotate(90, 0, 90).Rotate(0, 90, 0).Translate(innerHeight / 2 - wallThickness * 2 + Inches.Sixteenth * .5, 0, -innerHeight / 2 - innerDepth / 2 - wallThickness + Inches.Sixteenth);
            //whole = whole.Rotate(0, -90, 0);
            whole.ToFile("twobyFourCenterBracket");
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Exolun/OSCADSharp
        public static void makeSideTwoByFourBracket()
        {
            double wallThickness = Inches.Eigth;

            double innerWidth = Inches.One * 4 + Inches.Sixteenth;
            double innerHeight = Inches.One * 2 + Inches.Sixteenth;
            double innerDepth = Inches.Half + Inches.Sixteenth;

            OSCADObject twoByfourHolder = new Box()
            {
                Size = new Vector3(innerWidth + wallThickness * 2, innerHeight + wallThickness * 2, innerDepth + wallThickness),
                Center = true,
                WallThickness = wallThickness
            };

            var whole = twoByfourHolder.Rotate(90, 0, 90) + 
                twoByfourHolder.Clone().Rotate(90, 0, 90).Rotate(0, 90, 0).Translate(innerHeight/2 - wallThickness*2 + Inches.Sixteenth*.5, 0, -innerHeight/2 - innerDepth/2 - wallThickness + Inches.Sixteenth);
            whole = whole.Rotate(0, -90, 0);
            whole.ToFile("twobyFourSideBracket");
        }