Message 1 of 13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi every one, Im facing a wierd condition that tow lines are interesected, but the intersect method does not work.
this is the code:
its not just this, some lines that intersect with blocks have the same issue:
this is my code:
[CommandMethod("intersector")]
public void inters()
{
using (var tr = db.TransactionManager.StartOpenCloseTransaction())
{
var promptEntOpt1 = new PromptEntityOptions("Please select a first object");
var res1 = ed.GetEntity(promptEntOpt1);
var ent1 = (Entity)tr.GetObject(res1.ObjectId, OpenMode.ForRead);
promptEntOpt1.Message = "\nPlease select a second object";
var res2 = ed.GetEntity(promptEntOpt1);
var ent2 = (Entity)tr.GetObject(res1.ObjectId, OpenMode.ForRead);
var intersect = new Point3dCollection();
ent1.IntersectWith(ent2, Intersect.OnBothOperands, intersect, IntPtr.Zero, IntPtr.Zero);
Application.ShowAlertDialog(intersect.Count.ToString());
}
}
Solved! Go to Solution.