Exemplo n.º 1
0
        private TSG.OBB CreateOrientedBoundingBox(TSM.Part part)
        {
            TSG.OBB obb = null;

            if (part != null)
            {
                WorkPlaneHandler    workPlaneHandler            = model.GetWorkPlaneHandler();
                TransformationPlane originalTransformationPlane = workPlaneHandler.GetCurrentTransformationPlane();

                Solid     solid = part.GetSolid();
                TSG.Point minPointInCurrentPlane = solid.MinimumPoint;
                TSG.Point maxPointInCurrentPlane = solid.MaximumPoint;

                TSG.Point centerPoint = CalculateCenterPoint(minPointInCurrentPlane, maxPointInCurrentPlane);

                TSG.CoordinateSystem coordSys = part.GetCoordinateSystem();
                TransformationPlane  localTransformationPlane = new TransformationPlane(coordSys);
                workPlaneHandler.SetCurrentTransformationPlane(localTransformationPlane);

                solid = part.GetSolid();
                TSG.Point minPoint = solid.MinimumPoint;
                TSG.Point maxPoint = solid.MaximumPoint;
                double    extent0  = (maxPoint.X - minPoint.X) / 2;
                double    extent1  = (maxPoint.Y - minPoint.Y) / 2;
                double    extent2  = (maxPoint.Z - minPoint.Z) / 2;

                workPlaneHandler.SetCurrentTransformationPlane(originalTransformationPlane);

                obb = new TSG.OBB(centerPoint, coordSys.AxisX, coordSys.AxisY,
                                  coordSys.AxisX.Cross(coordSys.AxisY), extent0, extent1, extent2);
            }
            return(obb);
        }
 public static dynamic GetTSObject(WorkPlaneHandler dynObject)
 {
     if (dynObject is null)
     {
         return(null);
     }
     return(dynObject.teklaObject);
 }
Exemplo n.º 3
0
        private void WriteGeometry(XmlTextWriter writer, Part part, Model myModel)
        {
            if (part != null)
            {
                WorkPlaneHandler    planeHandler = myModel.GetWorkPlaneHandler();
                TransformationPlane CurrentPlane = planeHandler.GetCurrentTransformationPlane();

                writer.WriteStartElement("Part", null);
                writer.WriteAttributeString("id", part.Identifier.ID.ToString());
                writer.WriteElementString("name", part.Name);
                writer.WriteElementString("material", part.Material.MaterialString);
                writer.WriteStartElement("profile", null);
                writer.WriteElementString("name", part.Profile.ProfileString);
                writer.WriteEndElement();

                Solid          solid      = part.GetSolid() as Solid;
                FaceEnumerator myFaceEnum = solid.GetFaceEnumerator();
                writer.WriteStartElement("Solid", null);
                while (myFaceEnum.MoveNext())
                {
                    Face myFace = myFaceEnum.Current as Face;
                    if (myFace != null)
                    {
                        writer.WriteStartElement("Face", null);
                        LoopEnumerator myLoopEnum = myFace.GetLoopEnumerator();
                        while (myLoopEnum.MoveNext())
                        {
                            Loop myLoop = myLoopEnum.Current as Loop;
                            if (myLoop != null)
                            {
                                writer.WriteStartElement("Loop", null);
                                VertexEnumerator myVertexEnum = myLoop.GetVertexEnumerator() as VertexEnumerator;
                                while (myVertexEnum.MoveNext())
                                {
                                    Point myVertex = myVertexEnum.Current as Point;
                                    if (myVertex != null)
                                    {
                                        writer.WriteStartElement("Vertex", null);
                                        writer.WriteElementString("X", myVertex.X.ToString("#.##"));
                                        writer.WriteElementString("Y", myVertex.Y.ToString("#.##"));
                                        writer.WriteElementString("Z", myVertex.Z.ToString("#.##"));
                                        writer.WriteEndElement(); // End Vertex
                                    }
                                }
                                writer.WriteEndElement(); // End Loop
                            }
                        }
                        writer.WriteEndElement(); //  End Face
                    }
                }
                writer.WriteEndElement(); // End Solid

                planeHandler.SetCurrentTransformationPlane(CurrentPlane);
                writer.WriteEndElement();
            }
        }
Exemplo n.º 4
0
 public MainWindow()
 {
     InitializeComponent();
     model = new Model();
     if (!model.GetConnectionStatus())
     {
         MessageBox.Show("Yhteyden luonti epäonnistui!");
         Environment.Exit(0);
     }
     SetInfoText("");
     ListAllCustomComponents();
     wHandler = model.GetWorkPlaneHandler();
 }
Exemplo n.º 5
0
        public GeometricPlane PickFace()
        {
            Picker           picker     = new Picker();
            PickInput        input      = picker.PickFace("Pick a FACE");
            IEnumerator      enumerator = input.GetEnumerator();
            List <T3D.Point> points     = new List <T3D.Point>();

            while (enumerator.MoveNext())
            {
                InputItem item = enumerator.Current as InputItem;
                if (item.GetInputType() == InputItem.InputTypeEnum.INPUT_POLYGON)
                {
                    ArrayList alist = item.GetData() as ArrayList;
                    //           int counter = 1;
                    foreach (T3D.Point p in alist)
                    {
                        points.Add(p);
                        //              Txt(p, counter.ToString());
                        //              counter++;
                    }
                }
            }
            T3D.Point      origin    = points[1];
            T3D.Vector     axisX     = new T3D.Vector(points[0] - points[1]);
            T3D.Vector     axisY     = new T3D.Vector(points[2] - points[1]);
            GeometricPlane geomPlane = new GeometricPlane(origin, axisX, axisY);

            Model               model        = new Model();
            WorkPlaneHandler    workPlane    = model.GetWorkPlaneHandler();
            TransformationPlane currentPlane = workPlane.GetCurrentTransformationPlane();
            Matrix              matrix       = currentPlane.TransformationMatrixToLocal;

            T3D.Point p1 = matrix.Transform(geomPlane.Origin);
            T3D.Point p2 = matrix.Transform(geomPlane.Origin + geomPlane.Normal);
            geomPlane.Origin = p1;
            geomPlane.Normal = new T3D.Vector(p2 - p1);
            T3D.Point dummy   = null;
            int       counter = 1;

            foreach (T3D.Point pt in points)
            {
                dummy = matrix.Transform(pt);
                Txt(dummy, counter.ToString());
                counter++;
            }

            return(geomPlane);
        }
Exemplo n.º 6
0
        private void WriteBolts(XmlTextWriter writer, Part part, Model myModel)
        {
            if (part != null)
            {
                ModelObjectEnumerator myBoltEnum = part.GetBolts();

                while (myBoltEnum.MoveNext())
                {
                    BoltArray myBolt = myBoltEnum.Current as BoltArray;

                    writer.WriteStartElement("Bolt", null);
                    writer.WriteAttributeString("id", myBolt.Identifier.ID.ToString());

                    WorkPlaneHandler    planeHandler = myModel.GetWorkPlaneHandler();
                    TransformationPlane currentPlane = planeHandler.GetCurrentTransformationPlane();


                    CoordinateSystem    bCoordSys = myBolt.GetCoordinateSystem();
                    TransformationPlane BoltPlane = new TransformationPlane(bCoordSys);
                    planeHandler.SetCurrentTransformationPlane(BoltPlane);
                    myBolt.Select();

                    CoordinateSystem bCoordSys1 = myBolt.GetCoordinateSystem();

                    WriteCoordSys(writer, bCoordSys1);

                    writer.WriteStartElement("BoltPositions", null);
                    foreach (Point p in myBolt.BoltPositions)
                    {
                        writer.WriteElementString("Bolt position", p.ToString());
                    }

                    writer.WriteEndElement();

                    writer.WriteEndElement();

                    planeHandler.SetCurrentTransformationPlane(currentPlane);
                }
            }
        }
Exemplo n.º 7
0
    public OBB CreateObb(Part currentBeam)
    {
        OBB obb = (OBB)null;

        if (currentBeam != null)
        {
            WorkPlaneHandler workPlaneHandler = this.myModel.GetWorkPlaneHandler();
            this.myModel.GetWorkPlaneHandler().SetCurrentTransformationPlane(new TransformationPlane());
            Tekla.Structures.Model.Solid solid1 = currentBeam.GetSolid();
            Point            center             = this.CallulateCenterPoint(solid1.MaximumPoint, solid1.MinimumPoint);
            CoordinateSystem coordinateSystem   = currentBeam.GetCoordinateSystem();
            workPlaneHandler.SetCurrentTransformationPlane(new TransformationPlane(coordinateSystem));
            Tekla.Structures.Model.Solid solid2 = currentBeam.GetSolid();
            Point  maximumPoint = solid2.MaximumPoint;
            Point  minimumPoint = solid2.MinimumPoint;
            double extent0      = (maximumPoint.X - minimumPoint.X) / 2.0;
            double extent1      = (maximumPoint.Y - minimumPoint.Y) / 2.0;
            double extent2      = (maximumPoint.Z - minimumPoint.Z) / 2.0;
            obb = new OBB(center, coordinateSystem.AxisX, coordinateSystem.AxisY, coordinateSystem.AxisX.Cross(coordinateSystem.AxisY), extent0, extent1, extent2);
            this.myModel.GetWorkPlaneHandler().SetCurrentTransformationPlane(new TransformationPlane());
        }
        return(obb);
    }
Exemplo n.º 8
0
        private void InsertComponents(ModelObject mObj, List <TSM.Component> components)
        {
            TransformationPlane originalTransformationplane = null;
            WorkPlaneHandler    wHandler = null;

            try {
                wHandler = model.GetWorkPlaneHandler();
                originalTransformationplane = wHandler.GetCurrentTransformationPlane();
                ComponentInput compInput  = new ComponentInput();
                Part           fatherpart = mObj as Part;
                Assembly       assembly   = fatherpart.GetAssembly();

                // Get the transformationplane from objects coordinate systems vectors and because objects coordinate system is not the same XY plane as of models,
                // so cross product needs to be made for the Y-axis
                TransformationPlane fatherpartsTransformationPlane = new TransformationPlane(fatherpart.GetCoordinateSystem().Origin, fatherpart.GetCoordinateSystem().AxisX, Vector.Cross(fatherpart.GetCoordinateSystem().AxisY, fatherpart.GetCoordinateSystem().AxisX));
                lock (wHandler) {
                    wHandler.SetCurrentTransformationPlane(fatherpartsTransformationPlane);
                }
                double minX            = fatherpart.GetSolid().MinimumPoint.X;
                double minY            = fatherpart.GetSolid().MinimumPoint.Y;
                double minZ            = fatherpart.GetSolid().MinimumPoint.Z;
                double maxX            = fatherpart.GetSolid().MaximumPoint.X;
                double maxY            = fatherpart.GetSolid().MaximumPoint.Y;
                double maxZ            = fatherpart.GetSolid().MaximumPoint.Z;
                bool   changeDirection = false;

                if (data.Direction == "y-")
                {
                    double temp = maxY;
                    maxY            = minY;
                    minY            = temp;
                    changeDirection = true;
                }

                Solid          s     = fatherpart.GetSolid();
                FaceEnumerator fEnum = s.GetFaceEnumerator();
                StringBuilder  sb    = new StringBuilder();
                while (fEnum.MoveNext())
                {
                }
                Point        p1            = null;
                Point        p2            = null;
                List <Point> cutPartPoints = new List <Point>()
                {
                    new Point(),
                    new Point(),
                    new Point(),
                    new Point()
                };
                ContourPlate cutpart = null;

                for (int i = 0; i < components.Count; i++)
                {
                    cutpart                         = new ContourPlate();
                    cutpart.Name                    = "Leikkaus";
                    cutpart.Position.Depth          = Position.DepthEnum.MIDDLE;
                    cutpart.Position.Plane          = Position.PlaneEnum.MIDDLE;
                    cutpart.Class                   = BooleanPart.BooleanOperativeClassName;
                    cutpart.Material.MaterialString = "Reikä";
                    cutpart.Profile.ProfileString   = "PL135";
                    BooleanPart bPart = new BooleanPart();
                    compInput = new ComponentInput();
                    double[] variables;
                    switch (i)
                    {
                    case 0:
                        p1        = new Point(maxX - data.LeftShoeDist, 0, minZ);
                        p2        = new Point(maxX - data.LeftShoeDist, maxY, minZ);
                        variables = WallShoeUtils.GetComponentVariables(components[i]);
                        if (variables[0] != 0)
                        {
                            AddWallShoeCut(variables, p1, minY, maxY, changeDirection, fatherpart);
                        }
                        break;

                    case 1:
                        p1        = new Point(minX + data.RightShoeDist, 0, minZ);
                        p2        = new Point(minX + data.RightShoeDist, maxY, minZ);
                        variables = WallShoeUtils.GetComponentVariables(components[i]);
                        if (variables[0] != 0)
                        {
                            AddWallShoeCut(variables, p1, minY, maxY, changeDirection, fatherpart);
                        }
                        break;

                    case 2:
                        p1 = new Point(maxX - data.LeftBoltDist, 0, maxZ + data.LeftBoltOffset);
                        p2 = new Point(maxX - data.LeftBoltDist, maxY, maxZ + data.LeftBoltOffset);
                        break;

                    case 3:
                        p1 = new Point(minX + data.RightBoltDist, 0, maxZ + data.RightBoltOffset);
                        sb.AppendLine(data.RightBoltDist + " " + data.RightBoltOffset);
                        p2 = new Point(minX + data.RightBoltDist, maxY, maxZ + data.RightBoltOffset);
                        break;
                    }
                    compInput.AddOneInputPosition(p1);
                    compInput.AddOneInputPosition(p2);
                    components[i].SetComponentInput(compInput);
                    if (!components[i].Insert())
                    {
                        TSM.Operations.Operation.DisplayPrompt("Komponentin " + i + " asettaminen epäonnistui!");
                        WriteLog("Komponentin " + i + " asettaminen epäonnistui!");
                    }
                }
                foreach (TSM.Component c in components)
                {
                    assembly.Add(c);
                    assembly.Modify();
                }
            } catch (Exception ex) {
                WriteLog(ex.Message + "\n" + ex.StackTrace);
            } finally {
                lock (wHandler) {
                    wHandler.SetCurrentTransformationPlane(originalTransformationplane);
                }
            }
        }
Exemplo n.º 9
0
        public override bool Run(List <InputDefinition> Input)
        {
            try
            {
                GetValuesFromDialog();

                WorkPlaneHandler wph = Model.GetWorkPlaneHandler();

                TransformationPlane tp     = wph.GetCurrentTransformationPlane();
                TransformationPlane tppart = null;


                BoltGroup bg = Model.SelectModelObject((Identifier)Input[0].GetInput()) as BoltGroup;
                bg.Select();
                List <Part> parts = new List <Part>();
                parts.Add(bg.PartToBeBolted);
                parts.Add(bg.PartToBoltTo);
                foreach (Part p in bg.OtherPartsToBolt)
                {
                    parts.Add(p);
                }

                #region Clear
                List <Part> _part = new List <Part>();

                foreach (Part p in parts)
                {
                    bool flag = false;
                    foreach (Part pp in _part)
                    {
                        if (pp.Identifier.ID == p.Identifier.ID)
                        {
                            flag = true;
                        }
                    }
                    if (!flag)
                    {
                        _part.Add(p);
                    }
                }

                parts.Clear();
                parts = _part;
                #endregion

                foreach (Part p in parts)
                {
                    if (p is Beam)
                    {
                        Beam b = p as Beam;
                        b.Select();

                        double k = 0.0; b.GetReportProperty("PROFILE.FLANGE_SLOPE_RATIO", ref k);
                        if (k == 0)
                        {
                            continue;
                        }

                        tppart = new TransformationPlane(p.GetCoordinateSystem());
                        wph.SetCurrentTransformationPlane(tppart);
                        bg.Select();
                        foreach (Point pb in bg.BoltPositions)
                        {
                            Point _pb = new Point(pb);

                            #region Уклон полок - точки через солид

                            GeometricPlane gp = new GeometricPlane(
                                _pb,
                                new Vector(0, 1, 0),
                                new Vector(0, 0, 1));
                            List <List <Point> > lp = IntersectSolid(p.GetSolid(), gp);

                            List <LineSegment> ls = new List <LineSegment>();


                            for (int i = 0; i < lp[0].Count - 1; i++)
                            {
                                Point  p1 = lp[0][i];
                                Point  p2 = lp[0][i + 1];
                                Vector v  = new Vector(p2.X - p1.X, p2.Y - p1.Y, p2.Z - p1.Z);
                                v.Normalize(1.0);
                                if (v.Y != 0 && v.Z != 0)
                                {
                                    ControlLine cl = new ControlLine();
                                    cl.Line.Point1 = p1;
                                    cl.Line.Point2 = p2;
                                    // cl.Insert();
                                    ls.Add(new LineSegment(p1, p2));
                                }
                            }

                            Point  _p1 = lp[0][0];
                            Point  _p2 = lp[0][lp[0].Count - 1];
                            Vector _v  = new Vector(_p2.X - _p1.X, _p2.Y - _p1.Y, _p2.Z - _p1.Z);
                            if (_v.Y != 0 && _v.Z != 0)
                            {
                                ls.Add(new LineSegment(_p1, _p2));
                                ControlLine cl = new ControlLine();
                                cl.Line.Point1 = _p1;
                                cl.Line.Point2 = _p2;
                                // cl.Insert();
                            }


                            #endregion

                            #region Точки для построения пластины

                            double diam = bg.BoltSize;

                            double tol = GOST_10906_78[diam][0];
                            double _b  = GOST_10906_78[diam][1];
                            double t1  = GOST_10906_78[diam][2];
                            double t2  = GOST_10906_78[diam][3];

                            int kf = (_pb.Z <= ((Point)b.GetReferenceLine(false)[0]).Z ? -1 : 1);

                            _pb.Z += kf * _b * 0.5;


                            double      h   = double.MaxValue;
                            LineSegment lsb = ls[0];

                            foreach (LineSegment lsi in ls)
                            {
                                double t = Distance.PointToLineSegment(_pb, lsi);
                                if (h >= t)
                                {
                                    h   = t;
                                    lsb = lsi;
                                }
                            }
                            //ControlLine cli = new ControlLine();
                            //cli.Line.Point1 = lsb.Point1;
                            //cli.Line.Point2 = lsb.Point2;
                            //cli.Insert();
                            Point pb1 = new Point(_pb.X, _pb.Y + 1000, _pb.Z);

                            Point pbi = Intersection.LineToLine(
                                new Line(lsb),
                                new Line(_pb, pb1)).Point1;
                            //cli.Line.Point1 = _pb;
                            //cli.Line.Point2 = pbi;
                            //cli.Insert();

                            #endregion

                            ContourPlate cp = new ContourPlate();

                            Contour cr = new Contour();
                            cr.AddContourPoint(new ContourPoint(new Point(pbi.X - _b * 0.5, pbi.Y, pbi.Z), null));

                            cr.AddContourPoint(new ContourPoint(new Point(pbi.X + _b * 0.5, pbi.Y, pbi.Z), null));
                            cr.AddContourPoint(new ContourPoint(new Point(pbi.X + _b * 0.5, pbi.Y, pbi.Z - kf * _b), null));
                            cr.AddContourPoint(new ContourPoint(new Point(pbi.X - _b * 0.5, pbi.Y, pbi.Z - kf * _b), null));

                            cp.Contour = cr;


                            cp.Profile.ProfileString      = "PL" + t1.ToString();
                            cp.AssemblyNumber.Prefix      = prefix_asm;
                            cp.AssemblyNumber.StartNumber = start_part;
                            cp.PartNumber.Prefix          = prefix_part;
                            cp.PartNumber.StartNumber     = start_part;

                            cp.Name = name;
                            cp.Material.MaterialString = material;
                            cp.Finish = finish;

                            if (kf == -1 && pbi.Y > 0)
                            {
                                cp.Position.Depth = Position.DepthEnum.FRONT;
                            }
                            else if (kf == -1 && pbi.Y < 0)
                            {
                                cp.Position.Depth = Position.DepthEnum.BEHIND;
                            }
                            else if (kf == 1 && pbi.Y > 0)
                            {
                                cp.Position.Depth = Position.DepthEnum.BEHIND;
                            }
                            else if (kf == 1 && pbi.Y < 0)
                            {
                                cp.Position.Depth = Position.DepthEnum.FRONT;
                            }

                            cp.Insert();

                            if (weight != 0.0 && us_prop_weight != "")
                            {
                                cp.SetUserProperty(us_prop_weight, weight);
                                cp.Modify();
                            }

                            BooleanPart  bp  = new BooleanPart();
                            ContourPlate cp2 = new ContourPlate();
                            Contour      cr2 = new Contour();

                            cr2.AddContourPoint(new ContourPoint(new Point(pbi.X, pbi.Y, pbi.Z), null));
                            cr2.AddContourPoint(new ContourPoint(new Point(pbi.X, pbi.Y, pbi.Z - kf * _b), null));
                            cr2.AddContourPoint(new ContourPoint(new Point(pbi.X, pbi.Y + (pbi.Y > 0 ? -1 * (t1 - t2) : (t1 - t2)), pbi.Z - kf * _b), null));

                            cp2.Contour = cr2;
                            cp2.Profile.ProfileString = "PL" + (_b + 10).ToString();
                            cp2.Class = BooleanPart.BooleanOperativeClassName;

                            cp2.Insert();

                            bp.Father        = cp;
                            bp.OperativePart = cp2;
                            bp.Insert();
                            cp2.Delete();

                            BoltArray ba = new BoltArray();
                            ba.FirstPosition  = pb;
                            ba.SecondPosition = new Point(pb.X + 100, pb.Y, pb.Z);

                            ba.BoltStandard      = bg.BoltStandard;
                            ba.Position.Rotation = Position.RotationEnum.TOP;
                            ba.BoltType          = bg.BoltType;
                            ba.BoltSize          = bg.BoltSize;
                            ba.Tolerance         = tol;
                            ba.Bolt = false;
                            ba.AddBoltDistX(0);
                            ba.AddBoltDistY(0);
                            ba.PartToBeBolted = cp;
                            ba.PartToBoltTo   = cp;
                            ba.Insert();
                        }
                    }
                }
                wph.SetCurrentTransformationPlane(tp);
            }
            catch (Exception Exc)
            {
                MessageBox.Show(Exc.ToString());
            }

            return(true);
        }
Exemplo n.º 10
0
        private void button1_Click(object sender, EventArgs e)
        {
            //1. 기본 가정
            // 1) 슬라브를 배치할 두 빔은 평행
            // 2) 슬라브는 비스듬하게 배치되지 않음.(두빔에 항상 수직방향으로 배치됨)
            // 3) 슬라브는 z평면과 수평하게 배치됨

            ContourPlate contourPlate = new ContourPlate();

            contourPlate.Position.Depth = Position.DepthEnum.FRONT;

            //2. 현재 모델의 좌표계(글로벌좌표계) 및 Z 벡터 저장
            TSM.Model           currentModel     = new TSM.Model();
            WorkPlaneHandler    workPlaneHandler = currentModel.GetWorkPlaneHandler();
            TransformationPlane originPlane      = workPlaneHandler.GetCurrentTransformationPlane();

            //3. 슬라브 생성할 두 부재 선택
            Picker picker = new Picker();

            TSM.ModelObject mainpart  = picker.PickObject(Picker.PickObjectEnum.PICK_ONE_PART, "슬라브를 삽입할 첫번째 부재를 선택하세요.");
            TSM.Beam        startBeam = mainpart as TSM.Beam;
            mainpart = picker.PickObject(Picker.PickObjectEnum.PICK_ONE_PART, "슬라브를 삽입할 두번째 부재를 선택하세요.");
            TSM.Beam endBeam = mainpart as TSM.Beam;

            //4. 새 좌표계 생성(startBeam과 EndBeam과의 관계 내포)
            TSG.Vector          coordinateVector2    = new TSG.Vector(startBeam.EndPoint - startBeam.StartPoint);
            TSG.Vector          coordinateVector1    = new TSG.Vector(endBeam.EndPoint - startBeam.StartPoint);
            TransformationPlane slabCoordinateSystem = new TransformationPlane(startBeam.StartPoint, coordinateVector2, coordinateVector1);

            workPlaneHandler.SetCurrentTransformationPlane(slabCoordinateSystem);

            //5. 슬라브 Point시작점 위치 잡기
            //1) 슬라브 벡터 설정
            TSG.Vector slabVector = new TSG.Vector(0, 1, 0);

            //3) offset길이만큼 beam1 e.p 방향으로 이동(추후 작성)
            //4) 걸침 높이만큼 z축 방향으로 이동(여기서는 slab Height로 가야함)(추후 작성)

            //6. 슬라브 치수요소 입력 ( 현재는 상수 )
            double slabWidthLeft   = 300;
            double slabWidthCenter = 300;
            double slabWidthRight  = 300;
            double slabHeight      = 300;
            double ribDistUpper    = 50;
            double ribDistLower    = 30;
            double slabThickness   = 100;

            //7. 슬라브 시작점 설정
            TSG.Point slabStartPoint = new TSG.Point(0, 0, (Methods.GetGirderHeight(startBeam) * 0.5 + slabHeight) * -1);

            //Y방향 설정
            double startOffset = 100;

            slabStartPoint += slabVector * Methods.GetGirderWidth(startBeam) * 0.5;
            slabStartPoint += slabVector * startOffset * -1;

            //8. 슬라브 포인트 입력 (수정)
            TSG.Point point1  = new TSG.Point(slabStartPoint.X, slabStartPoint.Y, slabStartPoint.Z);
            TSG.Point point2  = new TSG.Point(slabStartPoint.X, slabStartPoint.Y, slabStartPoint.Z + (slabThickness));
            TSG.Point point3  = new TSG.Point(slabStartPoint.X + slabWidthLeft - ribDistUpper / 2, slabStartPoint.Y, slabStartPoint.Z + (slabThickness));
            TSG.Point point4  = new TSG.Point(slabStartPoint.X + slabWidthLeft - ribDistLower / 2, slabStartPoint.Y, slabStartPoint.Z + (slabHeight));
            TSG.Point point5  = new TSG.Point(slabStartPoint.X + slabWidthLeft + ribDistLower / 2, slabStartPoint.Y, slabStartPoint.Z + (slabHeight));
            TSG.Point point6  = new TSG.Point(slabStartPoint.X + slabWidthLeft + ribDistUpper / 2, slabStartPoint.Y, slabStartPoint.Z + (slabThickness));
            TSG.Point point7  = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter - ribDistUpper / 2, slabStartPoint.Y, slabStartPoint.Z + (slabThickness));
            TSG.Point point8  = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter - ribDistLower / 2, slabStartPoint.Y, slabStartPoint.Z + (slabHeight));
            TSG.Point point9  = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter + ribDistLower / 2, slabStartPoint.Y, slabStartPoint.Z + (slabHeight));
            TSG.Point point10 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter + ribDistUpper / 2, slabStartPoint.Y, slabStartPoint.Z + (slabThickness));
            TSG.Point point11 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter + slabWidthRight, slabStartPoint.Y, slabStartPoint.Z + (slabThickness));
            TSG.Point point12 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter + slabWidthRight, slabStartPoint.Y, slabStartPoint.Z);

            //TSG.Point point1 = new TSG.Point(slabStartPoint.X, slabStartPoint.Y, slabStartPoint.Z);
            //TSG.Point point2 = new TSG.Point(slabStartPoint.X, slabStartPoint.Y, slabStartPoint.Z + (slabThickness) * -1);
            //TSG.Point point3 = new TSG.Point(slabStartPoint.X + slabWidthLeft - ribDistUpper / 2, slabStartPoint.Y, slabStartPoint.Z + (slabThickness) * -1);
            //TSG.Point point4 = new TSG.Point(slabStartPoint.X + slabWidthLeft - ribDistLower / 2, slabStartPoint.Y, slabStartPoint.Z + (slabHeight) * -1);
            //TSG.Point point5 = new TSG.Point(slabStartPoint.X + slabWidthLeft + ribDistLower / 2, slabStartPoint.Y, slabStartPoint.Z + (slabHeight) * -1);
            //TSG.Point point6 = new TSG.Point(slabStartPoint.X + slabWidthLeft + ribDistUpper / 2, slabStartPoint.Y, slabStartPoint.Z + (slabThickness) * -1);
            //TSG.Point point7 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter - ribDistUpper / 2, slabStartPoint.Y, slabStartPoint.Z + (slabThickness) * -1);
            //TSG.Point point8 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter - ribDistLower / 2, slabStartPoint.Y, slabStartPoint.Z + (slabHeight) * -1);
            //TSG.Point point9 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter + ribDistLower / 2, slabStartPoint.Y, slabStartPoint.Z + (slabHeight) * -1);
            //TSG.Point point10 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter + ribDistUpper / 2, slabStartPoint.Y, slabStartPoint.Z + (slabThickness) * -1);
            //TSG.Point point11 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter + slabWidthRight, slabStartPoint.Y, slabStartPoint.Z + (slabThickness) * -1);
            //TSG.Point point12 = new TSG.Point(slabStartPoint.X + slabWidthLeft + slabWidthCenter + slabWidthRight, slabStartPoint.Y, slabStartPoint.Z);


            contourPlate.AddContourPoint(new ContourPoint(point1, null));
            contourPlate.AddContourPoint(new ContourPoint(point2, null));
            contourPlate.AddContourPoint(new ContourPoint(point3, null));
            contourPlate.AddContourPoint(new ContourPoint(point4, null));
            contourPlate.AddContourPoint(new ContourPoint(point5, null));
            contourPlate.AddContourPoint(new ContourPoint(point6, null));
            contourPlate.AddContourPoint(new ContourPoint(point7, null));
            contourPlate.AddContourPoint(new ContourPoint(point8, null));
            contourPlate.AddContourPoint(new ContourPoint(point9, null));
            contourPlate.AddContourPoint(new ContourPoint(point10, null));
            contourPlate.AddContourPoint(new ContourPoint(point11, null));
            contourPlate.AddContourPoint(new ContourPoint(point12, null));

            contourPlate.Profile.ProfileString   = "2000";
            contourPlate.Material.MaterialString = "C24";

            bool result = false;

            result = contourPlate.Insert();
            currentModel.CommitChanges();

            //모델의 좌표계를 재로드
            workPlaneHandler.SetCurrentTransformationPlane(originPlane);
        }