I'm using the IntersectWith method with two pipes. The IntersectWith method doesn't appear to work with curved pipes if the pipes do not cross. If they don't cross the method works, but if they don't then it doesn't find the intersect points properly. This appears to be an issue with Civil 3D 2010 to 2012 API.
http://screencast.com/t/t7mgTryqH
In the screencast image the pipe on the right finds the intersection point with the straight pipe on the left, but not the curved pipe that is in the middle. Can someone with Autodesk please fill out an error report for this? I've had poor results trying to put in support requests for API related issues.
For Civil 3D 2010 here's the code that isn't working:
oPoints = new Point3dCollection();
Pipe oLateral = (Pipe)lateralObjId.GetObject(OpenMode.ForRead);
Pipe oMain = (Pipe)mainObjId.GetObject(OpenMode.ForRead);
oLateral.IntersectWith(oMain, Intersect.ExtendThis, oPoints, 0, 0);
Thank you,
Christopher
Solved! Go to Solution.
Solved by augusto.goncalves. Go to Solution.
Hi Christopher
If the pipe is an Arc we nned to use the Pipe.Curve2d property instead. Note that the Pipe.BaseCurve is not good for Arc, but for Lines.
Regards,
Augusto Goncalves
Autodesk Developer Network
Thanks Augusto. It looks like I have to do more work then if the curved pipe doesn't cross the pipe I'm looking for.
Christopher