C# Cad 拉伸 关键 GetStretchPoints MoveStretchPointsAt
Posted 上帝视角
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C# Cad 拉伸 关键 GetStretchPoints MoveStretchPointsAt相关的知识,希望对你有一定的参考价值。
/// <summary> /// 拉伸 /// </summary> [CommandMethod("ALS")] public void Tensile() var ids = Editor.Selection($"\\n选择图形"); ids = ids.Deletes(); if (ids == null || !ids.Any()) return; var beginPoint = Editor.Point("\\n指定绘图起点"); if (beginPoint.IsNull()) return; var entitys = ids.QOpenForRead<Entity>(); // Surface surface = new Autodesk.AutoCAD.DatabaseServices.Surface(); var ent1 = entitys[0]; var ent2 = entitys[1]; var newEntitys = new List<Entity>(); newEntitys.Add(ent2); //var ddd = ent1.JoinEntities(newEntitys.ToArray()); foreach (var item in entitys) IntegerCollection dddd = new IntegerCollection(); var stretchPoints = new Point3dCollection(); item.GetStretchPoints(stretchPoints); for (int i = 0; i < stretchPoints.Count; i++) var p = stretchPoints[i]; if (p.Coincide(beginPoint, 0.01)) dddd.Add(i); if (dddd.Count > 0) item.ObjectId.QOpenForWrite<Entity>(c => c.MoveStretchPointsAt(dddd, new Vector3d(100, 0, 0)); );
以上是关于C# Cad 拉伸 关键 GetStretchPoints MoveStretchPointsAt的主要内容,如果未能解决你的问题,请参考以下文章