With Eyeshot 2022 we make a strong separation between geometric algorithms and object rendering. For this reason, we introduced a new hierarchy of objects under the namespace devDept.Geometry.Entities that can be used to perform geometric modeling without dealing with graphic attributes.
Most standard entities (hereafter, just entity) depend now on their geometric entities (hereafter, primitive). Entities still expose geometric methods and properties but only as wrappers to primitive's ones. Beware that If something is changed directly on the primitive, the related entity must be regenerated to be correctly rendered.
That said, now it's a good practice to work with the geometric kernel and create an entity only when needed for rendering, as shown in the below code:
GBrep box = GBrep.CreateBox(10, 10, 10);
GBrep cyl = GBrep.CreateCylinder(2, 14);
cyl.Translate(5, 5, -2);
GBrep diff = GBrep.Difference(box, cyl);
Brep brep = new Brep(diff);
The most relevant change affects the instance of “composite entities” such as CompositeCurve, Region, etc. that now are defined by a collection of primitives instead of entities.
To switch between entities and primitives is possible to use the static utility methods under the Entity class such as Entitiy.GetPrimitiveFromEntity() or Entity.CreateEntityFromPrimitive().
Why are GEntity.BoxMin/BoxMax properties not available?
Entity.BoxMin/BoxMax properties were computed on entity tessellation vertices. Tessellation is something we want to keep on the UI side. Following this principle, you can generate tessellation vertices from the geometric kernel (using IGEntity.ComputeTessellation() method) but not keep tessellation or bounding box data into its entities.
As a side note, IGCurve implementor classes can use the GetTightBBox() method that returns the exact curve bounding box.
For a rough estimation of entity size, e.g. for tolerances estimation, the GEntity.GetCoarseSampling() method can be a valid alternative.