Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to find the intersection between two cylinders using the "SurfaceSurfaceIntersection" transient geometry tool. The help file is a little lacking. I have to assume the cylinder object starts at the "BasePoint" and extends forever in the specified "Direction". I don't know if this is true or not. However; I've played around with the input objects, changing the direction of the cylinder, and it always returns null, regardless of the inputs. What am I doing wrong?
This png file illustrates the two cylinders. The opening cylinder is the hole on the right side of the rolled or casing cylinder. They intersect in the model.
Thanks.
TransientGeometry _tg = Inventor.Application.TransientGeometry;
// Set a reference to the opening cylinder axis.
// This is a 30° line extending to the right.
LineSegment _openingAxis = _tg.CreateLineSegment(_tg.CreatePoint(0, 0, 0), _tg.CreatePoint(59.392058, 34.29, 0));
// Set a reference to the opening cylinder.
Cylinder _openingCylinder = _tg.CreateCylinder(_openingAxis.StartPoint, _openingAxis.Direction, 2.12 / 2);
// Set a reference to the case cylinder.
// I've tried 1 and -1 for the Z-Axis value.
Cylinder _caseCylinder = _tg.CreateCylinder(_tg.CreatePoint(0, 0,0), _tg.CreateUnitVector(0, 0, -1), 37 / 2);
// Set a reference to the intersection object. This always returns null.
ObjectsEnumerator _objects = _tg.SurfaceSurfaceIntersection(_openingCylinder, _caseCylinder);
Solved! Go to Solution.