Project Line to Surface using Brep in CAD
Nuget References
Nuget: AutoCAD.NET.Interop
AutoCAD-2016.Net.Base
Reference Links
Traversing a 3D solid’s brep using AutoCAD 2009’s new .NET API
Brep
Boundary Representation (BRep) is the most mature and unambiguous representation method in geometric modeling. The boundary of a solid is usually represented by the union of faces, and each face is represented by the surface it lies on plus its boundaries. The boundaries of a face are the union of edges, and edges are represented by vertices.
Brep Structure in CAD
- Brep
- Complex
- Shell
- Faces
- Vertex
- Faces
- Shell
- Complex
Notes
Conventional API graphic operations in CAD are in Geometry, but strictly for 2D expressions or simple 3D expressions, such as creating 3D lines, Boolean operations, etc. If more complex calculations are needed, the functions in the Brep module must be used. If developing with C++, you can directly find AcadRegion and read the data. If developing with .NET, you need to reference the Interop package mentioned above and cast the object to the Acad structure to read it.
dbRegion.AcadObject as AcadRegion;
API
Entity[] ProjectOnToSurface(Entity entityToProject, Vector3d projectionDirection)
Code
1 | var dbRegion = entity as Region; |



