.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Get Point Collection from 3dsolid
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I know this must be an easy answer, but for the life I me I can't find the method that returns a point collection for a given 3dsoild. I have to think that a property exists that contains all the points for a solid (the ones shown when you select a 3dsolid). I appreciate the help. Thanks!
Solved! Go to Solution.
Re: Get Point Collection from 3dsolid
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: Get Point Collection from 3dsolid
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you for the link. I guess it wasn't quite as easy as I would have thought. I figured there would just be a property for 3dsolids that contained all the points. Never the less, I can probably get that code to work. Thanks again.
Re: Get Point Collection from 3dsolid
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
If you only need the solid vertices, you don't need to run through the whole brep tree.
Here's a little sample.
public Point3dCollection GetSolidVertices(ObjectId id)
{
Database db = HostApplicationServices.WorkingDatabase;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
Solid3d sol = tr.GetObject(id, OpenMode.ForRead) as Solid3d;
if (sol == null) return null;
try
{
Point3dCollection pts = new Point3dCollection();
using (Brep brp = new Brep(sol))
{
foreach (var vtx in brp.Vertices)
{
pts.Add(vtx.Point);
}
return pts;
}
}
catch { return null; }
}
}
Re: Get Point Collection from 3dsolid
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks _guile, that was more along the lines of what I was looking for. Excellent.



