3
我正在嘗試查找掃描折線的頂點點。 所以我有一個固體,它是通過沿着三維多段線掃一圈創建的。 它看起來像這樣:image of sweeped solid在AutoCAD中獲取實體的子實體頂點點
Googeling上週的整個星期五,我想我必須玩subentity部分。我發現如何改變subentity邊緣的顏色,但不能爲基因找不到如何訪問幾何
這是我到目前爲止的嘗試,但正如我注意到在底部我我有點失去了存在:
[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並查看文本文件中數據的組成?它可能會向你解釋子實體的機制。我手邊沒有具體的案件知識,但是,如果他們是「身份證」,那麼你接下來要「打開」這些身份證的什麼?這些將返回提供座標數據的合適對象。但這是一個猜測。查看DXF可能會顯示更多信息。也許你可以把它添加到你的問題。 –