Пример #1
0
 public static AcGe.Point2dCollection Offset(
     AcGe.Point2dCollection collection,
     AcGe.Vector2d offset)
 {
     AcGe.Point2dCollection offsetCollection = new AcGe.Point2dCollection();
     foreach (AcGe.Point2d point in collection)
     {
         offsetCollection.Add(point.Add(offset));
     }
     return(offsetCollection);
 }
Пример #2
0
        static List <AcDb.ObjectId> InsertAllParcel(BL blockLand, AcGe.Vector2d offset)
        {
            AcDb.Polyline2d        curPolyline;
            AcGe.Point2dCollection points;
            List <AcDb.ObjectId>   listObjectId = new List <AcDb.ObjectId>();

            foreach (SR sr in blockLand.SR)
            {
                points      = ServiceSimpleElements.Offset(ServiceIn4.GetPoints2dFromIn4Polygon(sr), offset);
                curPolyline = ServiceSimpleElements.CreatePolyline2d(points, true);
                listObjectId.Add(ServiceCAD.InsertObject(curPolyline));
            }

            return(listObjectId);
        }