예제 #1
0
        private void SetBottomPlate()
        {
            var      wl   = WallPolygon.IfWall.IfLocation;
            var      wd   = WallPolygon.IfWall.IfDimension;
            var      dim  = IfSill.Setup.Get <IfDimension>("Dimension");
            UnitName unit = WallPolygon.IfWall.IfModel.IfUnit.LengthUnit;

            switch (unit)
            {
            case UnitName.MILLIMETRE:
                //dim = dim.ToMilliMeters();
                break;

            case UnitName.METRE:

                //dim = dim.ToMeters();
                break;

            default:
                //dim = dim.ToFeet();
                break;
            }
            var location = new IfLocation(wd.XDim.Inches / 2, 0, -dim.ZDim.Inches);
            var plate    = new IfSill(WallPolygon.IfWall)
            {
                IfLocation     = location,
                IfDimension    = new IfDimension(wd.XDim, dim.YDim, dim.ZDim),
                IfMaterial     = IfMaterial.Setup.Get <IfMaterial>("BottomPlate"),
                IfModel        = WallPolygon.IfWall.IfModel,
                LocalPlacement = (IfcLocalPlacement)WallPolygon.IfWall.LocalPlacement
            };

            plate.New();
            plate.IfMaterial.AttatchTo(plate);
        }
예제 #2
0
 public Region(double xDim, double yDim, double height, double x, double y, double z, RegionLocation regionLocation, Direction dir)
 {
     IfLocation     = new IfLocation(x, y, z);
     IfDimension    = new IfDimension(xDim, yDim, height);
     RegionLocation = regionLocation;
     Direction      = dir;
 }
예제 #3
0
        public static IfLocation DivideDistance(IfLocation p1, IfDimension p2)
        {
            var x = p2.XDim / 2;
            var y = p2.YDim / 2;

            return(new IfLocation(p1.X + x, p2.YDim + y, 0));
        }
예제 #4
0
        private void SetJoists()
        {
            RecSection section = IfJoist.Setup.Get <RecSection>("RecSection");
            WoodType   WT      = IfJoist.Setup.Get <WoodType>("WoodType");
            WoodGrade  WG      = IfJoist.Setup.Get <WoodGrade>("WoodGrade");

            foreach (var reg in FloorPolygon.Regions)
            {
                double span  = reg.IfDimension.XDim.Inches;
                var    Cells = JoistTable.Cells.Where(e =>
                                                      e.WoodGrade == WG &&
                                                      e.WoodType == WT &&
                                                      e.SpanToInch >= span &&
                                                      e.DeadLoadPsF == 10 &&
                                                      e.Section == section)
                               .OrderBy(e =>
                                        e.SpanToInch).ToList();
                double S      = Cells[0].Spacing;
                var    spaces = Split.Equal(reg.IfDimension.YDim - section.Width, S);

                for (int i = 0; i < spaces.Count; i++)
                {
                    //var spacingVec = new Vector3D(spaces[i], spaces[i], spaces[i]);
                    var DircVec = new IfLocation(
                        FloorPolygon.IfFloor.ShortDirection.Y * spaces[i],
                        FloorPolygon.IfFloor.ShortDirection.X * spaces[i],
                        FloorPolygon.IfFloor.ShortDirection.Z * spaces[i]
                        );

                    var ifJoist = new IfJoist(FloorPolygon.IfFloor)
                    {
                        IfModel    = FloorPolygon.IfFloor.IfModel,
                        IfFloor    = FloorPolygon.IfFloor,
                        IfLocation = DircVec,

                        IfDimension = new IfDimension(
                            section.Width.Inches,
                            section.Depth.Inches,
                            reg.IfDimension.XDim.Inches),

                        IfMaterial = IfMaterial.Setup.Get <IfMaterial>("Joist")
                    };

                    ifJoist.New();
                    ifJoist.IfMaterial.AttatchTo(ifJoist);
                    //add to studs elments
                    Joists.Add(ifJoist);



                    //
                }
            }
        }
예제 #5
0
 public WallModel(IfWall ifWall)
 {
     IfWall      = ifWall;
     IfLocation  = new IfLocation(IfWall.IfLocation);
     IfDimension = new IfDimension(IfWall.IfDimension);
     Direction   = IfWall.Direction;
     if (Direction == Direction.Negative)
     {
         Flip(Axis.Other);
         Direction = Direction.Positive;
     }
     MidPoint = Distance3D.DivideDistance(IfWall.IfLocation, IfWall.IfDimension);
     EndPoint = GetEndPoint();
 }
예제 #6
0
 public static double Cross(IfLocation O, IfLocation A, IfLocation B)
 {
     return((A.X - O.X) * (B.Y - O.Y) - (A.Y - O.Y) * (B.X - O.X));
 }
예제 #7
0
 public Region(double xDim, double yDim, double height, double x, double y, double z)
 {
     IfLocation  = new IfLocation(x, y, z);
     IfDimension = new IfDimension(xDim, yDim, height);
 }
예제 #8
0
 public Blank()
 {
     SecType  = WoodSecType._2x4;
     Location = new IfLocation(0, 0, 0);
 }
예제 #9
0
파일: Stud.cs 프로젝트: AmrFayez/AutoTimber
 public Stud(IfLocation L, Double length)
 {
     Location = L; Length = length;
 }