示例#1
0
        private void BoltPlatetoPlate(TSM.ContourPlate plate1, TSM.ContourPlate plate2, double height, double width)
        {
            TSM.BoltArray B = new TSM.BoltArray();

            B.PartToBeBolted = plate1;
            B.PartToBoltTo   = plate2;

            B.FirstPosition  = new TSG.Point(0, -height / 2, 0);
            B.SecondPosition = new TSG.Point(0, height / 2, 0);

            B.BoltSize     = double.Parse(boltCatalogSize1.Text);
            B.Tolerance    = 3.00;
            B.BoltStandard = boltCatalogStandard1.Text;
            B.BoltType     = TSM.BoltGroup.BoltTypeEnum.BOLT_TYPE_SITE;
            B.CutLength    = 105;

            B.Length           = 100;
            B.ExtraLength      = 0;
            B.ThreadInMaterial = TSM.BoltGroup.BoltThreadInMaterialEnum.THREAD_IN_MATERIAL_NO;

            B.Position.Depth      = TSM.Position.DepthEnum.MIDDLE;
            B.StartPointOffset.Dx = height / 4;
            B.Position.Plane      = TSM.Position.PlaneEnum.MIDDLE;
            B.Position.Rotation   = TSM.Position.RotationEnum.FRONT;

            B.Bolt    = true;
            B.Washer1 = true;
            B.Washer2 = true;
            B.Washer3 = true;
            B.Nut1    = true;
            B.Nut2    = false;

            B.Hole1 = true;
            B.Hole2 = true;
            B.Hole3 = true;
            B.Hole4 = true;
            B.Hole5 = true;

            B.AddBoltDistX(height / 2);
            B.AddBoltDistY(width / 2);

            B.Insert();
        }