关于Teigha的偏移,求助高手,在线等
using System;using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Teigha.DatabaseServices;
using Teigha.Runtime;
using Teigha.Geometry;
using Teigha.GraphicsInterface;
using Teigha.GraphicsSystem;
namespace Offset3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
using (Services ser = new Services())
{
string filename = "E:\\aaa.dxf";
Database db = new Database();
using (var trans = db.TransactionManager.StartTransaction())
{
BlockTableRecord btrec = trans.GetObject(db.CurrentSpaceId, OpenMode.ForWrite) as BlockTableRecord;
Circle cir = new Circle();
cir.Center = new Point3d(0, 0, 0);
cir.Radius = 500;
btrec.AppendEntity(cir);
trans.AddNewlyCreatedDBObject(cir, true);
DBObjectCollection ids = cir.GetOffsetCurves(20);
foreach (Entity ent in ids)
{
btrec.AppendEntity(ent);
trans.AddNewlyCreatedDBObject(ent, true);
}
trans.Commit();
db.DxfOut(filename,1,DwgVersion.AC1015);
//db.SaveAs(filename,DwgVersion.AC1015);
db.Dispose();
this.Close();
}
}
}
}
}
这段代码中圆能正确画出并显示,可是偏移后的圆却怎么都没有,到底是哪里出了问题,请高手指点一下。
没人知道吗? 调试的结果是ids的Count==0
估计Teigha没有实现这一功能,,,这在Teigha里是常见的 雪山飞狐_lzh 发表于 2016-2-2 15:29 static/image/common/back.gif
调试的结果是ids的Count==0
估计Teigha没有实现这一功能,,,这在Teigha里是常见的
谢谢!!!原来是这样啊。
页:
[1]