What are geometric entities for?
Geometric entities are the main objects in the CADability database.
Usually many geometric entities are contained in a Model. If a model is displayed in a ModelView the geometric entities are displayed on the screen (in the CADControl). There are some families of geometric entities:
- Curves (e.g. Line, BSpline, etc.)
- Blocks (collections of geometric entities, hierarchical tree of objects)
- BRep objects (e.g. Solid, Face, etc.)
What do all geometric entities have in common?
From a programmer's point of view it is the IGeoObjectinterface. Geometric entities may be
- visualized (in a Model which is contained in a ModelView)
- serialized (via the ISerializable interface)
- selected with mouseclicks in various ways
- modified by a ModOp
- displayed in the control center, where their properties are editable
How do I define my own geometric entity?
There are several ways to define customized geometric entities:
1. Define a class that implements IGeoObject and . This is certainly a huge task and in most cases not necessary.
How do I connect additional information to Geometric Entities?
Use the UserData property. This property acts like a dictionary that lets you add any data to the geometric entity. If your data is serializable it will also be saved in the CADability database (cdb file). If your data implements the IShowProperty interface or is a simple datatype like int, double or string, it will be displayed in the control center (when the object is selected).