DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Models
Persistence
Model Properties
Collapse EntitiesEntities
Collapse GeometryGeometry
Geometry
Collapse BRepBRep
BRep Overview
BRep Geometry
Shapes
Curves
Surfaces
Faces
Wires
Edges
Compounds
Collapse MeshMesh
Mesh Geometry
Mesh
BRep to Mesh Conversion
Curve Geometry
Line Strips
Point Sets
Overlays
Collapse AttributesAttributes
Local Frame
Appearance
Texture
Properties of an Entity
Collapse Model ItemsModel Items
Items
3D Text
Smart Labels
View Points
Collapse MeasurementsMeasurements
Measurements
Persistent Measurements
Grid
Collapse Operations and AlgorithmsOperations and Algorithms
Boolean Operations
Euclidean Shortest Path
Collapse MovementMovement
Movements
Kinematic Entities
Collision Detection
Collapse Import/ExportImport/Export
Import/Export Overview
Data Flow Sample
STL Tree
Collapse DG Kernel ControlsDG Kernel Controls
Components
DG Kernel Control
Collapse Properies, Methods, EventsProperies, Methods, Events
Properies
Methods
Events
Collapse Interactive FunctionalityInteractive Functionality
View
Context Menu
Measurements
Direct User Access
Modes of DG Kernel
Current Entities
Collapse Selection OverviewSelection Overview
Selection
Selection Event
Collapse Auxiliary ViewsAuxiliary Views
Model Explorer
Birds Eye View
Full Screen window
Collapse Programmatic FunctionalityProgrammatic Functionality
Programming
Queries
Data Types
Object Construction
Generator
Component Context
Initialisation Context
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
IPointArray_DG
IPointMatrix_DG
IPointCloud_DG
Collapse CurvesCurves
ICurve_DG
ILine_DG
ICircle_DG
IEllipse_DG
IBSplineCurve_DG
IBSplineCurveInterpolator_DG
ICurveFreeForm_DG
IArcSpline3DCurve_DG
Collapse 2D2D
ICurve2d_DG
IBSplineCurve2d_DG
ICircle2d_DG
ILine2d_DG
IArc_DG
Collapse SurfacesSurfaces
IUVSurface_DG
IPartialSplineProps_DG
IBSplineSurface_DG
IBezierSurface_DG
IPartialBezierProps_DG
IRectangularTrimmedSurface_DG
ISurfaceOfRevolution_DG
Collapse Oriented ObjectsOriented Objects
IObjectOriented_DG
IPlane_DG
ISphere_DG
ICylinder_DG
ICone_DG
ITorus_DG
IBox_DG
IPolygon3D_DG
IGeometricObject_DG
Collapse GeneralGeneral
IElement_DG
IStrip_DG
Collapse ModelModel
IModel_DG
Collapse EntitiesEntities
IEntity_DG
IEntityArray_DG
IStdShape_DG
IStdShapeRef_DG
IDraw_DG
IEntity2d_DG
IModel2d_DG
Collapse GeometryGeometry
IGeometry_DG
IPointSetGeometry_DG
ISegmentStripGeometry_DG
ICurveGeometry_DG
ISurfacePoint_DG
ISurfacePointArray_DG
ILabel_DG
ILabelGeometry_DG
ISticky_DG
Collapse BSpline BRep GeometryBSpline BRep Geometry
Collapse Advanced AlgorithmsAdvanced Algorithms
IBRepChamfer_DG
IBRepDraftAngle_DG
IBRepFillet_DG
IFeaturePrism_DG
IBRepShape_DG
IBRepVertex_DG
IBRepEdge_DG
IBRepWire_DG
IBRepFace_DG
IBRepShell_DG
IBRepSolid_DG
IBRepCompositeSolid_DG
IBRepCompound_DG
IShapeArray_DG
IBRepBuilderEx_DG
IWireArrayToSurfaceBuilder_DG
IBRepGeometry_DG
IBRepBuilder_DG
Collapse Mesh GeometryMesh Geometry
IMesh_DG
IMeshGeometry_DG
IVertex_DG
IVertexSegment_DG
ISimplex_DG
IMeshPoint_DG
IMeshAlgor_DG
IDiffSurface_DG
Collapse AppearenceAppearence
IAppearance_DG
IColor
IMaterial_DG
ITexture_DG
ILineStyle_DG
Collapse MovementMovement
Collapse Collision DetectionCollision Detection
IMetrics_DG
IPathCollisionDetector_DG
IKinematicEntity_DG
IMove_DG
IKinematicSet_DG
ICutEffect_DG
ISpinEffect_DG
IConstraint_DG
Collapse ItemsItems
IModelItem_DG
IItemArray_DG
IDynamicScreenItem_DG
IDynamicScreenItemManager_DG
ISmartLabelManager_DG
Collapse Import / ExportImport / Export
IDataContext_DG
ISTLDataContext_DG
Collapse Operations and AgorithmsOperations and Agorithms
IBooleanEntity_DG
IEuclideanShortestPath_DG
Collapse User DataUser Data
IUserData_DG
Collapse ViewView
IView_DG
ISelection_DG
IScene_DG
ILighting_DG
ILightSource_DG
IViewPoint_DG
IViewPointArray_DG
IMeasurement_DG
IRectangleColor_DG
I2DEditor_DG
IVirtualView_DG
Collapse General ComputingGeneral Computing
IObjectGenerator_DG
IControlInitialisationContext_DG
IGlobalAPI_DG
Collections
IUnknown
IObject_DG
IBitmap_DG
IBlob_DG
IContext_DG
IError_DG
IKCStack
IMenu_KC
IMenuItem_KC
IText
IFont_DG
Collapse ViewsViews
View
Scene
Global Axes
Background
3D Background
Collapse Samples and TutorialsSamples and Tutorials
Sample List
.NET Samples
Delphi and C++ Samples
Collapse GraphicsGraphics
Concepts
3D View
Viewing Volume
Eye Frame
Perspective View
Collapse Math ObjectsMath Objects
Mathematical Objects
Planes
Frames
Transforms
Oriented Objects
Boxes
Collapse CurvesCurves
Curve Technologies
Native Curves
Collapse 2D Elements2D Elements
Geometric Elements
Arcs
Line Strips
Collapse DeprecatedDeprecated
Collapse Deprecated GeometryDeprecated Geometry
Collapse 3DS3DS
Profiles
Surface Patches
Surfaces and Patch Strips
Input Validation
Collapse Lines and CurvesLines and Curves
3DS Curves
Surface Of Revolution
Collapse Deprecated API ReferenceDeprecated API Reference
Collapse ModelModel
Collapse SectionSection
IBoundary
Collapse 3DS3DS
IProfiles
IProfiledElement_KC
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


IObject_KC Interface

IsEqual
GetHash
Copy
Replicate
Convert
Execute

IObject_KC interface represents generic properties of a software object. It can be queried from Entities and other objects, which not always are geometry-related. See also ITypeBasic_KC Interface

See also Interface List


HRESULT IsEqual(IObject_KC* object, VARIANT_BOOL* equal)

Parameters

object - [in] object to compare

equal - [out, retval] The return value. See remarks.

Remarks:

The method returns true if object and the object, which implements this interface is the same instance of a software object


HRESULT GetHash(int* hash)

Parameters

hash - [out, retval] The return value. See remarks.

Remarks:

Returns hash code, which is a piece of data which identifies the instance. Two objects are identical if and only if their hash codes coincide.


HRESULT Copy(IObject_KC* object)

Parameters

object - [in] object to copy

Remarks:

Copies internal state of object to the object, which implements this interface. If the objects have the same type state of all attributes after this call will be the same. For example if both interfaces where queried from mesh entities their surfaces will be geometrically the same.

When objects have different type the types must be related, in which case only the relevant shared set of attributes will be copied. For example when a mesh entity copied from a point set entity only entity name, local frame, user data and some other information is copied. Use ITypeBasic_KC2.GetCompatibleTypes to enumerate related types

The copy operation is "by value". For example in case of entities coordinates of local frames are copied, not reference to the local frame.


HRESULT Replicate(IObject_KC** object)

Parameters

object - [out, retval] - The returned copy of this object

Remarks:

Returns a new identical copy of the object, which implements this interface.


HRESULT Convert(int typeID, IObject_KC** object)

Parameters

typeID - [in] Identifies the type to convert this object to. Valid values are enumerated in EObjectType

object - [out, retval] - The returned transformed copy of this object

Remarks:

Use this method to cast / downgrade / upgrade an object to a different type. The method creates a new converted copy. This (original) object remains unchanged. Not all types can be converted. Use ITypeBasic_KC2.GetCompatibleTypes to enumerate types to which this object can be converted.

When this object (the object which implements the interface) already has the specified type no new object is created and method returns a copy of this interface

Example. The code below:

Dim iObj As IObject_KC = iEntity                  'Assuming iEntity is a 3DS or SOR entity

Dim iObjectNew As IObject_KC = iObj.Convert( EObjectType.eObjTypeMeshEntity )

Dim iSectMesh As ISection = iObjectNew

will convert any entity which has  surface to Mesh Entity


HRESULT Execute(char* operation, IDictionary_KC* context, VARIANT_BOOL* success)

Parameters

operation-[in] - Name of the operation

context-[in] - Additional parameters or null

object -[out, retval] - Success code

Remarks:

 The functionality provided by this method is documented on per use basis. The method is implemented by some object and some relatively rare operations


HRESULT Execute(char* operation, IDictionary_KC* context, VARIANT_BOOL* success)

Parameters

operation - [in] - Name of the operation. In this release must be only "UpdateTextureFromPerVertexColor"

context - [in] - Additional options for the operation. Can be Nothing (null)

Remarks:

Executes rarely used operations.

UpdateTextureFromPerVertexColor operation

Assuming the object implementing this interface is a MeshEntity with per vertex colors, the operation creates or updates texture of the object, which will contain image of the object viewed from a direction either specified via the context or calculated automatically

Parameters supplied via context:

Name Type Default Description
ImageSizeX Integer 0 or 600 If Both ImageSizeY and ImageSizeY are zero 600 is used
ImageSizeY Integer 0 or 400 If Both ImageSizeY and ImageSizeY are zero 400 is used
IView Interface null If provided must be IView interface, in which case the image for the texture will appear close to the currently displayed in 3D view
DirectionViewX Double 0.0 These three parameters specify direction of view used to generate image for the texture
DirectionViewY Double 0.0 These parameters are not used if the IView interface was provided
DirectionViewZ Double 0.0 The direction must be, similar to normals, outwards away from the object

If neither IView nor DirectionView* parameters are provided the direction of view will be calculated automatically to view the largest nearly flat surface of the object

If only one positive image size is specified the other is calculated automatically using aspect ratio of the visible part of the object. Horizontal side of the image is always oriented along the longer side of the object. Because of this ImageSizeX is expected to be greater than or equal to ImageSizeY

If neither image size is specified a default size is used

This operation is computationally intensive and slow for large image size and meshes. It is recommended to do few experiments starting with small image sizes