예제 #1
0
        public void CreateExtrudedSolid()
        {
            // 在内存中创建拉伸截面对象.
            Circle ent = new Circle(new Point3d(200, 100, 0), Vector3d.ZAxis, 100);
            // 截面对象添加到对象集合.
            DBObjectCollection ents = new DBObjectCollection();

            ents.Add(ent);
            // 在内存中创建面域对象集合.
            DBObjectCollection regions = Region.CreateFromCurves(ents);
            // 实施拉伸,并将拉伸体添加到图形数据库.
            ObjectId extrudedSolidId = ModelSpace.AddExtrudedSolid((Region)regions[0], 500, 0);
        }
예제 #2
0
        public void CreateExtrudeAlongPath()
        {
            // 在内存中创建拉伸截面对象.
            Circle ent = new Circle(new Point3d(200, 0, 0), Vector3d.ZAxis, 100);
            // 截面对象添加到对象集合.
            DBObjectCollection ents = new DBObjectCollection();

            ents.Add(ent);
            // 在内存中创建面域对象集合.
            DBObjectCollection regions = Region.CreateFromCurves(ents);
            // 在内存中创建拉伸路径对象.
            Arc pathEnt = new Arc(new Point3d(500, 0, 0), new Vector3d(0, 1, 0), 300, 0, Math.PI);
            // 实施拉伸,并将拉伸体添加到图形数据库.
            ObjectId extrudeAlongPathId = ModelSpace.AddExtrudedSolid((Region)regions[0], pathEnt, 0);
        }