3
スイープポリラインの頂点を検索しようとしています。 3Dポリラインに沿って円を掃くことによって作成されたソリッドがあります。 それは次のようになります:image of sweeped solidAutoCADで下位要素の頂点をAutoCADで取得する
先週金曜日の全体をグージョーリングすると私はサブエントリー部分で遊ばなければならないと思います。私はサブエントリエッジの色を変える方法を見つけましたが、キリストのためにはできませんでした。幾何学にアクセスする方法を見つけられません
これは私がこれまでに試したことですが、ちょっとそこに失われています:
[CommandMethod("SubEntExample")]
public void SubEntExample()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
PromptEntityOptions peo = new PromptEntityOptions("\nSelect a 3D solid: ");
peo.SetRejectMessage("\nInvalid selection...");
peo.AddAllowedClass(typeof(Solid3d), true);
PromptEntityResult per = ed.GetEntity(peo);
if (per.Status != PromptStatus.OK)
return;
using (Transaction Tx = db.TransactionManager.StartTransaction())
{
Solid3d solid = Tx.GetObject(per.ObjectId, OpenMode.ForWrite) as Solid3d;
ObjectId[] ids = new ObjectId[] { per.ObjectId };
FullSubentityPath path = new FullSubentityPath(ids, new SubentityId(SubentityType.Null, IntPtr.Zero));
List<SubentityId> subEntIds = new List<SubentityId>();
using (Autodesk.AutoCAD.BoundaryRepresentation.Brep brep =
new Autodesk.AutoCAD.BoundaryRepresentation.Brep(path))
{
foreach (Autodesk.AutoCAD.BoundaryRepresentation.Edge edge in brep.Edges)
{
subEntIds.Add(edge.SubentityPath.SubentId);
}
}
foreach (SubentityId subentId in subEntIds)
{
*** here i am lost ***
}
Tx.Commit();
}
}
エンティティをDXFにエクスポートし、テキストファイルのデータの構成を調べる方法はありますか?あなたにサブエンティティの仕組みを説明するかもしれません。私は手元にある事件の具体的な知識は持っていませんが、もし彼らが "id"であれば、次にそれらのidを "開く"ものは何でしょうか?これらは、座標データを提供する適切なオブジェクトを返します。しかし、それは推測です。 DXFを見ると、より多くの情報が表示される場合があります。おそらくあなたはあなたの質問にそれを加えることができます。 –