Boundary and bhatch on custom entities

By Gopinath Taget

Lets say, you have created a custom entity based on a polyline, but derived from a AcDbEntity, and wish to change the way BHATCH and BOUNDARY find the edges of my object.

You can do this by overriding the AcDbEntity::explode() virtual method to return the boundaries you want used by the BOUNDARY or BHATCH commands. You would check the CMDNAMES system variable, to see whether one of the two commands was active, and then return the appropriate entities. Note that if you derive from AcDbPolyline, it will not call explode on your entity, but will use
the Polyline data directly.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading