Model teklamodel = new Model();
Point point = new Point(0, 7000, 0);
Point point2 = new Point(1000, 7000, 0);
Beam Beam1 = new Beam();
Beam1.StartPoint = point;
Beam1.EndPoint = point2;
Beam1.Profile.ProfileString = "HI300-15-20*300";
Beam1.StartPointOffset = new Offset();
Beam1.EndPointOffset = new Offset();
Beam1.Insert();
Beam Beam2 = new Beam();
Beam2.StartPoint = new Point(500, 6000, 0);
Beam2.EndPoint = new Point(500, 8000, 0);
Beam2.Class = BooleanPart.BooleanOperativeClassName;
Beam2.Profile.ProfileString = "HI300-15-20*300";
Beam2.Insert();
BooleanPart boolPart = new BooleanPart();
boolPart.Father = Beam1;
boolPart.Type = BooleanPart.BooleanTypeEnum.BOOLEAN_ADD;
boolPart.SetOperativePart(Beam2);
if (!boolPart.Insert())
Console.WriteLine("Insert failed!");
Beam2.Delete();
teklamodel.CommitChanges();
Tekla二次开发——怎么将两个物体合并
于 2022-03-19 09:15:27 首次发布