AS 創建焊縫

private void CreateWelds(List<CreatedObjectInformation> arrCOI, Beam beam1, Beam beam2, Plate plate, AAG.Point3d welPt1, AAG.Point3d welPt2)
        {
            AAG.Point3d ptOrig1;
            AAG.Vector3d vX1, vY1, vZ1;
            beam2.PhysCSMid.GetCoordSystem(out ptOrig1, out vX1, out vY1, out vZ1);
            //肋板與底板焊縫
            WeldPoint weldPattern = new WeldPoint(welPt1, vX1, vY1);
            weldPattern.SetWeldType(WeldPattern.eSeamPosition.kLower, (WeldPattern.eWeldType)_weldKey);
            if (weldPattern != null)
            {
                weldPattern.WriteToDb();
                weldPattern.Connect(new HashSet<FilerObject>() { plate, beam1 }, AtomicElement.eAssemblyLocation.kInShop);
                CreatedObjectInformation coi = new CreatedObjectInformation();
                coi.CreatedObject = weldPattern;
                coi.JointTransferId = "myWelds";
                coi.Attributes = new eObjectsAttribute[0];
                arrCOI.Add(coi);
            }
            //肋板與主樑焊縫
            weldPattern = new WeldPoint(welPt2, vX1, vY1);
            weldPattern.SetWeldType(WeldPattern.eSeamPosition.kLower, (WeldPattern.eWeldType)_weldKey);
            if (weldPattern != null)
            {
                weldPattern.WriteToDb();
                weldPattern.Connect(new HashSet<FilerObject>() { plate, beam2 }, AtomicElement.eAssemblyLocation.kInShop);
                CreatedObjectInformation coi = new CreatedObjectInformation();
                coi.CreatedObject = weldPattern;
                coi.JointTransferId = "myWelds";
                coi.Attributes = new eObjectsAttribute[0];
                arrCOI.Add(coi);
            }
        }

注: AtomicElement.eAssemblyLocation.kInShop 工廠焊接,組成部件後會加入,如果是現場焊接不會加入的AtomicElement.eAssemblyLocation.kInSite。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章