PDA

View Full Version : Need some advice for extracting a face of a 3Dsolid in .Net 2005 and acad 2008?



RMS
5th Jul 2010, 02:02 am
I am at a dead end here, I am limited to VS 2005 and AutoCAD 2008 so any suggestions on how I would get the two faces of this solid in VB.net? Basically I am trying to ultimately get the 2D geometry of the two faces shown in the pic .......I was looking at "C# code traverses the Brep of a selected Solid3d," but this API is for 2009 AutoCAD. Any ideas?

Thanks.

SEANT
5th Jul 2010, 08:49 am
I don’t have the 2008 Managed Class Reference Guide to know what is or isn’t available. You may have to go “old school” on this. By that I mean retrieving the geometry via the Solid’s and Region’s Explode Method. The “debris” of those explosions is returned as a DBObjectCollection, so analyzing (and subsequent deletion) is fairly straightforward.

SEANT
5th Jul 2010, 09:04 am
Here is a posting with a sample of the “old school” mentioned previously. The VBA routine in that thread was done with AutoCAD 2004, which did not have an Explode option for solids. I’m not sure if that is available through the 2008 .NET API either.

http://forums.autodesk.com/t5/Visual-Basic-Customization/divide-a-region-into-several-regions/m-p/1861065/

RMS
6th Jul 2010, 03:19 am
You may have to go “old school” on this. By that I mean retrieving the geometry via the Solid’s and Region’s Explode Method. The “debris” of those explosions is returned as a DBObjectCollection, so analyzing (and subsequent deletion) is fairly straightforward.

Great; I tested out .Explode(acDBObjColl) in AutoCAD 2008 and it worked. Now I can try to get the 2D edge geometry of each side to this subtracted solid.