Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
is there easy way how to check if some block are overlapping? I have test DWG like on the picture. All blocks are on top level.... i mean they aren't nested. i tryed use BoundingBoxIntersectWith but it doesn't works. It is possible to use this command in 3D like that?
//test sample
for (int i = 0; i < connectorElements.Count-1; i++)
{
Entity blk = (Entity)tr.GetObject(db.GetObjectId(false, new Handle(Convert.ToInt64(connectorElements[i].HandleValue)), 0), OpenMode.ForRead);
Entity blk2 = (Entity)tr.GetObject(db.GetObjectId(false, new Handle(Convert.ToInt64(connectorElements[i + 1].HandleValue)), 0), OpenMode.ForRead);
Point3dCollection points = new Point3dCollection();
blk.BoundingBoxIntersectWith(blk2, Intersect.OnBothOperands, points, new IntPtr(0), new IntPtr(0));
if (points.Count > 0)
{
Debug.Print("Found");
}
}
...
Solved! Go to Solution.