DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


ShapeMods Sample

ShapeMods sample demonstrates different ways to modify an entity and managing references to its attributes.

See also All samples

The application

Radio buttons on the top specify a way the model is updated. Any modification is done in CreateEntity() via creating a new entity with the current parameter values and replacement of an attribute in the model.

By default the modification is done on the lowest shape level: The shape of the BRep Geometry is replaced with the new one in the UpdateObject() method. This way there is no need for updating references to the higher-level attributes (geometry, entity, model). If the application kept some references to sub shapes like edges they would need to be updated (re-acquired).

Replacement of geometry may be required when the object changes its geometry type like from the default BRep to Mesh. In this case reference m_iBrepGeometry needs to be updated.

When there are no references to lower-level attributes like geometry or sub shapes, and other cases, it might be easier to replace the entity in the model. It is demonstrated as entity level in the sample

See also: Sample List.