Tekla二次开发之切割部分的详解

Tekla二次开发之切割部分的详解一、BooleanPartModelteklamodel=newModel();Pointpoint=newPoint(0,7000,0);Pointpoint2=newPoint(1000,7000,0);BeamBeam1=newBeam();Beam1.StartPoint=point;Beam1.EndPoint=point2;Beam1.Profile.ProfileString=”HI300-15-20*300″;Beam1.

一、BooleanPart

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.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 Beam = new BooleanPart();
Beam.Father = Beam1;
Beam.SetOperativePart(Beam2);
if (!Beam.Insert())
  Console.WriteLine("Insert failed!");
Beam2.Delete();

teklamodel.CommitChanges();

二、CutPlane

Point Point = new Point(-1000, 0, 0);
Point Point2 = new Point(1000, 0, 0);

Beam Beam = new Beam();
Beam.StartPoint = Point;
Beam.EndPoint = Point2;
Beam.Profile.ProfileString = "HI550-8-12*350";
Beam.Finish = "PAINT";
Beam.Insert();

CutPlane CutPlane = new CutPlane();
CutPlane.Plane = new Plane();
CutPlane.Plane.Origin = new Point(0, 0, 0);
CutPlane.Plane.AxisX = new Vector(0, 1000, 0);
CutPlane.Plane.AxisY = new Vector(0, 0, -1000);
CutPlane.Father = Beam;
CutPlane.Insert();

三、EdgeChamfer

Point Point = new Point(0, 0, 0);
Point Point2 = new Point(1000, 0, 0);
Beam = new Beam();
Beam.StartPoint = Point;
Beam.EndPoint = Point2;
Beam.Profile.ProfileString = "400*400";
Beam.Finish = "PAINT";
Beam.Insert();
EdgeChamfer EdgeChamfer = new EdgeChamfer(new Point(0, -100, 0), new Point(0, 200, 0));
EdgeChamfer.FirstChamferEndType = EdgeChamfer.ChamferEndTypeEnum.BEVELLED;
EdgeChamfer.FirstBevelDimension = 50;
EdgeChamfer.Chamfer.X = 20;
EdgeChamfer.Chamfer.Y = 20;
EdgeChamfer.Father = Beam;
EdgeChamfer.Insert();

四、Fitting

Point Point = new Point(0, 0, 0);
Point Point2 = new Point(1000, 0, 0);

Beam Beam = new Beam();
Beam.StartPoint = Point;
Beam.EndPoint = Point2;
Beam.Profile.ProfileString = "HI550-8-12*350";
Beam.Finish = "PAINT";
Beam.StartPointOffset = new Offset();
Beam.EndPointOffset = new Offset();
Beam.Insert();

Fitting Fitting = new Fitting();
Fitting.Father = Beam;
Fitting.Plane = new Plane();
Fitting.Plane.Origin = new Point(-500, 0, 0);
Fitting.Plane.AxisX = new Vector(0, 1000, 0);
Fitting.Plane.AxisY = new Vector(0, 0, -1000);
Fitting.Insert();

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/35856.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注