Intersection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I´m using the method below in order to calculate the intersections points in a set of structural grids.
The grids are divided in a list of horizontal grids (Eixos[0]) and a list of vertical grids (Eixos[1]), separatly)
I put all the intersections in a Lpti.
It´s working OK with a set of ortogonal grid lines, but when one of the grid lines is not orthogonal the IntersectionResult fails.
Thank You
public List<XYZ> Interseccion_Ejes(List<List<Grid>> Eixos)
{
List<XYZ> Lpti = new List<XYZ> { };
for (int i = 0; i < Eixos[0].Count; i++)
{
Curve c1 = Eixos[0].ElementAt(i).Curve;
for (int j = 0; j < Eixos[1].Count; j++)
{
Curve c2 = Eixos[1].ElementAt(j).Curve;
IntersectionResultArray results;
SetComparisonResult result = c1.Intersect(c2, out results);
IntersectionResult iResult = results.get_Item(0);
Lpti.Add(iResult.XYZPoint);
}
}
return Lpti;
}