region.BooleanOperation(BooleanOperationType.BoolSubtract, region1)异常
本帖最后由 LDJ 于 2015-5-29 13:57 编辑BlockTable bt = (BlockTable)tr.GetObject(db.BlockTableId, OpenMode.ForRead);
BlockTableRecord btr = (BlockTableRecord)tr.GetObject(bt, OpenMode.ForWrite);
Entity entity = tr.GetObject(entityID, OpenMode.ForWrite) as Entity;
Entity entity2 = tr.GetObject(entityID2, OpenMode.ForWrite) as Entity;
DBObjectCollection curveSegments = new DBObjectCollection();
curveSegments.Add(entity);
DBObjectCollection regions = Region.CreateFromCurves(curveSegments);
DBObjectCollection curveSegments2 = new DBObjectCollection();
curveSegments2.Add(entity2);
DBObjectCollection regions2 = Region.CreateFromCurves(curveSegments2);
Region region = regions as Region;
Region region1 = regions2 as Region;
region.BooleanOperation(BooleanOperationType.BoolSubtract, region1);
entity和entity2是2个闭合的polyline
相交
BooleanOperation前region 和region2面积都不是0
BooleanOperation后region 面积为0 region.BooleanOperation(BooleanOperationType.BoolSubtract, region1);有异常
测试环境是c#2010+autoccad2013
高手帮助看下。这个问题困扰我几天了
页:
[1]