DG Kernel Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > API Reference > Model > IModel_DG Search Documentation


IModel_DG Interface

GetEntityCount
GetEntityAt
GetEntity
GetLastEntity
AddEntity
Add
AddNewEntity
AddNewEntity2
AddBRepShape
AddNewBRepShape
AddNewBRepSolid
GetEntityArray
GetEntities
GetEntityPath
RemoveAt
RemoveEntity
RemoveEntities
RemoveAll
Find
BuildChildToParentMap
GetBoundingBox
Load
LoadEx
Save
SaveEx
GetName
SetName
GetDescription
SetDescription
Copy
Clone

int GetEntityCount()


IEntity_DG GetEntityAt(int index)


IEntity_DG GetEntity(string path)

Indexes entities by their names. Allows retrieving entites on level deeper than the first.
Examples:
MyTopBox\ChildSphere\Cone
TopTorus\2
The second example is used in case when the third child has empty name string, in which case zero based indecies are used. The search is case insencetive.


IEntity_DG GetLastEntity()


void AddEntity(IEntity_DG entity)


void Add(IEntityArray_DG entities, int insertAtOrNegative)

Inserts the entity at the specified index or adds at the end if the second parameter is negative.


IEntity_DG AddNewEntity()


IEntity_DG AddNewEntity2(string type)

type specifies type of geometry. Valid values are listed in IEntity_DG.SetGeometryType() topic


IEntity_DG AddBRepShape(IBRepShape_DG shape)

Creates and adds new entity of BRep type with shape attached to it.


IEntity_DG AddNewBRepShape(ShapeType_DG type)

Creates and adds new entity of BRep type with an empty shape of the specified type.


IEntity_DG AddNewBRepSolid()


IEntityArray_DG GetEntityArray(bool includeDescendents)


IEntityArray_DG GetEntities(string path, bool includeDescendents)

Lists descendents of the entity identified by its path. See GetEntity(string path)


string GetEntityPath(IEntity_DG entity)

Returns file system - like path of entity names separated by backward slashes. See GetEntity(string path) for an example


void RemoveAt(int index)


bool RemoveEntity(IEntity_DG entity)

Removes entity from the array of the top-level entities of the model. Returns false if the entity was not found.


void RemoveEntities(IEntityArray_DG entities)

Removes the entities from the model. The entities can be at any level in the hierarchy.


void RemoveAll(bool includingDescendantsFromParents)


int Find(IEntity_DG entity)

Returns index of entity at the top level or -1 if not found


IMapUnkn_DG BuildChildToParentMap()

The returned map contains entities (map[IEntity_DG]) is an IEntity_DG) and is read-only in this release. map[entity] is the parent of entity in this model or null for the top-level entities.


Box_DG GetBoundingBox()

Returns global axes - aligned minimal box containing all entities in the model.


void Load(string filePath)

The path can have any supported extension.


void LoadEx(string filePath, IDictionary_DG options)

The path can have any supported extension. The options parameter is ignored in this release


void Save(string filePath)

The path can have any supported extension.


void SaveEx(string filePath, IDictionary_DG options)

The path can have any supported extension. The options parameter is ignored in this release


string GetName()


void SetName(string name)


string GetDescription()


void SetDescription(string description)


void Copy(IModel_DG model)


IModel_DG Clone()