2017-06-15 4 views
0

私のタイトルは、床の端にある全エンドポイントを知りたい。誰にも解決策がありますか?多分このような 私の理想的な:Revit API:床の端にある総ポイントをカウントするにはどうすればよいですか?

int i = 0; 
FilteredElementCollector docCollector1 = new FilteredElementCollector(doc).OfClass(typeof(Point)); 
foreach(Point point in docCollector1) 
{ 
    i++; 
} 
TaskDialog.Show("Revit","Have total {0} point on the edge of the floor ", i); 

この画像は私の問題についてです:私は私の床をarroundのどのように多くのエンドポイントを知ることwan't Edge has endpoint

私はこのコードで4つのエッジを特定できますが、各エッジのすべてのポイントを取得することはまだ分かりません。

for (int i = 0; i < ea.Size; i++) 
{ 
    Edge e = ea.get_Item(i); 
     //Identify point located edge in here  
    IList<XYZ> exyz = e.Tessellate(); 
    int m = exyz.Count; 
    XYZ sPoint = exyz[0]; 
    XYZ ePoint = exyz[m - 1]; 
    XYZ mPoint = new XYZ((sPoint.X + ePoint.X)/2, (sPoint.Y + ePoint.Y)/2, 0);   
} 
+0

あなたは、詳細な問題の説明を追加する必要があります - 結果が期待されているもの、あなたが実際に何がありますか?エラーがある場合、何らかのエラーの説明。もちろん、問題を再現するために必要なコードを追加する必要があります –

答えて

1

私はちょうどRevit API discussion forumhow to get all the points on the edge of the floorにあなたの質問に答え:

をあなたはBoundingBoxIntersectsFilterを使用して、例えば、幾何学的な場所フィルタを追加することができます。ここで

は、いくつかの例は以下のとおりです。

http://thebuildingcoder.typepad.com/blog/2013/03/filter-for-family-instances-in-a-room.html

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.9

関連する問題